[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - solenv/clang-format writerfilter/inc writerfilter/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 31 06:07:00 UTC 2020
solenv/clang-format/blacklist | 10 --
writerfilter/inc/dmapper/DomainMapperFactory.hxx | 10 --
writerfilter/inc/dmapper/GraphicZOrderHelper.hxx | 6 -
writerfilter/source/dmapper/LatentStyleHandler.cxx | 54 +++++------
writerfilter/source/dmapper/LatentStyleHandler.hxx | 4
writerfilter/source/dmapper/SmartTagHandler.cxx | 70 +++++++-------
writerfilter/source/dmapper/SmartTagHandler.hxx | 9 -
writerfilter/source/dmapper/TableManager.cxx | 72 ++++++--------
writerfilter/source/dmapper/TablePositionHandler.cxx | 93 ++++++++-----------
writerfilter/source/dmapper/TablePositionHandler.hxx | 56 ++---------
writerfilter/source/dmapper/domainmapperfactory.cxx | 19 ++-
11 files changed, 171 insertions(+), 232 deletions(-)
New commits:
commit b9c64372f00d923fd88991138c9d766998f6a073
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed May 20 16:02:50 2020 +0200
Commit: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
CommitDate: Fri Jul 31 08:06:27 2020 +0200
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 at collabora.com>
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99827
Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 6f092e83d27b..d5f3e0f67737 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -18288,8 +18288,6 @@ winaccessibility/source/service/AccTreeEventListener.cxx
winaccessibility/source/service/AccWindowEventListener.cxx
winaccessibility/source/service/ResIDGenerator.cxx
winaccessibility/source/service/msaaservice_impl.cxx
-writerfilter/inc/dmapper/DomainMapperFactory.hxx
-writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
writerfilter/inc/dmapper/resourcemodel.hxx
writerfilter/inc/ooxml/OOXMLDocument.hxx
writerfilter/inc/ooxml/QNameToString.hxx
@@ -18323,8 +18321,6 @@ writerfilter/source/dmapper/GraphicHelpers.cxx
writerfilter/source/dmapper/GraphicHelpers.hxx
writerfilter/source/dmapper/GraphicImport.cxx
writerfilter/source/dmapper/GraphicImport.hxx
-writerfilter/source/dmapper/LatentStyleHandler.cxx
-writerfilter/source/dmapper/LatentStyleHandler.hxx
writerfilter/source/dmapper/LoggedResources.cxx
writerfilter/source/dmapper/LoggedResources.hxx
writerfilter/source/dmapper/MeasureHandler.cxx
@@ -18347,17 +18343,12 @@ writerfilter/source/dmapper/SectionColumnHandler.cxx
writerfilter/source/dmapper/SectionColumnHandler.hxx
writerfilter/source/dmapper/SettingsTable.cxx
writerfilter/source/dmapper/SettingsTable.hxx
-writerfilter/source/dmapper/SmartTagHandler.cxx
-writerfilter/source/dmapper/SmartTagHandler.hxx
writerfilter/source/dmapper/StyleSheetTable.cxx
writerfilter/source/dmapper/StyleSheetTable.hxx
writerfilter/source/dmapper/TDefTableHandler.cxx
writerfilter/source/dmapper/TDefTableHandler.hxx
writerfilter/source/dmapper/TableData.hxx
-writerfilter/source/dmapper/TableManager.cxx
writerfilter/source/dmapper/TableManager.hxx
-writerfilter/source/dmapper/TablePositionHandler.cxx
-writerfilter/source/dmapper/TablePositionHandler.hxx
writerfilter/source/dmapper/TablePropertiesHandler.cxx
writerfilter/source/dmapper/TablePropertiesHandler.hxx
writerfilter/source/dmapper/TagLogger.cxx
@@ -18372,7 +18363,6 @@ writerfilter/source/dmapper/TrackChangesHandler.cxx
writerfilter/source/dmapper/TrackChangesHandler.hxx
writerfilter/source/dmapper/WrapPolygonHandler.cxx
writerfilter/source/dmapper/WrapPolygonHandler.hxx
-writerfilter/source/dmapper/domainmapperfactory.cxx
writerfilter/source/dmapper/util.cxx
writerfilter/source/dmapper/util.hxx
writerfilter/source/filter/RtfFilter.cxx
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 66c383eb7233..a0600c0b2ab1 100644
--- a/writerfilter/source/dmapper/LatentStyleHandler.cxx
+++ b/writerfilter/source/dmapper/LatentStyleHandler.cxx
@@ -13,11 +13,10 @@ namespace writerfilter
{
namespace dmapper
{
-
using namespace ::com::sun::star;
-LatentStyleHandler::LatentStyleHandler() :
- LoggedProperties("LatentStyleHandler")
+LatentStyleHandler::LatentStyleHandler()
+ : LoggedProperties("LatentStyleHandler")
{
}
@@ -29,30 +28,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)
{
@@ -61,10 +60,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 41f68ac08b0e..ca23f734254f 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.cxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.cxx
@@ -35,13 +35,13 @@ namespace writerfilter
{
namespace 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 b9384b9e08df..854ab1719153 100644
--- a/writerfilter/source/dmapper/TableManager.cxx
+++ b/writerfilter/source/dmapper/TableManager.cxx
@@ -28,12 +28,10 @@ namespace writerfilter
{
namespace 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;
-
}
}
diff --git a/writerfilter/source/dmapper/TablePositionHandler.cxx b/writerfilter/source/dmapper/TablePositionHandler.cxx
index 8cb8a312edfa..cb6084038df4 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.cxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.cxx
@@ -19,13 +19,12 @@ namespace writerfilter
{
namespace 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")
{
}
@@ -35,49 +34,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
{
@@ -134,7 +129,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;
@@ -151,14 +145,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 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 3ba69bec8f68..c9e0cecc2a5c 100644
--- a/writerfilter/source/dmapper/domainmapperfactory.cxx
+++ b/writerfilter/source/dmapper/domainmapperfactory.cxx
@@ -14,16 +14,16 @@ namespace writerfilter
{
namespace 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"))
@@ -31,7 +31,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 dmapper
More information about the Libreoffice-commits
mailing list