summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /writerfilter/source/dmapper
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx18
-rw-r--r--writerfilter/source/dmapper/SettingsTable.cxx2
-rw-r--r--writerfilter/source/dmapper/SettingsTable.hxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx4
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx4
9 files changed, 19 insertions, 19 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 42024b048c45..654f2648ac78 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1170,7 +1170,7 @@ void DomainMapperTableHandler::ApplyParagraphPropertiesFromTableStyle(TableParag
// The wording is confusing here. Normally, the paragraph style DOES override the table-style.
// But for these two special situations, do not override the table-style. So the default is false.
// If false, then "CompatOverride" the normal behaviour, and apply the table-style's value.
- bCompatOverride &= !m_rDMapper_Impl.GetSettingsTable()->GetCompatSettingValue("overrideTableStyleFontSizeAndJustification");
+ bCompatOverride &= !m_rDMapper_Impl.GetSettingsTable()->GetCompatSettingValue(u"overrideTableStyleFontSizeAndJustification");
}
// use table style when no paragraph style setting or a docDefault value is applied instead of it
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 9ec336f263eb..556e5abc495d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -255,7 +255,7 @@ static bool IsFieldNestingAllowed(const FieldContextPtr& pOuter, const FieldCont
return true;
}
-uno::Any FloatingTableInfo::getPropertyValue(const OUString &propertyName)
+uno::Any FloatingTableInfo::getPropertyValue(std::u16string_view propertyName)
{
for( beans::PropertyValue const & propVal : std::as_const(m_aFrameProperties) )
if( propVal.Name == propertyName )
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index e3501da2d342..4b08d13e9649 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -396,7 +396,7 @@ struct FloatingTableInfo
m_nTableWidthType(nTableWidthType)
{
}
- css::uno::Any getPropertyValue(const OUString &propertyName);
+ css::uno::Any getPropertyValue(std::u16string_view propertyName);
};
/// Stores original/in-file-format info about a single anchored object.
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index a0ff5002e1ee..f6e8e454a6a6 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -56,7 +56,7 @@ static beans::PropertyValue lcl_makePropVal(PropertyIds nNameID, T const & aValu
return {getPropertyName(nNameID), 0, uno::makeAny(aValue), beans::PropertyState_DIRECT_VALUE};
}
-static sal_Int32 lcl_findProperty( const uno::Sequence< beans::PropertyValue >& aProps, const OUString& sName )
+static sal_Int32 lcl_findProperty( const uno::Sequence< beans::PropertyValue >& aProps, std::u16string_view sName )
{
sal_Int32 i = 0;
sal_Int32 nLen = aProps.getLength( );
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index acdcede9d6f9..335108f3c609 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1145,26 +1145,26 @@ bool SectionPropertyMap::FloatingTableConversion( const DomainMapper_Impl& rDM_I
nTableWidth *= nTextAreaWidth / 100.0;
}
sal_Int32 nLeftMargin = 0;
- if ( rInfo.getPropertyValue( "LeftMargin" ) >>= nLeftMargin )
+ if ( rInfo.getPropertyValue( u"LeftMargin" ) >>= nLeftMargin )
nTableWidth += nLeftMargin;
sal_Int32 nRightMargin = 0;
- if ( rInfo.getPropertyValue( "RightMargin" ) >>= nRightMargin )
+ if ( rInfo.getPropertyValue( u"RightMargin" ) >>= nRightMargin )
nTableWidth += nRightMargin;
- sal_Int16 nHoriOrientRelation = rInfo.getPropertyValue( "HoriOrientRelation" ).get<sal_Int16>();
- sal_Int16 nVertOrientRelation = rInfo.getPropertyValue( "VertOrientRelation" ).get<sal_Int16>();
+ sal_Int16 nHoriOrientRelation = rInfo.getPropertyValue( u"HoriOrientRelation" ).get<sal_Int16>();
+ sal_Int16 nVertOrientRelation = rInfo.getPropertyValue( u"VertOrientRelation" ).get<sal_Int16>();
if ( nHoriOrientRelation == text::RelOrientation::PAGE_FRAME && nVertOrientRelation == text::RelOrientation::PAGE_FRAME )
{
- sal_Int16 nHoriOrient = rInfo.getPropertyValue( "HoriOrient" ).get<sal_Int16>();
- sal_Int16 nVertOrient = rInfo.getPropertyValue( "VertOrient" ).get<sal_Int16>();
+ sal_Int16 nHoriOrient = rInfo.getPropertyValue( u"HoriOrient" ).get<sal_Int16>();
+ sal_Int16 nVertOrient = rInfo.getPropertyValue( u"VertOrient" ).get<sal_Int16>();
if ( nHoriOrient == text::HoriOrientation::NONE && nVertOrient == text::VertOrientation::NONE )
{
// Anchor position is relative to the page horizontally and vertically as well and is an absolute position.
// The more close we are to the left edge, the less likely there will be any wrapping.
// The more close we are to the bottom, the more likely the table will span over to the next page
// So if we're in the bottom left quarter, don't do any conversion.
- sal_Int32 nHoriOrientPosition = rInfo.getPropertyValue( "HoriOrientPosition" ).get<sal_Int32>();
- sal_Int32 nVertOrientPosition = rInfo.getPropertyValue( "VertOrientPosition" ).get<sal_Int32>();
+ sal_Int32 nHoriOrientPosition = rInfo.getPropertyValue( u"HoriOrientPosition" ).get<sal_Int32>();
+ sal_Int32 nVertOrientPosition = rInfo.getPropertyValue( u"VertOrientPosition" ).get<sal_Int32>();
sal_Int32 nPageHeight = getProperty( PROP_HEIGHT )->second.get<sal_Int32>();
if ( nHoriOrientPosition < (nPageWidth / 2) && nVertOrientPosition >( nPageHeight / 2 ) )
return false;
@@ -1717,7 +1717,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
}
sal_Int32 nCharWidth = 423; //240 twip/ 12 pt
- const StyleSheetEntryPtr pEntry = rDM_Impl.GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( "Standard" );
+ const StyleSheetEntryPtr pEntry = rDM_Impl.GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( u"Standard" );
if ( pEntry )
{
std::optional< PropertyMap::Property > pPropHeight = pEntry->pProperties->getProperty( PROP_CHAR_HEIGHT_ASIAN );
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 9cccf3ea1ba4..788fd93f25bc 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -810,7 +810,7 @@ void SettingsTable::ApplyProperties(uno::Reference<text::XTextDocument> const& x
}
}
-bool SettingsTable::GetCompatSettingValue( const OUString& sCompatName ) const
+bool SettingsTable::GetCompatSettingValue( std::u16string_view sCompatName ) const
{
bool bRet = false;
for (const auto& rProp : m_pImpl->m_aCompatSettings)
diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx
index d2d0a28ce87e..035384af52be 100644
--- a/writerfilter/source/dmapper/SettingsTable.hxx
+++ b/writerfilter/source/dmapper/SettingsTable.hxx
@@ -90,7 +90,7 @@ public:
void ApplyProperties(css::uno::Reference<css::text::XTextDocument> const& xDoc);
- bool GetCompatSettingValue(const OUString& sCompatName) const;
+ bool GetCompatSettingValue(std::u16string_view sCompatName) const;
sal_Int32 GetWordCompatibilityMode() const;
const OUString& GetCurrentDatabaseDataSource() const;
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index ec258b7377c3..a67a7aed972e 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1293,7 +1293,7 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
}
-StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& sIndex)
+StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(std::u16string_view sIndex)
{
StyleSheetEntryPtr pRet;
for(const StyleSheetEntryPtr & rpEntry : m_pImpl->m_aStyleSheetEntries)
@@ -1308,7 +1308,7 @@ StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& sIndex)
}
-StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(const OUString& sIndex)
+StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(std::u16string_view sIndex)
{
StyleSheetEntryPtr pRet;
for(const StyleSheetEntryPtr & rpEntry : m_pImpl->m_aStyleSheetEntries)
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index f734cbb8822c..69469d19d37a 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -91,8 +91,8 @@ public:
void ApplyNumberingStyleNameToParaStyles();
void ApplyStyleSheets( const FontTablePtr& rFontTable );
- StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex);
- StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(const OUString& rIndex);
+ StyleSheetEntryPtr FindStyleSheetByISTD(std::u16string_view sIndex);
+ StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(std::u16string_view rIndex);
StyleSheetEntryPtr FindDefaultParaStyle();
OUString ConvertStyleName( const OUString& rWWName, bool bExtendedSearch = false );