summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-05-20 16:02:50 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-05-20 19:31:46 +0200
commit96536d92e8026cebfde11e5539ee90471d0e7933 (patch)
treed39d27a4255f9c5ad9364fafdd0effff9669ee40 /writerfilter
parentc28d6b99599eaeb923804547c3ac849b6feec044 (diff)
writerfilter: clang-format these files
I added these files more or less recently and they have long lines. Use clang-format to break at a sane column limit. (And I now promise I won't remove more files from the clang-format blacklist for a while.) Change-Id: I7eae945defe67fa19c4bd9f4789d7918bb45bf9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94585 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/inc/dmapper/DomainMapperFactory.hxx10
-rw-r--r--writerfilter/inc/dmapper/GraphicZOrderHelper.hxx6
-rw-r--r--writerfilter/source/dmapper/LatentStyleHandler.cxx54
-rw-r--r--writerfilter/source/dmapper/LatentStyleHandler.hxx4
-rw-r--r--writerfilter/source/dmapper/SmartTagHandler.cxx70
-rw-r--r--writerfilter/source/dmapper/SmartTagHandler.hxx9
-rw-r--r--writerfilter/source/dmapper/TableManager.cxx72
-rw-r--r--writerfilter/source/dmapper/TablePositionHandler.cxx93
-rw-r--r--writerfilter/source/dmapper/TablePositionHandler.hxx56
-rw-r--r--writerfilter/source/dmapper/domainmapperfactory.cxx19
10 files changed, 171 insertions, 222 deletions
diff --git a/writerfilter/inc/dmapper/DomainMapperFactory.hxx b/writerfilter/inc/dmapper/DomainMapperFactory.hxx
index 602dd7f1c9fa..624805cad320 100644
--- a/writerfilter/inc/dmapper/DomainMapperFactory.hxx
+++ b/writerfilter/inc/dmapper/DomainMapperFactory.hxx
@@ -25,7 +25,6 @@ namespace writerfilter
{
namespace dmapper
{
-
enum class SourceDocumentType
{
OOXML,
@@ -39,14 +38,13 @@ public:
static Stream::Pointer_t
createMapper(css::uno::Reference<css::uno::XComponentContext> const& xContext,
css::uno::Reference<css::io::XInputStream> const& xInputStream,
- css::uno::Reference<css::lang::XComponent> const& xModel,
- bool bRepairStorage,
- SourceDocumentType eDocumentType,
- utl::MediaDescriptor const& rMediaDesc);
+ css::uno::Reference<css::lang::XComponent> const& xModel, bool bRepairStorage,
+ SourceDocumentType eDocumentType, utl::MediaDescriptor const& rMediaDesc);
};
// export just for test
-SAL_DLLPUBLIC_EXPORT std::tuple<OUString, std::vector<OUString>, std::vector<OUString> > splitFieldCommand(const OUString& rCommand);
+SAL_DLLPUBLIC_EXPORT std::tuple<OUString, std::vector<OUString>, std::vector<OUString>>
+splitFieldCommand(const OUString& rCommand);
} // namespace dmapper
} // namespace writerfilter
diff --git a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
index d73f7cc532b1..c566eec171d9 100644
--- a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
+++ b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
@@ -19,10 +19,12 @@ namespace dmapper
class GraphicZOrderHelper
{
public:
- void addItem(css::uno::Reference<css::beans::XPropertySet> const& props, sal_Int32 relativeHeight);
+ void addItem(css::uno::Reference<css::beans::XPropertySet> const& props,
+ sal_Int32 relativeHeight);
sal_Int32 findZOrder(sal_Int32 relativeHeight, bool bOldStyle = false);
+
private:
- using Items = std::map< sal_Int32, css::uno::Reference<css::beans::XPropertySet> >;
+ using Items = std::map<sal_Int32, css::uno::Reference<css::beans::XPropertySet>>;
Items items;
};
diff --git a/writerfilter/source/dmapper/LatentStyleHandler.cxx b/writerfilter/source/dmapper/LatentStyleHandler.cxx
index 0d463214f604..bc381d21fe3e 100644
--- a/writerfilter/source/dmapper/LatentStyleHandler.cxx
+++ b/writerfilter/source/dmapper/LatentStyleHandler.cxx
@@ -12,11 +12,10 @@
namespace writerfilter::dmapper
{
-
using namespace ::com::sun::star;
-LatentStyleHandler::LatentStyleHandler() :
- LoggedProperties("LatentStyleHandler")
+LatentStyleHandler::LatentStyleHandler()
+ : LoggedProperties("LatentStyleHandler")
{
}
@@ -28,30 +27,30 @@ void LatentStyleHandler::lcl_attribute(Id nId, Value& rVal)
bool bFound = true;
switch (nId)
{
- case NS_ooxml::LN_CT_LsdException_name:
- aValue.Name = "name";
- break;
- case NS_ooxml::LN_CT_LsdException_locked:
- aValue.Name = "locked";
- break;
- case NS_ooxml::LN_CT_LsdException_uiPriority:
- aValue.Name = "uiPriority";
- break;
- case NS_ooxml::LN_CT_LsdException_semiHidden:
- aValue.Name = "semiHidden";
- break;
- case NS_ooxml::LN_CT_LsdException_unhideWhenUsed:
- aValue.Name = "unhideWhenUsed";
- break;
- case NS_ooxml::LN_CT_LsdException_qFormat:
- aValue.Name = "qFormat";
- break;
- default:
- bFound = false;
+ case NS_ooxml::LN_CT_LsdException_name:
+ aValue.Name = "name";
+ break;
+ case NS_ooxml::LN_CT_LsdException_locked:
+ aValue.Name = "locked";
+ break;
+ case NS_ooxml::LN_CT_LsdException_uiPriority:
+ aValue.Name = "uiPriority";
+ break;
+ case NS_ooxml::LN_CT_LsdException_semiHidden:
+ aValue.Name = "semiHidden";
+ break;
+ case NS_ooxml::LN_CT_LsdException_unhideWhenUsed:
+ aValue.Name = "unhideWhenUsed";
+ break;
+ case NS_ooxml::LN_CT_LsdException_qFormat:
+ aValue.Name = "qFormat";
+ break;
+ default:
+ bFound = false;
#ifdef DBG_UTIL
- TagLogger::getInstance().element("unhandled");
+ TagLogger::getInstance().element("unhandled");
#endif
- break;
+ break;
}
if (bFound)
{
@@ -60,10 +59,7 @@ void LatentStyleHandler::lcl_attribute(Id nId, Value& rVal)
}
}
-
-void LatentStyleHandler::lcl_sprm(Sprm& /*rSprm*/)
-{
-}
+void LatentStyleHandler::lcl_sprm(Sprm& /*rSprm*/) {}
const std::vector<beans::PropertyValue>& LatentStyleHandler::getAttributes() const
{
diff --git a/writerfilter/source/dmapper/LatentStyleHandler.hxx b/writerfilter/source/dmapper/LatentStyleHandler.hxx
index fce5455792ae..00eb6005c567 100644
--- a/writerfilter/source/dmapper/LatentStyleHandler.hxx
+++ b/writerfilter/source/dmapper/LatentStyleHandler.hxx
@@ -17,10 +17,8 @@ namespace writerfilter
{
namespace dmapper
{
-
/// Handler for a latent style (w:lsdException element)
-class LatentStyleHandler
- : public LoggedProperties
+class LatentStyleHandler : public LoggedProperties
{
std::vector<css::beans::PropertyValue> m_aAttributes;
diff --git a/writerfilter/source/dmapper/SmartTagHandler.cxx b/writerfilter/source/dmapper/SmartTagHandler.cxx
index 56572ea74b4f..2ea94a9635ba 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.cxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.cxx
@@ -35,13 +35,13 @@ OUString lcl_getTypePath(OUString& rType)
namespace writerfilter::dmapper
{
-
using namespace ::com::sun::star;
-SmartTagHandler::SmartTagHandler(uno::Reference<uno::XComponentContext> xComponentContext, const uno::Reference<text::XTextDocument>& xTextDocument)
- : LoggedProperties("SmartTagHandler"),
- m_xComponentContext(std::move(xComponentContext)),
- m_xDocumentMetadataAccess(xTextDocument, uno::UNO_QUERY)
+SmartTagHandler::SmartTagHandler(uno::Reference<uno::XComponentContext> xComponentContext,
+ const uno::Reference<text::XTextDocument>& xTextDocument)
+ : LoggedProperties("SmartTagHandler")
+ , m_xComponentContext(std::move(xComponentContext))
+ , m_xDocumentMetadataAccess(xTextDocument, uno::UNO_QUERY)
{
}
@@ -51,16 +51,18 @@ void SmartTagHandler::lcl_attribute(Id nId, Value& rValue)
{
switch (nId)
{
- case NS_ooxml::LN_CT_Attr_name:
- m_aAttributes.emplace_back(rValue.getString(), OUString());
- break;
- case NS_ooxml::LN_CT_Attr_val:
- if (!m_aAttributes.empty())
- m_aAttributes.back().second = rValue.getString();
- break;
- default:
- SAL_WARN("writerfilter", "SmartTagHandler::lcl_attribute: unhandled attribute " << nId << " (string value: '"<<rValue.getString()<<"')");
- break;
+ case NS_ooxml::LN_CT_Attr_name:
+ m_aAttributes.emplace_back(rValue.getString(), OUString());
+ break;
+ case NS_ooxml::LN_CT_Attr_val:
+ if (!m_aAttributes.empty())
+ m_aAttributes.back().second = rValue.getString();
+ break;
+ default:
+ SAL_WARN("writerfilter", "SmartTagHandler::lcl_attribute: unhandled attribute "
+ << nId << " (string value: '" << rValue.getString()
+ << "')");
+ break;
}
}
@@ -68,25 +70,19 @@ void SmartTagHandler::lcl_sprm(Sprm& rSprm)
{
switch (rSprm.getId())
{
- case NS_ooxml::LN_CT_SmartTagPr_attr:
- {
- writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
- if (pProperties)
- pProperties->resolve(*this);
- break;
- }
+ case NS_ooxml::LN_CT_SmartTagPr_attr:
+ {
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if (pProperties)
+ pProperties->resolve(*this);
+ break;
+ }
}
}
-void SmartTagHandler::setURI(const OUString& rURI)
-{
- m_aURI = rURI;
-}
+void SmartTagHandler::setURI(const OUString& rURI) { m_aURI = rURI; }
-void SmartTagHandler::setElement(const OUString& rElement)
-{
- m_aElement = rElement;
-}
+void SmartTagHandler::setElement(const OUString& rElement) { m_aElement = rElement; }
void SmartTagHandler::handle(const uno::Reference<text::XTextRange>& xParagraph)
{
@@ -102,18 +98,22 @@ void SmartTagHandler::handle(const uno::Reference<text::XTextRange>& xParagraph)
continue;
uno::Reference<rdf::XURI> xType = rdf::URI::create(m_xComponentContext, aTypeNS);
- uno::Sequence< uno::Reference<rdf::XURI> > aGraphNames = m_xDocumentMetadataAccess->getMetadataGraphsWithType(xType);
+ uno::Sequence<uno::Reference<rdf::XURI>> aGraphNames
+ = m_xDocumentMetadataAccess->getMetadataGraphsWithType(xType);
uno::Reference<rdf::XURI> xGraphName;
if (aGraphNames.hasElements())
xGraphName = aGraphNames[0];
else
{
- uno::Sequence< uno::Reference<rdf::XURI> > xTypes = { xType };
+ uno::Sequence<uno::Reference<rdf::XURI>> xTypes = { xType };
xGraphName = m_xDocumentMetadataAccess->addMetadataFile(aMetadataFilePath, xTypes);
}
- uno::Reference<rdf::XNamedGraph> xGraph = m_xDocumentMetadataAccess->getRDFRepository()->getGraph(xGraphName);
- uno::Reference<rdf::XURI> xKey = rdf::URI::create(m_xComponentContext, rAttribute.first);
- uno::Reference<rdf::XLiteral> xValue = rdf::Literal::create(m_xComponentContext, rAttribute.second);
+ uno::Reference<rdf::XNamedGraph> xGraph
+ = m_xDocumentMetadataAccess->getRDFRepository()->getGraph(xGraphName);
+ uno::Reference<rdf::XURI> xKey
+ = rdf::URI::create(m_xComponentContext, rAttribute.first);
+ uno::Reference<rdf::XLiteral> xValue
+ = rdf::Literal::create(m_xComponentContext, rAttribute.second);
xGraph->addStatement(xSubject, xKey, xValue);
}
diff --git a/writerfilter/source/dmapper/SmartTagHandler.hxx b/writerfilter/source/dmapper/SmartTagHandler.hxx
index a9c07a3c8a92..29dbeeb3b833 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.hxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.hxx
@@ -40,19 +40,18 @@ namespace writerfilter
{
namespace dmapper
{
-
/// Handler for smart tags, i.e. <w:smartTag> and below.
-class SmartTagHandler
- : public LoggedProperties
+class SmartTagHandler : public LoggedProperties
{
css::uno::Reference<css::uno::XComponentContext> m_xComponentContext;
css::uno::Reference<css::rdf::XDocumentMetadataAccess> m_xDocumentMetadataAccess;
OUString m_aURI;
OUString m_aElement;
- std::vector< std::pair<OUString, OUString> > m_aAttributes;
+ std::vector<std::pair<OUString, OUString>> m_aAttributes;
public:
- SmartTagHandler(css::uno::Reference<css::uno::XComponentContext> xComponentContext, const css::uno::Reference<css::text::XTextDocument>& xTextDocument);
+ SmartTagHandler(css::uno::Reference<css::uno::XComponentContext> xComponentContext,
+ const css::uno::Reference<css::text::XTextDocument>& xTextDocument);
~SmartTagHandler() override;
void lcl_attribute(Id nId, Value& rValue) override;
diff --git a/writerfilter/source/dmapper/TableManager.cxx b/writerfilter/source/dmapper/TableManager.cxx
index d7c5b9322dee..7ce34d988996 100644
--- a/writerfilter/source/dmapper/TableManager.cxx
+++ b/writerfilter/source/dmapper/TableManager.cxx
@@ -28,12 +28,10 @@
namespace writerfilter::dmapper
{
+void TableManager::clearData() {}
-void TableManager::clearData()
-{
-}
-
-void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rHandle, const TablePropertyMapPtr& pProps)
+void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rHandle,
+ const TablePropertyMapPtr& pProps)
{
#ifdef DBG_UTIL
TagLogger::getInstance().startElement("tablemanager.openCell");
@@ -49,18 +47,11 @@ void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rH
}
}
-bool TableManager::isIgnore() const
-{
- return isRowEnd();
-}
+bool TableManager::isIgnore() const { return isRowEnd(); }
-void TableManager::endOfRowAction()
-{
-}
+void TableManager::endOfRowAction() {}
-void TableManager::endOfCellAction()
-{
-}
+void TableManager::endOfCellAction() {}
void TableManager::insertTableProps(const TablePropertyMapPtr& pProps)
{
@@ -153,24 +144,24 @@ bool TableManager::sprm(Sprm& rSprm)
bool bRet = true;
switch (rSprm.getId())
{
- case NS_ooxml::LN_tblDepth:
- {
- Value::Pointer_t pValue = rSprm.getValue();
+ case NS_ooxml::LN_tblDepth:
+ {
+ Value::Pointer_t pValue = rSprm.getValue();
- cellDepth(pValue->getInt());
- }
- break;
- case NS_ooxml::LN_inTbl:
- inCell();
- break;
- case NS_ooxml::LN_tblCell:
- endCell();
- break;
- case NS_ooxml::LN_tblRow:
- endRow();
+ cellDepth(pValue->getInt());
+ }
break;
- default:
- bRet = false;
+ case NS_ooxml::LN_inTbl:
+ inCell();
+ break;
+ case NS_ooxml::LN_tblCell:
+ endCell();
+ break;
+ case NS_ooxml::LN_tblRow:
+ endRow();
+ break;
+ default:
+ bRet = false;
}
return bRet;
}
@@ -294,7 +285,8 @@ void TableManager::resolveCurrentTable()
for (unsigned int nCell = 0; nCell < nCells; ++nCell)
{
- mpTableDataHandler->startCell(pRowData->getCellStart(nCell), pRowData->getCellProperties(nCell));
+ mpTableDataHandler->startCell(pRowData->getCellStart(nCell),
+ pRowData->getCellProperties(nCell));
mpTableDataHandler->endCell(pRowData->getCellEnd(nCell));
}
@@ -368,7 +360,8 @@ void TableManager::startLevel()
{
for (unsigned int i = 0; i < mpUnfinishedRow->getCellCount(); ++i)
{
- pTableData2->addCell(mpUnfinishedRow->getCellStart(i), mpUnfinishedRow->getCellProperties(i));
+ pTableData2->addCell(mpUnfinishedRow->getCellStart(i),
+ mpUnfinishedRow->getCellProperties(i));
pTableData2->endCell(mpUnfinishedRow->getCellEnd(i));
}
mpUnfinishedRow.clear();
@@ -412,7 +405,8 @@ void TableManager::endRow()
// Add borderless w:gridBefore cell(s) to the row
if (pTableData)
{
- sal_uInt32 nGridBefore = mpTableDataHandler->getDomainMapperImpl().getTableManager().getCurrentGridBefore();
+ sal_uInt32 nGridBefore
+ = mpTableDataHandler->getDomainMapperImpl().getTableManager().getCurrentGridBefore();
for (unsigned int i = 0; i < nGridBefore; ++i)
{
css::table::BorderLine2 aBorderLine;
@@ -424,7 +418,8 @@ void TableManager::endRow()
pCellProperties->Insert(PROP_LEFT_BORDER, css::uno::makeAny(aBorderLine));
pCellProperties->Insert(PROP_BOTTOM_BORDER, css::uno::makeAny(aBorderLine));
pCellProperties->Insert(PROP_RIGHT_BORDER, css::uno::makeAny(aBorderLine));
- pTableData->getCurrentRow()->addCell(pTableData->getCurrentRow()->getCellStart(0), pCellProperties, /*bAddBefore=*/true);
+ pTableData->getCurrentRow()->addCell(pTableData->getCurrentRow()->getCellStart(0),
+ pCellProperties, /*bAddBefore=*/true);
}
}
@@ -473,8 +468,10 @@ void TableManager::setCellLastParaAfterAutospacing(bool bIsAfterAutospacing)
}
TableManager::TableManager()
- : mnTableDepthNew(0), mnTableDepth(0), mbKeepUnfinishedRow(false),
- m_bTableStartsAtCellStart(false)
+ : mnTableDepthNew(0)
+ , mnTableDepth(0)
+ , mbKeepUnfinishedRow(false)
+ , m_bTableStartsAtCellStart(false)
{
setRowEnd(false);
setInCell(false);
@@ -483,7 +480,6 @@ TableManager::TableManager()
}
TableManager::~TableManager() = default;
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/TablePositionHandler.cxx b/writerfilter/source/dmapper/TablePositionHandler.cxx
index 57c22d265b62..2bea7876a4c5 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.cxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.cxx
@@ -18,13 +18,12 @@
namespace writerfilter::dmapper
{
-
using namespace ::com::sun::star;
-TablePositionHandler::TablePositionHandler() :
- LoggedProperties("TablePositionHandler"),
- m_aVertAnchor("margin"),
- m_aHorzAnchor("text")
+TablePositionHandler::TablePositionHandler()
+ : LoggedProperties("TablePositionHandler")
+ , m_aVertAnchor("margin")
+ , m_aHorzAnchor("text")
{
}
@@ -34,49 +33,45 @@ void TablePositionHandler::lcl_attribute(Id nId, Value& rVal)
{
switch (nId)
{
- case NS_ooxml::LN_CT_TblPPr_vertAnchor:
- m_aVertAnchor = rVal.getString();
- break;
- case NS_ooxml::LN_CT_TblPPr_tblpYSpec:
- m_aYSpec = rVal.getString();
- break;
- case NS_ooxml::LN_CT_TblPPr_horzAnchor:
- m_aHorzAnchor = rVal.getString();
- break;
- case NS_ooxml::LN_CT_TblPPr_tblpXSpec:
- m_aXSpec = rVal.getString();
- break;
- case NS_ooxml::LN_CT_TblPPr_tblpY:
- m_nY = rVal.getInt();
- break;
- case NS_ooxml::LN_CT_TblPPr_tblpX:
- m_nX = rVal.getInt();
- break;
- case NS_ooxml::LN_CT_TblPPr_leftFromText:
- m_nLeftFromText = rVal.getInt();
- break;
- case NS_ooxml::LN_CT_TblPPr_rightFromText:
- m_nRightFromText = rVal.getInt();
- break;
- case NS_ooxml::LN_CT_TblPPr_topFromText:
- m_nTopFromText = rVal.getInt();
- break;
- case NS_ooxml::LN_CT_TblPPr_bottomFromText:
- m_nBottomFromText = rVal.getInt();
- break;
- default:
+ case NS_ooxml::LN_CT_TblPPr_vertAnchor:
+ m_aVertAnchor = rVal.getString();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_tblpYSpec:
+ m_aYSpec = rVal.getString();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_horzAnchor:
+ m_aHorzAnchor = rVal.getString();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_tblpXSpec:
+ m_aXSpec = rVal.getString();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_tblpY:
+ m_nY = rVal.getInt();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_tblpX:
+ m_nX = rVal.getInt();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_leftFromText:
+ m_nLeftFromText = rVal.getInt();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_rightFromText:
+ m_nRightFromText = rVal.getInt();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_topFromText:
+ m_nTopFromText = rVal.getInt();
+ break;
+ case NS_ooxml::LN_CT_TblPPr_bottomFromText:
+ m_nBottomFromText = rVal.getInt();
+ break;
+ default:
#ifdef DBG_UTIL
- TagLogger::getInstance().element("unhandled");
+ TagLogger::getInstance().element("unhandled");
#endif
- break;
+ break;
}
}
-
-void TablePositionHandler::lcl_sprm(Sprm& /*rSprm*/)
-{
-}
-
+void TablePositionHandler::lcl_sprm(Sprm& /*rSprm*/) {}
uno::Sequence<beans::PropertyValue> TablePositionHandler::getTablePosition() const
{
@@ -133,7 +128,6 @@ uno::Sequence<beans::PropertyValue> TablePositionHandler::getTablePosition() con
nVertOrient = text::VertOrientation::TOP;
// TODO There are a few cases we can't map ATM.
-
sal_Int16 nVertOrientRelation;
if (m_aVertAnchor == "margin")
nVertOrientRelation = text::RelOrientation::PAGE_PRINT_AREA;
@@ -150,14 +144,11 @@ uno::Sequence<beans::PropertyValue> TablePositionHandler::getTablePosition() con
return aFrameProperties.getAsConstPropertyValueList();
}
-bool TablePositionHandler::operator== (const TablePositionHandler& rHandler) const
+bool TablePositionHandler::operator==(const TablePositionHandler& rHandler) const
{
- return m_aVertAnchor == rHandler.m_aVertAnchor &&
- m_aYSpec == rHandler.m_aYSpec &&
- m_aHorzAnchor == rHandler.m_aHorzAnchor &&
- m_aXSpec == rHandler.m_aXSpec &&
- m_nY == rHandler.m_nY &&
- m_nX == rHandler.m_nX;
+ return m_aVertAnchor == rHandler.m_aVertAnchor && m_aYSpec == rHandler.m_aYSpec
+ && m_aHorzAnchor == rHandler.m_aHorzAnchor && m_aXSpec == rHandler.m_aXSpec
+ && m_nY == rHandler.m_nY && m_nX == rHandler.m_nX;
}
} // namespace writerfilter::dmapper
diff --git a/writerfilter/source/dmapper/TablePositionHandler.hxx b/writerfilter/source/dmapper/TablePositionHandler.hxx
index a11f10364195..1a7ab58d2f89 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.hxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.hxx
@@ -29,10 +29,8 @@ namespace writerfilter
{
namespace dmapper
{
-
/// Handler for floating table positioning
-class TablePositionHandler
- : public LoggedProperties
+class TablePositionHandler : public LoggedProperties
{
OUString m_aVertAnchor;
OUString m_aYSpec;
@@ -50,47 +48,17 @@ class TablePositionHandler
void lcl_sprm(Sprm& sprm) override;
public:
- sal_Int32 getY() const
- {
- return m_nY;
- }
- sal_Int32 getX() const
- {
- return m_nX;
- }
- sal_Int32 getLeftFromText() const
- {
- return m_nLeftFromText;
- }
- sal_Int32 getRightFromText() const
- {
- return m_nRightFromText;
- }
- sal_Int32 getTopFromText() const
- {
- return m_nTopFromText;
- }
- sal_Int32 getBottomFromText() const
- {
- return m_nBottomFromText;
- }
+ sal_Int32 getY() const { return m_nY; }
+ sal_Int32 getX() const { return m_nX; }
+ sal_Int32 getLeftFromText() const { return m_nLeftFromText; }
+ sal_Int32 getRightFromText() const { return m_nRightFromText; }
+ sal_Int32 getTopFromText() const { return m_nTopFromText; }
+ sal_Int32 getBottomFromText() const { return m_nBottomFromText; }
- const OUString& getVertAnchor() const
- {
- return m_aVertAnchor;
- }
- const OUString& getYSpec() const
- {
- return m_aYSpec;
- }
- const OUString& getHorzAnchor() const
- {
- return m_aHorzAnchor;
- }
- const OUString& getXSpec() const
- {
- return m_aXSpec;
- }
+ const OUString& getVertAnchor() const { return m_aVertAnchor; }
+ const OUString& getYSpec() const { return m_aYSpec; }
+ const OUString& getHorzAnchor() const { return m_aHorzAnchor; }
+ const OUString& getXSpec() const { return m_aXSpec; }
TablePositionHandler();
~TablePositionHandler() override;
@@ -103,7 +71,7 @@ public:
*/
css::uno::Sequence<css::beans::PropertyValue> getTablePosition() const;
- bool operator== (const TablePositionHandler& rHandler) const;
+ bool operator==(const TablePositionHandler& rHandler) const;
};
using TablePositionHandlerPtr = tools::SvRef<TablePositionHandler>;
diff --git a/writerfilter/source/dmapper/domainmapperfactory.cxx b/writerfilter/source/dmapper/domainmapperfactory.cxx
index 5b5570ad0ad1..1e52cfc36fcc 100644
--- a/writerfilter/source/dmapper/domainmapperfactory.cxx
+++ b/writerfilter/source/dmapper/domainmapperfactory.cxx
@@ -13,16 +13,16 @@
namespace writerfilter::dmapper
{
-
-Stream::Pointer_t DomainMapperFactory::createMapper(css::uno::Reference<css::uno::XComponentContext> const& xContext,
- css::uno::Reference<css::io::XInputStream> const& xInputStream,
- css::uno::Reference<css::lang::XComponent> const& xModel,
- bool bRepairStorage,
- SourceDocumentType eDocumentType,
- utl::MediaDescriptor const& rMediaDesc)
+Stream::Pointer_t
+DomainMapperFactory::createMapper(css::uno::Reference<css::uno::XComponentContext> const& xContext,
+ css::uno::Reference<css::io::XInputStream> const& xInputStream,
+ css::uno::Reference<css::lang::XComponent> const& xModel,
+ bool bRepairStorage, SourceDocumentType eDocumentType,
+ utl::MediaDescriptor const& rMediaDesc)
{
#ifdef DBG_UTIL
- OUString sURL = rMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString());
+ OUString sURL
+ = rMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString());
::std::string sURLc = OUStringToOString(sURL, RTL_TEXTENCODING_ASCII_US).getStr();
if (getenv("SW_DEBUG_WRITERFILTER"))
@@ -30,7 +30,8 @@ Stream::Pointer_t DomainMapperFactory::createMapper(css::uno::Reference<css::uno
TagLogger::getInstance().startDocument();
#endif
- return Stream::Pointer_t(new DomainMapper(xContext, xInputStream, xModel, bRepairStorage, eDocumentType, rMediaDesc));
+ return Stream::Pointer_t(new DomainMapper(xContext, xInputStream, xModel, bRepairStorage,
+ eDocumentType, rMediaDesc));
}
} // namespace writerfilter::dmapper