summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-28 16:43:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-31 22:00:27 +0200
commit90ac4671c13ed4f548bb4188355b02217b9e24ba (patch)
treeb07d9238cbe7b7d39530b6e18875196278790368 /svx/source/xoutdev
parentd62d07b3d29014f76c0d676c891cbafa80d0765f (diff)
make IntlWrapper arg to GetPresentation non-implicit and non-optional
which requires explicitly adding null in 1) SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet) where SdrItemBrowserControl is only used by SdrItemBrowser and the only use of that is within DBG_UTIL in SdrPaintView 2) SwCursorShell::GetContentAtPos( const Point& rPt, within a #ifdef DBG_UTIL block in 3) SvxSearchDialog::BuildAttrText_Impl( OUString& rStr, bool bSrchFlag ) const where the other branch uses SvxResId 4) SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const 5) XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const looks very much like all uses (outside the dumpers) are intended to be in the ui locale results in that INetContentTypes::GetPresentation always called with UI Locale Change-Id: I5a110c107838b4db3c355476426d6532f2b6ce52 Reviewed-on: https://gerrit.libreoffice.org/40538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r--svx/source/xoutdev/xattr.cxx44
-rw-r--r--svx/source/xoutdev/xattr2.cxx32
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx2
3 files changed, 40 insertions, 38 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 0ef8ede2fdea..17d40cccc111 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -56,6 +56,7 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/tools/unotools.hxx>
+#include <unotools/intlwrapper.hxx>
#include <vcl/gradient.hxx>
#include <libxml/xmlwriter.h>
@@ -386,7 +387,7 @@ bool XLineStyleItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -728,7 +729,7 @@ bool XLineDashItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
@@ -1043,11 +1044,11 @@ bool XLineWidthItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit eCoreUnit,
MapUnit ePresUnit,
- OUString& rText, const IntlWrapper * pIntl
+ OUString& rText, const IntlWrapper& rIntl
) const
{
rText = GetMetricText( (long) GetValue(),
- eCoreUnit, ePresUnit, pIntl) +
+ eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
}
@@ -1105,7 +1106,7 @@ bool XLineColorItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
@@ -1291,7 +1292,7 @@ bool XLineStartItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
@@ -1853,7 +1854,7 @@ bool XLineEndItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
@@ -1932,11 +1933,11 @@ bool XLineStartWidthItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit eCoreUnit,
MapUnit ePresUnit,
- OUString& rText, const IntlWrapper * pIntl
+ OUString& rText, const IntlWrapper& rIntl
) const
{
rText = GetMetricText( (long) GetValue(),
- eCoreUnit, ePresUnit, pIntl) +
+ eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
}
@@ -1980,11 +1981,11 @@ bool XLineEndWidthItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit eCoreUnit,
MapUnit ePresUnit,
- OUString& rText, const IntlWrapper *pIntl
+ OUString& rText, const IntlWrapper& rIntl
) const
{
rText = GetMetricText( (long) GetValue(),
- eCoreUnit, ePresUnit, pIntl) +
+ eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
}
@@ -2028,7 +2029,7 @@ bool XLineStartCenterItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = SvxResId(GetValue() ? RID_SVXSTR_CENTERED : RID_SVXSTR_NOTCENTERED);
@@ -2077,7 +2078,7 @@ bool XLineEndCenterItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = SvxResId(GetValue() ? RID_SVXSTR_CENTERED : RID_SVXSTR_NOTCENTERED);
@@ -2131,7 +2132,7 @@ bool XFillStyleItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -2201,7 +2202,8 @@ void XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number((sal_Int16)GetValue()).getStr()));
OUString aPresentation;
- GetPresentation(SfxItemPresentation::Nameless, MapUnit::Map100thMM, MapUnit::Map100thMM, aPresentation);
+ IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
+ GetPresentation(SfxItemPresentation::Nameless, MapUnit::Map100thMM, MapUnit::Map100thMM, aPresentation, aIntlWrapper);
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
xmlTextWriterEndElement(pWriter);
@@ -2240,7 +2242,7 @@ bool XFillColorItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
@@ -2305,7 +2307,7 @@ bool XSecondaryFillColorItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
@@ -2495,7 +2497,7 @@ bool XFillGradientItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
@@ -2806,9 +2808,9 @@ bool XFillFloatTransparenceItem::PutValue( const css::uno::Any& rVal, sal_uInt8
bool XFillFloatTransparenceItem::GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreUnit, MapUnit ePresUnit,
OUString& rText,
- const IntlWrapper * pIntlWrapper ) const
+ const IntlWrapper& rIntlWrapper ) const
{
- return XFillGradientItem::GetPresentation( ePres, eCoreUnit, ePresUnit, rText, pIntlWrapper );
+ return XFillGradientItem::GetPresentation( ePres, eCoreUnit, ePresUnit, rText, rIntlWrapper );
}
bool XFillFloatTransparenceItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
@@ -2956,7 +2958,7 @@ bool XFillHatchItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText = GetName();
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 8bd12e6682df..7d7114c56d84 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -60,7 +60,7 @@ bool XLineTransparenceItem::GetPresentation
SfxItemPresentation ePres,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -113,7 +113,7 @@ SfxPoolItem* XLineJointItem::Clone(SfxItemPool* /*pPool*/) const
}
bool XLineJointItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
- MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const
+ MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
{
rText.clear();
@@ -317,7 +317,7 @@ SfxPoolItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const
}
bool XLineCapItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
- MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const
+ MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
{
rText.clear();
@@ -418,7 +418,7 @@ bool XFillTransparenceItem::GetPresentation
SfxItemPresentation ePres,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -493,7 +493,7 @@ bool XGradientStepCountItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -528,7 +528,7 @@ bool XFillBmpTileItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -571,7 +571,7 @@ bool XFillBmpPosItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -618,7 +618,7 @@ bool XFillBmpSizeXItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -658,7 +658,7 @@ bool XFillBmpSizeYItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -697,7 +697,7 @@ bool XFillBmpSizeLogItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -732,7 +732,7 @@ bool XFillBmpTileOffsetXItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -766,7 +766,7 @@ bool XFillBmpTileOffsetYItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -798,7 +798,7 @@ bool XFillBmpStretchItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -840,7 +840,7 @@ bool XFillBmpPosOffsetXItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -874,7 +874,7 @@ bool XFillBmpPosOffsetYItem::GetPresentation
SfxItemPresentation /*ePres*/,
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper *
+ OUString& rText, const IntlWrapper&
) const
{
rText.clear();
@@ -902,7 +902,7 @@ SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) con
}
bool XFillBackgroundItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
- MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const
+ MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
{
rText.clear();
return true;
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index c8de391e6fee..e3e51300469c 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -327,7 +327,7 @@ bool XFillBitmapItem::GetPresentation(
MapUnit /*eCoreUnit*/,
MapUnit /*ePresUnit*/,
OUString& rText,
- const IntlWrapper*) const
+ const IntlWrapper&) const
{
rText += GetName();
return true;