summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx20
-rw-r--r--sw/source/filter/ww8/docxexport.cxx16
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx12
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx3
5 files changed, 28 insertions, 27 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 868196d654e0..f94baf8806a7 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -651,9 +651,9 @@ bool DocxAttributeOutput::TextBoxIsFramePr(const SwFrameFormat& rFrameFormat)
{
uno::Sequence< beans::PropertyValue > propList;
xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
- auto pProp = std::find_if(propList.begin(), propList.end(),
+ auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
[](const beans::PropertyValue& rProp) { return rProp.Name == "ParaFrameProperties"; });
- if (pProp != propList.end())
+ if (pProp != std::cend(propList))
aFrameProperties = pProp->Value;
}
bool bFrameProperties = false;
@@ -2820,10 +2820,10 @@ void DocxAttributeOutput::GetSdtEndBefore(const SdrObject* pSdrObj)
xPropSet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
}
- auto pProp = std::find_if(aGrabBag.begin(), aGrabBag.end(),
+ auto pProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
[this](const beans::PropertyValue& rProp) {
return "SdtEndBefore" == rProp.Name && m_bStartedCharSdt && !m_bEndCharSdt; });
- if (pProp != aGrabBag.end())
+ if (pProp != std::cend(aGrabBag))
pProp->Value >>= m_bEndCharSdt;
}
@@ -4701,9 +4701,9 @@ void DocxAttributeOutput::LatentStyles()
uno::Sequence<beans::PropertyValue> aInteropGrabBag;
xPropertySet->getPropertyValue("InteropGrabBag") >>= aInteropGrabBag;
uno::Sequence<beans::PropertyValue> aLatentStyles;
- auto pProp = std::find_if(aInteropGrabBag.begin(), aInteropGrabBag.end(),
+ auto pProp = std::find_if(std::cbegin(aInteropGrabBag), std::cend(aInteropGrabBag),
[](const beans::PropertyValue& rProp) { return rProp.Name == "latentStyles"; });
- if (pProp != aInteropGrabBag.end())
+ if (pProp != std::cend(aInteropGrabBag))
pProp->Value >>= aLatentStyles;
if (!aLatentStyles.hasElements())
return;
@@ -5736,9 +5736,9 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
uno::Reference< beans::XPropertySet > xPropSet( m_rExport.m_rDoc.GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
uno::Sequence< beans::PropertyValue > aGrabBag, aObjectsInteropList,aObjectInteropAttributes;
xPropSet->getPropertyValue( UNO_NAME_MISC_OBJ_INTEROPGRABBAG ) >>= aGrabBag;
- auto pProp = std::find_if(aGrabBag.begin(), aGrabBag.end(),
+ auto pProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
[](const beans::PropertyValue& rProp) { return rProp.Name == "EmbeddedObjects"; });
- if (pProp != aGrabBag.end())
+ if (pProp != std::cend(aGrabBag))
pProp->Value >>= aObjectsInteropList;
SwOLEObj& aObject = rNode.GetOLEObj();
@@ -5757,9 +5757,9 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
default:
SAL_WARN("sw.ww8", "DocxAttributeOutput::WriteOLE: invalid aspect value");
}
- auto pObjectsInterop = std::find_if(aObjectsInteropList.begin(), aObjectsInteropList.end(),
+ auto pObjectsInterop = std::find_if(std::cbegin(aObjectsInteropList), std::cend(aObjectsInteropList),
[&sObjectName](const beans::PropertyValue& rProp) { return rProp.Name == sObjectName; });
- if (pObjectsInterop != aObjectsInteropList.end())
+ if (pObjectsInterop != std::cend(aObjectsInteropList))
pObjectsInterop->Value >>= aObjectInteropAttributes;
for( const auto& rObjectInteropAttribute : std::as_const(aObjectInteropAttributes) )
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index e4531e421796..b610adf30f7d 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -1369,9 +1369,9 @@ void DocxExport::WriteTheme()
uno::Reference<xml::dom::XDocument> themeDom;
uno::Sequence< beans::PropertyValue > propList;
xPropSet->getPropertyValue( aName ) >>= propList;
- auto pProp = std::find_if(propList.begin(), propList.end(),
+ auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
[](const beans::PropertyValue& rProp) { return rProp.Name == "OOXTheme"; });
- if (pProp != propList.end())
+ if (pProp != std::cend(propList))
pProp->Value >>= themeDom;
// no theme dom to write
@@ -1472,14 +1472,14 @@ void DocxExport::WriteCustomXml()
uno::Sequence<uno::Reference<xml::dom::XDocument> > customXmlDomPropslist;
uno::Sequence< beans::PropertyValue > propList;
xPropSet->getPropertyValue( aName ) >>= propList;
- auto pProp = std::find_if(propList.begin(), propList.end(),
+ auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
[](const beans::PropertyValue& rProp) { return rProp.Name == "OOXCustomXml"; });
- if (pProp != propList.end())
+ if (pProp != std::cend(propList))
pProp->Value >>= customXmlDomlist;
- pProp = std::find_if(propList.begin(), propList.end(),
+ pProp = std::find_if(std::cbegin(propList), std::cend(propList),
[](const beans::PropertyValue& rProp) { return rProp.Name == "OOXCustomXmlProps"; });
- if (pProp != propList.end())
+ if (pProp != std::cend(propList))
pProp->Value >>= customXmlDomPropslist;
for (sal_Int32 j = 0; j < customXmlDomlist.getLength(); j++)
@@ -1589,9 +1589,9 @@ void DocxExport::WriteEmbeddings()
uno::Sequence< beans::PropertyValue > embeddingsList;
uno::Sequence< beans::PropertyValue > propList;
xPropSet->getPropertyValue( aName ) >>= propList;
- auto pProp = std::find_if(propList.begin(), propList.end(),
+ auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
[](const beans::PropertyValue& rProp) { return rProp.Name == "OOXEmbeddings"; });
- if (pProp != propList.end())
+ if (pProp != std::cend(propList))
pProp->Value >>= embeddingsList;
for (const auto& rEmbedding : std::as_const(embeddingsList))
{
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 1e1ac6bd66c3..ae5b7ca94fb1 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -83,7 +83,7 @@ OUString lclGetAnchorIdFromGrabBag(const SdrObject* pObj)
aGrabBagName = "FrameInteropGrabBag";
else
aGrabBagName = "InteropGrabBag";
- uno::Sequence<beans::PropertyValue> propList = lclGetProperty(xShape, aGrabBagName);
+ const uno::Sequence<beans::PropertyValue> propList = lclGetProperty(xShape, aGrabBagName);
auto pProp
= std::find_if(propList.begin(), propList.end(),
[](const beans::PropertyValue& rProp) { return rProp.Name == "AnchorId"; });
@@ -1385,7 +1385,7 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat
static bool lcl_isLockedCanvas(const uno::Reference<drawing::XShape>& xShape)
{
- uno::Sequence<beans::PropertyValue> propList = lclGetProperty(xShape, "InteropGrabBag");
+ const uno::Sequence<beans::PropertyValue> propList = lclGetProperty(xShape, "InteropGrabBag");
/*
* Export as Locked Canvas only if the property
* is in the PropertySet
@@ -1835,11 +1835,11 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
{
uno::Sequence<beans::PropertyValue> propList;
xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
- auto pProp = std::find_if(propList.begin(), propList.end(),
+ auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
[](const beans::PropertyValue& rProp) {
return rProp.Name == "mso-rotation-angle";
});
- if (pProp != propList.end())
+ if (pProp != std::cend(propList))
aRotation = pProp->Value;
}
sal_Int32 nTmp;
@@ -1867,11 +1867,11 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
{
uno::Sequence<beans::PropertyValue> propList;
xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
- auto pProp = std::find_if(propList.begin(), propList.end(),
+ auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
[](const beans::PropertyValue& rProp) {
return rProp.Name == "mso-orig-shape-type";
});
- if (pProp != propList.end())
+ if (pProp != std::cend(propList))
pProp->Value >>= shapeType;
}
//Empty shapeType will lead to corruption so to avoid that shapeType is set to default i.e. "rect"
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 4ad89587eda1..570c43130778 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -130,9 +130,9 @@ void DocxTableStyleExport::TableStyles(sal_Int32 nCountStylesToWrite)
xPropertySet->getPropertyValue("InteropGrabBag") >>= aInteropGrabBag;
uno::Sequence<beans::PropertyValue> aTableStyles;
auto pProp = std::find_if(
- aInteropGrabBag.begin(), aInteropGrabBag.end(),
+ std::cbegin(aInteropGrabBag), std::cend(aInteropGrabBag),
[](const beans::PropertyValue& rProp) { return rProp.Name == "tableStyles"; });
- if (pProp != aInteropGrabBag.end())
+ if (pProp != std::cend(aInteropGrabBag))
pProp->Value >>= aTableStyles;
if (!aTableStyles.hasElements())
return;
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0ba034aa6564..6e6ed96981f7 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -4253,7 +4253,8 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
{
uno::Sequence< OUString > vListEntries;
pListEntries->second >>= vListEntries;
- copy(vListEntries.begin(), vListEntries.end(), back_inserter(aListItems));
+ aListItems.reserve(vListEntries.getLength());
+ copy(std::cbegin(vListEntries), std::cend(vListEntries), back_inserter(aListItems));
}
}