[Libreoffice-commits] core.git: 11 commits - cui/source dbaccess/source editeng/source forms/source i18npool/source include/svtools lotuswordpro/source starmath/inc svtools/source sw/source
Stephan Bergmann
sbergman at redhat.com
Fri Jun 19 02:04:43 PDT 2015
cui/source/options/optgenrl.cxx | 3
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 2
editeng/source/editeng/impedit.hxx | 2
editeng/source/editeng/impedit2.cxx | 2
forms/source/component/Grid.cxx | 6
forms/source/component/Grid.hxx | 2
i18npool/source/localedata/LocaleNode.cxx | 6
include/svtools/unoevent.hxx | 3
lotuswordpro/source/filter/lwpbulletstylemgr.cxx | 2
lotuswordpro/source/filter/lwpobjid.hxx | 12
lotuswordpro/source/filter/lwpsilverbullet.cxx | 12
lotuswordpro/source/filter/lwpsilverbullet.hxx | 2
lotuswordpro/source/filter/xfilter/xfliststyle.cxx | 5
lotuswordpro/source/filter/xfilter/xfliststyle.hxx | 7
starmath/inc/types.hxx | 323 ++++++++----------
svtools/source/uno/unoevent.cxx | 4
sw/source/core/edit/edglss.cxx | 2
sw/source/core/unocore/unoevent.cxx | 2
sw/source/filter/ww8/ww8graf.cxx | 6
sw/source/filter/ww8/ww8par5.cxx | 2
20 files changed, 194 insertions(+), 211 deletions(-)
New commits:
commit 9fc05ce275526df9c5e2aa5df30c4b08a61fd0bc
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 11:03:08 2015 +0200
Simplify uses of OUString::replaceAll with literal arguments
Change-Id: I769cc6e11909c7f4c6394fdc4dec8a12b9a67af8
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 99f08d3..52606cf 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1552,7 +1552,7 @@ EditSelection ImpEditEngine::SelectSentence( const EditSelection& rCurSel )
const ContentNode* pNode = rPaM.GetNode();
// #i50710# line breaks are marked with 0x01 - the break iterator prefers 0x0a for that
OUString sParagraph = pNode->GetString();
- sParagraph = sParagraph.replaceAll(OUString(0x01), OUString(0x0a));
+ sParagraph = sParagraph.replaceAll("\x01", "\x0a");
//return Null if search starts at the beginning of the string
sal_Int32 nStart = rPaM.GetIndex() ? _xBI->beginOfSentence( sParagraph, rPaM.GetIndex(), GetLocale( rPaM ) ) : 0;
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 3ef28d4..8ac4107 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -269,7 +269,7 @@ bool SwEditShell::GetSelectedText( OUString &rBuf, int nHndlParaBrk )
rBuf = GetSelText();
if( GETSELTXT_PARABRK_TO_BLANK == nHndlParaBrk )
{
- rBuf = rBuf.replaceAll(OUString(0x0a), " ");
+ rBuf = rBuf.replaceAll("\x0a", " ");
}
else if( IsSelFullPara() &&
GETSELTXT_PARABRK_TO_ONLYCR != nHndlParaBrk )
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 6d60d98..e5d490e 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -923,9 +923,9 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(OUString &rString, WW8_CP
long nDummy(0);
lcl_StripFields(rString, nDummy);
// Strip out word's special characters for the simple string
- rString = rString.replaceAll(OUString(0x1), "");
- rString = rString.replaceAll(OUString(0x5), "");
- rString = rString.replaceAll(OUString(0x8), "");
+ rString = rString.replaceAll("\x01", "");
+ rString = rString.replaceAll("\x05", "");
+ rString = rString.replaceAll("\x08", "");
rString = rString.replaceAll("\007\007", "\007\012");
rString = rString.replace(0x7, ' ');
}
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index c5f99bb..b7c1e2e 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -934,7 +934,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
// Thus, delete character 0x01, which stands for such a graphic.
if (aF.nId==51) //#i56768# only do it for the MACROBUTTON field, since DropListFields need the 0x01.
{
- aStr = aStr.replaceAll(OUString(0x01), "");
+ aStr = aStr.replaceAll("\x01", "");
}
eF_ResT eRes = (this->*aWW8FieldTab[aF.nId])( &aF, aStr );
commit 6776d52be6dfe3b8725fadb77b87e20a7cc639d0
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:59:26 2015 +0200
Remove unnecessary variable
Change-Id: Ibec141be604f15d1c6358d3365a7a3e60c135f1f
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index 3eaae46..e3608a8 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -264,7 +264,6 @@ OUString LwpSilverBullet::GetNumCharByStyleID(LwpFribParaNumber* pParaNumber)
OUString strNumChar("1");
sal_uInt16 nStyleID = pParaNumber->GetStyleID();
- UChar32 uC = 0x0000;
switch (nStyleID)
{
@@ -286,8 +285,7 @@ OUString LwpSilverBullet::GetNumCharByStyleID(LwpFribParaNumber* pParaNumber)
strNumChar = "i";
break;
case NUMCHAR_other:
- uC = static_cast<UChar32>(pParaNumber->GetNumberChar());
- strNumChar = OUString(uC);
+ strNumChar = OUString(pParaNumber->GetNumberChar());
break;
case NUMCHAR_Chinese1:
{
commit 8d057b3ca924cca0aafcaabf250189cf6aa41cfd
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:56:24 2015 +0200
Use a more straightforward hash function
...instead of assembling a OUString and calling OUString::hashCode. It appears
that these hash values are only used in std::unordered_map instantiations, not
used as part of a stable file format.
Change-Id: Ie3f78b2cc9e162ac9777c7e5f4164a12bc9a62a4
diff --git a/lotuswordpro/source/filter/lwpobjid.hxx b/lotuswordpro/source/filter/lwpobjid.hxx
index 33c3429..05e1fb7 100644
--- a/lotuswordpro/source/filter/lwpobjid.hxx
+++ b/lotuswordpro/source/filter/lwpobjid.hxx
@@ -150,16 +150,8 @@ inline void LwpObjectID::SetHigh(sal_uInt16 nh)
}
inline size_t LwpObjectID::HashCode() const
{
- OUString str;
- if(m_nIndex)
- {
- str = OUString(m_nIndex) + OUString(m_nHigh);
- }
- else
- {
- str = OUString(m_nLow) + OUString(m_nHigh);
- }
- return str.hashCode();
+ return static_cast<size_t>(
+ (m_nIndex == 0 ? 23 * m_nLow : 27 * m_nIndex) + 29 * m_nHigh);
}
#endif
commit 153ea761e32238d1dd882823cf27da1b11c4d66a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:49:42 2015 +0200
Consistently represent bullet char as OUString
(One difference is that for an XFListLevelBullet for which SetBulletChar has not
been called, ToXml will use an empty string now instead of a string containing a
single NUL character. But given that initializing m_chBullet to zero in the
XFListLevelBullet ctor was only added recently with
72069675955aaf0b72a7842453347e3e7293f56d "coverity#738770: Unitialized scalar
field," assume that ToXml is supposed to be only called after SetBulletChar has
been called.)
Change-Id: I7a5d7496b038cd094ab11ef8cbc1823ffc5bc130
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
index 933f239..0af56ef 100644
--- a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
+++ b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
@@ -236,7 +236,7 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
aSuffix = aParaNumbering.pSuffix->GetText();
}
- pListStyle->SetListBullet(nPos, LwpSilverBullet::GetNumCharByStyleID(pParaNumber).toChar(),
+ pListStyle->SetListBullet(nPos, LwpSilverBullet::GetNumCharByStyleID(pParaNumber),
"Times New Roman", aPrefix, aSuffix);
}
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index 89da8d7..3eaae46 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -171,7 +171,7 @@ void LwpSilverBullet::RegisterStyle()
aSuffix = aParaNumbering.pSuffix->GetText();
}
- pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber).toChar(),
+ pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber),
"Times New Roman", aPrefix, aSuffix);
}
@@ -221,11 +221,9 @@ OUString LwpSilverBullet::GetBulletFontName()
* @descr:
* @return: An UChar32 bulle character.
*/
-UChar32 LwpSilverBullet::GetBulletChar()
+OUString LwpSilverBullet::GetBulletChar()
{
- OUString aBulletChar = m_pBulletPara->GetBulletChar();
-
- return aBulletChar.toChar();
+ return m_pBulletPara->GetBulletChar();
}
/**
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx b/lotuswordpro/source/filter/lwpsilverbullet.hxx
index c56f35e..41b2a38 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.hxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx
@@ -107,7 +107,7 @@ public:
inline OUString GetBulletStyleName() const;
- UChar32 GetBulletChar();
+ OUString GetBulletChar();
static OUString GetPrefix() { return OUString(); }
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
index 6e75c94..4cfc34e 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
@@ -118,8 +118,7 @@ void XFListLevelBullet::ToXml(IXFStream *pStrm)
//text:style-name,ignore now.
m_aNumFmt.ToXml(pStrm);
//bullet-char
- OUString bullet(m_chBullet);
- pAttrList->AddAttribute( "text:bullet-char", bullet );
+ pAttrList->AddAttribute( "text:bullet-char", m_chBullet );
pStrm->StartElement( "text:list-level-style-bullet" );
@@ -267,7 +266,7 @@ void XFListStyle::SetListPosition(sal_Int32 level,
}
void XFListStyle::SetListBullet(sal_Int32 level,
- UChar32 bullet,
+ OUString const & bullet,
const OUString& fontname,
const OUString& prefix,
const OUString& suffix
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx
index 422d16c..a280c44 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx
@@ -141,12 +141,11 @@ class XFListLevelBullet : public XFListLevel
{
public:
XFListLevelBullet()
- : m_chBullet(0)
{
m_eListType = enumXFListLevelBullet;
}
- void SetBulletChar(UChar32 ch)
+ void SetBulletChar(OUString const & ch)
{
m_chBullet = ch;
}
@@ -166,7 +165,7 @@ public:
virtual void ToXml(IXFStream *pStrm) SAL_OVERRIDE;
private:
XFNumFmt m_aNumFmt;
- int32_t m_chBullet;
+ OUString m_chBullet;
OUString m_strFontName;
};
@@ -203,7 +202,7 @@ public:
);
void SetListBullet(sal_Int32 level,
- UChar32 bullet_char,
+ OUString const & bullet_char,
const OUString& fontname = "",
const OUString& prefix = "",
const OUString& suffix = ""
commit 4dd62d9cc3cb8d79694cb5c1ba09ccf730d211a5
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:39:46 2015 +0200
Disambiguate needlessly overloaded SvDetachedEventDescriptor::hasByName
Change-Id: I951e95c4c81e7e0b4bfb2246c163809863fedac5
diff --git a/include/svtools/unoevent.hxx b/include/svtools/unoevent.hxx
index 046ae55..1a4ce96 100644
--- a/include/svtools/unoevent.hxx
+++ b/include/svtools/unoevent.hxx
@@ -293,8 +293,7 @@ protected:
/// return true: we have a macro for the event
/// return false: no macro; getByName() will return an empty macro
/// IllegalArgumentException: the event is not supported
- using SvBaseEventDescriptor::hasByName;
- bool hasByName(
+ bool hasById(
const sal_uInt16 nEvent ) const /// item ID of event
throw(
::com::sun::star::lang::IllegalArgumentException);
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index 45046d6..cb113b1 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -497,7 +497,7 @@ void SvDetachedEventDescriptor::getByName(
rMacro = (*aMacros[nIndex]);
}
-bool SvDetachedEventDescriptor::hasByName(
+bool SvDetachedEventDescriptor::hasById(
const sal_uInt16 nEvent ) const /// item ID of event
throw(IllegalArgumentException)
{
@@ -545,7 +545,7 @@ void SvMacroTableEventDescriptor::copyMacrosIntoTable(
for(sal_Int16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; i++)
{
const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
- if (hasByName(nEvent))
+ if (hasById(nEvent))
{
SvxMacro& rMacro = rMacroTable.Insert(nEvent, SvxMacro(sEmpty, sEmpty));
getByName(rMacro, nEvent);
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 1084541..aed1588 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -134,7 +134,7 @@ void SwHyperlinkEventDescriptor::copyMacrosIntoINetFormat(
for(sal_uInt16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; ++i)
{
const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
- if (hasByName(nEvent))
+ if (hasById(nEvent))
{
SvxMacro aMacro(sEmpty, sEmpty);
getByName(aMacro, nEvent);
commit f2a0e4032734d6be635f14ade3dea499c29ec6c2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:20:55 2015 +0200
Don't truncate a UTF-32 code point to a UTF-16 code unit
Change-Id: Ie332b3d088547f6bcc676471182420766ecfedca
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 29adfab..bb8ea71 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -1216,7 +1216,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
{
incErrorStr( "Error: failed to extract full date acceptance pattern: %s\n", aPattern);
fprintf( stderr, " with DateSeparator '%s' from FormatCode '%s' (formatindex=\"%d\")\n",
- OSTR( OUString( cDateSep)), OSTR( sTheDateEditFormat),
+ OSTR( OUString(&cDateSep, 1)), OSTR( sTheDateEditFormat),
(int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY);
}
else
@@ -1224,7 +1224,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
fprintf( stderr, "Generated date acceptance pattern: '%s' from '%s' (formatindex=\"%d\" and defined DateSeparator '%s')\n",
OSTR( aPattern), OSTR( sTheDateEditFormat),
(int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY,
- OSTR( OUString( cDateSep)));
+ OSTR( OUString(&cDateSep, 1)));
// Insert at front so full date pattern is first in checks.
theDateAcceptancePatterns.insert( theDateAcceptancePatterns.begin(), aPattern);
}
@@ -1235,7 +1235,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
{
incErrorStr( "Error: failed to extract 2nd date acceptance pattern: %s\n", aPattern2);
fprintf( stderr, " with DateSeparator '%s' from FormatCode '%s' (formatindex=\"%d\")\n",
- OSTR( OUString( cDateSep2)), OSTR( sTheDateEditFormat),
+ OSTR( OUString(&cDateSep2, 1)), OSTR( sTheDateEditFormat),
(int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY);
}
else
commit bd204222480e97717287cffcbfa9dc98f4852f27
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:19:05 2015 +0200
Disambiguate needlessly overloaded OGridControlModel::createColumn
Change-Id: Ie12370fbd0b1d5aaacd56d6e21de29b6134d9741
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 6b74092..81f923d 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -318,9 +318,9 @@ Reference<XPropertySet> SAL_CALL OGridControlModel::createColumn(const OUString&
{
SolarMutexGuard g;
const Sequence< OUString >& rColumnTypes = frm::getColumnTypes();
- return createColumn( ::detail::findPos( ColumnType, rColumnTypes ) );
+ return createColumnById( ::detail::findPos( ColumnType, rColumnTypes ) );
}
-Reference<XPropertySet> OGridControlModel::createColumn(sal_Int32 nTypeId) const
+Reference<XPropertySet> OGridControlModel::createColumnById(sal_Int32 nTypeId) const
{
Reference<XPropertySet> xReturn;
switch (nTypeId)
@@ -880,7 +880,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t
// reading the model names
OUString sModelName;
_rxInStream >> sModelName;
- Reference<XPropertySet> xCol(createColumn(getColumnTypeByModelName(sModelName)));
+ Reference<XPropertySet> xCol(createColumnById(getColumnTypeByModelName(sModelName)));
DBG_ASSERT(xCol.is(), "OGridControlModel::read : unknown column type !");
sal_Int32 nObjLen = _rxInStream->readLong();
if (nObjLen)
diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx
index a2f7d47..a5ed51e 100644
--- a/forms/source/component/Grid.hxx
+++ b/forms/source/component/Grid.hxx
@@ -182,7 +182,7 @@ protected:
ElementDescription* _pElement
) SAL_OVERRIDE;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> createColumn(sal_Int32 nTypeId) const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> createColumnById(sal_Int32 nTypeId) const;
static OGridColumn* getColumnImplementation(const InterfaceRef& _rxIFace);
commit 2e488d7bd3b71e588cd1862a56c489dd7070474c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:16:41 2015 +0200
All uses of LINE_SEP are fine with a char literal
Change-Id: I057c2d346be6a6775f01a3a32edd4fc8224271a5
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 4866523..bad7347 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -74,7 +74,7 @@
#define GETCRSR_ENDOFLINE 0x0004
#define GETCRSR_PREFERPORTIONSTART 0x0008
-#define LINE_SEP 0x0A
+#define LINE_SEP '\x0A'
class EditView;
class EditEngine;
commit e46e8d19458fd64ff20b1013e5eeabd07e62379c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 10:11:31 2015 +0200
Shall this produce a string representation of a number?
On the one hand, the code had apparently treated nIdx as a sal_Unicode character
value ever since its inception in e718950884fa2db240822e1711f301b39a70ad3e "new
querydesign." On the other hand, the preceding BROW_VIS_ROW case does produce
strings "0" and "1".
Change-Id: Ife6e98ba32146cc469b722fa4f013c12152b5505
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 64ecc68..954638d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2245,7 +2245,7 @@ OUString OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 n
sal_Int32 nIdx = m_pOrderCell->GetSelectEntryPos();
if (nIdx == LISTBOX_ENTRY_NOTFOUND)
nIdx = 0;
- return OUString(nIdx);
+ return OUString::number(nIdx);
}
default:
return GetCellText(nCellIndex, nColId);
commit fa1d3e093208c9d7a8e645566f538573f31b4762
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 09:39:27 2015 +0200
Use explicit OUString::copy(0, 1) rather than odd OUString::getChar
...on a string potentially of length > 1
Change-Id: Ibdb8c3bb6e1630883069ff7dd17161014548ee76
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index ad9ed8b..788ce72 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -380,7 +380,8 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit )
while ((unsigned)sShortName.getLength() < nInits)
sShortName += OUString(' ');
OUString sName = pEdit->GetText();
- OUString sLetter = OUString(sName.getLength() ? sName.toChar() : ' ');
+ OUString sLetter = sName.isEmpty()
+ ? OUString(sal_Unicode(' ')) : sName.copy(0, 1);
rShortName.pEdit->SetText(sShortName.replaceAt(nField, 1, sLetter).trim());
}
return 0;
commit 80062928084abf0cdf506dbe744fb1187006c0ab
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 19 09:37:36 2015 +0200
These values shall be of type sal_Unicode
Change-Id: I505400d539c36744a5ac138e63346a2a38f07b51
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index aeb1dcf..cd8be00 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -34,173 +34,170 @@ inline bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar &&
sal_Unicode ConvertMathToMathML( sal_Unicode cChar );
-// enum definitions for characters from the 'StarSymbol' font
+// definitions for characters from the 'StarSymbol' font
// (some chars have more than one alias!)
//! Note: not listed here does not(!) mean "not used"
//! (see %alpha ... %gamma for example)
-enum MathSymbol
-{
- MS_FACT = (sal_Unicode) 0x0021,
- MS_INFINITY = (sal_Unicode) 0x221E,
- MS_SLASH = (sal_Unicode) 0x002F,
-
- MS_NDIVIDES = (sal_Unicode) 0x2224,
- MS_DRARROW = (sal_Unicode) 0x21D2,
- MS_DLARROW = (sal_Unicode) 0x21D0,
- MS_DLRARROW = (sal_Unicode) 0x21D4,
- MS_OVERBRACE = (sal_Unicode) 0x23DE,
- MS_UNDERBRACE = (sal_Unicode) 0x23DF,
- MS_CIRC = (sal_Unicode) 0x2218,
- MS_ASSIGN = (sal_Unicode) 0x003D,
- MS_ERROR = (sal_Unicode) 0x00BF,
-
- MS_NEQ = (sal_Unicode) 0x2260,
- MS_PLUS = (sal_Unicode) 0x002B,
- MS_MINUS = (sal_Unicode) 0x2212,
- MS_MULTIPLY = (sal_Unicode) 0x2217,
- MS_TIMES = (sal_Unicode) 0x00D7,
- MS_CDOT = (sal_Unicode) 0x22C5,
- MS_DIV = (sal_Unicode) 0x00F7,
- MS_PLUSMINUS = (sal_Unicode) 0x00B1,
- MS_MINUSPLUS = (sal_Unicode) 0x2213,
- MS_OPLUS = (sal_Unicode) 0x2295,
- MS_OMINUS = (sal_Unicode) 0x2296,
- MS_OTIMES = (sal_Unicode) 0x2297,
- MS_ODIVIDE = (sal_Unicode) 0x2298,
- MS_ODOT = (sal_Unicode) 0x2299,
- MS_UNION = (sal_Unicode) 0x222A,
- MS_INTERSECT = (sal_Unicode) 0x2229,
-
- MS_LT = (sal_Unicode) 0x003C,
- MS_GT = (sal_Unicode) 0x003E,
- MS_LE = (sal_Unicode) 0x2264,
- MS_GE = (sal_Unicode) 0x2265,
- MS_LESLANT = (sal_Unicode) 0x2A7D,
- MS_GESLANT = (sal_Unicode) 0x2A7E,
- MS_LL = (sal_Unicode) 0x226A,
- MS_GG = (sal_Unicode) 0x226B,
- MS_SIM = (sal_Unicode) 0x223C,
- MS_SIMEQ = (sal_Unicode) 0x2243,
- MS_APPROX = (sal_Unicode) 0x2248,
- MS_DEF = (sal_Unicode) 0x225D,
- MS_EQUIV = (sal_Unicode) 0x2261,
- MS_PROP = (sal_Unicode) 0x221D,
- MS_PARTIAL = (sal_Unicode) 0x2202,
-
- MS_SUBSET = (sal_Unicode) 0x2282,
- MS_SUPSET = (sal_Unicode) 0x2283,
- MS_SUBSETEQ = (sal_Unicode) 0x2286,
- MS_SUPSETEQ = (sal_Unicode) 0x2287,
- MS_NSUBSET = (sal_Unicode) 0x2284,
- MS_NSUPSET = (sal_Unicode) 0x2285,
- MS_NSUBSETEQ = (sal_Unicode) 0x2288,
- MS_NSUPSETEQ = (sal_Unicode) 0x2289,
- MS_IN = (sal_Unicode) 0x2208,
- MS_NOTIN = (sal_Unicode) 0x2209,
- MS_EXISTS = (sal_Unicode) 0x2203,
- MS_NOTEXISTS = (sal_Unicode) 0x2204,
- MS_BACKEPSILON = (sal_Unicode) 0x220D,
- MS_ALEPH = (sal_Unicode) 0x2135,
- MS_IM = (sal_Unicode) 0x2111,
- MS_RE = (sal_Unicode) 0x211C,
- MS_WP = (sal_Unicode) 0x2118,
-
- MS_LINE = (sal_Unicode) 0x2223,
- MS_VERTLINE = (sal_Unicode) 0x007C,
- MS_DLINE = (sal_Unicode) 0x2225,
- MS_DVERTLINE = (sal_Unicode) 0x2016,
- MS_ORTHO = (sal_Unicode) 0x22A5,
- MS_DOTSLOW = (sal_Unicode) 0x2026,
- MS_DOTSAXIS = (sal_Unicode) 0x22EF,
- MS_DOTSVERT = (sal_Unicode) 0x22EE,
- MS_DOTSUP = (sal_Unicode) 0x22F0,
- MS_DOTSDOWN = (sal_Unicode) 0x22F1,
- MS_TRANSR = (sal_Unicode) 0x22B6,
- MS_TRANSL = (sal_Unicode) 0x22B7,
- MS_BACKSLASH = (sal_Unicode) 0x2216,
- MS_NEG = (sal_Unicode) 0x00AC,
-
- MS_FORALL = (sal_Unicode) 0x2200,
- MS_NABLA = (sal_Unicode) 0x2207,
- MS_PROD = (sal_Unicode) 0x220F,
- MS_COPROD = (sal_Unicode) 0x2210,
- MS_SUM = (sal_Unicode) 0x2211,
- MS_SQRT = (sal_Unicode) 0x221A,
- MS_INT = (sal_Unicode) 0x222B,
- MS_IINT = (sal_Unicode) 0x222C,
- MS_IIINT = (sal_Unicode) 0x222D,
- MS_LINT = (sal_Unicode) 0x222E,
- MS_LLINT = (sal_Unicode) 0x222F,
- MS_LLLINT = (sal_Unicode) 0x2230,
-
- MS_GRAVE = (sal_Unicode) 0x0060,
- MS_COMBGRAVE = (sal_Unicode) 0x0300,
- MS_ACUTE = (sal_Unicode) 0x00B4,
- MS_COMBACUTE = (sal_Unicode) 0x0301,
- MS_HAT = (sal_Unicode) 0x005E,
- MS_COMBHAT = (sal_Unicode) 0x0302,
- MS_TILDE = (sal_Unicode) 0x007E,
- MS_COMBTILDE = (sal_Unicode) 0x0303,
- MS_BAR = (sal_Unicode) 0x00AF,
- MS_COMBBAR = (sal_Unicode) 0x0304,
- MS_BREVE = (sal_Unicode) 0x02D8,
- MS_COMBBREVE = (sal_Unicode) 0x0306,
- MS_CIRCLE = (sal_Unicode) 0x02DA,
- MS_COMBCIRCLE = (sal_Unicode) 0x030A,
- MS_CHECK = (sal_Unicode) 0x02C7,
- MS_COMBCHECK = (sal_Unicode) 0x030C,
- MS_VEC = (sal_Unicode) 0x20D7,
- MS_DOT = (sal_Unicode) 0x02D9,
- MS_DDOT = (sal_Unicode) 0x00A8,
- MS_DDDOT = (sal_Unicode) 0x20DB,
- MS_AND = (sal_Unicode) 0x2227,
- MS_OR = (sal_Unicode) 0x2228,
- MS_NI = (sal_Unicode) 0x220B,
- MS_EMPTYSET = (sal_Unicode) 0x2205,
-
- MS_LPARENT = (sal_Unicode) 0x0028,
- MS_RPARENT = (sal_Unicode) 0x0029,
- MS_LBRACKET = (sal_Unicode) 0x005B,
- MS_RBRACKET = (sal_Unicode) 0x005D,
- MS_LBRACE = (sal_Unicode) 0x007B,
- MS_RBRACE = (sal_Unicode) 0x007D,
- MS_LCEIL = (sal_Unicode) 0x2308,
- MS_RCEIL = (sal_Unicode) 0x2309,
- MS_LFLOOR = (sal_Unicode) 0x230A,
- MS_RFLOOR = (sal_Unicode) 0x230B,
- MS_LANGLE = (sal_Unicode) 0x2329,
- MS_RANGLE = (sal_Unicode) 0x232A,
- MS_LDBRACKET = (sal_Unicode) 0x27E6,
- MS_RDBRACKET = (sal_Unicode) 0x27E7,
- MS_LMATHANGLE = (sal_Unicode) 0x27E8,
- MS_RMATHANGLE = (sal_Unicode) 0x27E9,
-
- MS_PLACE = (sal_Unicode) 0x2751,
-
- MS_LAMBDABAR = (sal_Unicode) 0x019B,
- MS_HBAR = (sal_Unicode) 0x210F,
- MS_LEFTARROW = (sal_Unicode) 0x2190,
- MS_UPARROW = (sal_Unicode) 0x2191,
- MS_RIGHTARROW = (sal_Unicode) 0x2192,
- MS_DOWNARROW = (sal_Unicode) 0x2193,
- MS_SETN = (sal_Unicode) 0x2115,
- MS_SETZ = (sal_Unicode) 0x2124,
- MS_SETQ = (sal_Unicode) 0x211A,
- MS_SETR = (sal_Unicode) 0x211D,
- MS_SETC = (sal_Unicode) 0x2102,
-
- MS_PERCENT = (sal_Unicode) 0x0025,
-
- MS_PRECEDES = (sal_Unicode) 0x227A,
- MS_PRECEDESEQUAL= (sal_Unicode) 0x227C,
- MS_PRECEDESEQUIV= (sal_Unicode) 0x227E,
- MS_SUCCEEDS = (sal_Unicode) 0x227B,
- MS_SUCCEEDSEQUAL= (sal_Unicode) 0x227D,
- MS_SUCCEEDSEQUIV= (sal_Unicode) 0x227F,
- MS_NOTPRECEDES = (sal_Unicode) 0x2280,
- MS_NOTSUCCEEDS = (sal_Unicode) 0x2281,
-};
+sal_Unicode const MS_FACT = 0x0021;
+sal_Unicode const MS_INFINITY = 0x221E;
+sal_Unicode const MS_SLASH = 0x002F;
+
+sal_Unicode const MS_NDIVIDES = 0x2224;
+sal_Unicode const MS_DRARROW = 0x21D2;
+sal_Unicode const MS_DLARROW = 0x21D0;
+sal_Unicode const MS_DLRARROW = 0x21D4;
+sal_Unicode const MS_OVERBRACE = 0x23DE;
+sal_Unicode const MS_UNDERBRACE = 0x23DF;
+sal_Unicode const MS_CIRC = 0x2218;
+sal_Unicode const MS_ASSIGN = 0x003D;
+sal_Unicode const MS_ERROR = 0x00BF;
+
+sal_Unicode const MS_NEQ = 0x2260;
+sal_Unicode const MS_PLUS = 0x002B;
+sal_Unicode const MS_MINUS = 0x2212;
+sal_Unicode const MS_MULTIPLY = 0x2217;
+sal_Unicode const MS_TIMES = 0x00D7;
+sal_Unicode const MS_CDOT = 0x22C5;
+sal_Unicode const MS_DIV = 0x00F7;
+sal_Unicode const MS_PLUSMINUS = 0x00B1;
+sal_Unicode const MS_MINUSPLUS = 0x2213;
+sal_Unicode const MS_OPLUS = 0x2295;
+sal_Unicode const MS_OMINUS = 0x2296;
+sal_Unicode const MS_OTIMES = 0x2297;
+sal_Unicode const MS_ODIVIDE = 0x2298;
+sal_Unicode const MS_ODOT = 0x2299;
+sal_Unicode const MS_UNION = 0x222A;
+sal_Unicode const MS_INTERSECT = 0x2229;
+
+sal_Unicode const MS_LT = 0x003C;
+sal_Unicode const MS_GT = 0x003E;
+sal_Unicode const MS_LE = 0x2264;
+sal_Unicode const MS_GE = 0x2265;
+sal_Unicode const MS_LESLANT = 0x2A7D;
+sal_Unicode const MS_GESLANT = 0x2A7E;
+sal_Unicode const MS_LL = 0x226A;
+sal_Unicode const MS_GG = 0x226B;
+sal_Unicode const MS_SIM = 0x223C;
+sal_Unicode const MS_SIMEQ = 0x2243;
+sal_Unicode const MS_APPROX = 0x2248;
+sal_Unicode const MS_DEF = 0x225D;
+sal_Unicode const MS_EQUIV = 0x2261;
+sal_Unicode const MS_PROP = 0x221D;
+sal_Unicode const MS_PARTIAL = 0x2202;
+
+sal_Unicode const MS_SUBSET = 0x2282;
+sal_Unicode const MS_SUPSET = 0x2283;
+sal_Unicode const MS_SUBSETEQ = 0x2286;
+sal_Unicode const MS_SUPSETEQ = 0x2287;
+sal_Unicode const MS_NSUBSET = 0x2284;
+sal_Unicode const MS_NSUPSET = 0x2285;
+sal_Unicode const MS_NSUBSETEQ = 0x2288;
+sal_Unicode const MS_NSUPSETEQ = 0x2289;
+sal_Unicode const MS_IN = 0x2208;
+sal_Unicode const MS_NOTIN = 0x2209;
+sal_Unicode const MS_EXISTS = 0x2203;
+sal_Unicode const MS_NOTEXISTS = 0x2204;
+sal_Unicode const MS_BACKEPSILON = 0x220D;
+sal_Unicode const MS_ALEPH = 0x2135;
+sal_Unicode const MS_IM = 0x2111;
+sal_Unicode const MS_RE = 0x211C;
+sal_Unicode const MS_WP = 0x2118;
+
+sal_Unicode const MS_LINE = 0x2223;
+sal_Unicode const MS_VERTLINE = 0x007C;
+sal_Unicode const MS_DLINE = 0x2225;
+sal_Unicode const MS_DVERTLINE = 0x2016;
+sal_Unicode const MS_ORTHO = 0x22A5;
+sal_Unicode const MS_DOTSLOW = 0x2026;
+sal_Unicode const MS_DOTSAXIS = 0x22EF;
+sal_Unicode const MS_DOTSVERT = 0x22EE;
+sal_Unicode const MS_DOTSUP = 0x22F0;
+sal_Unicode const MS_DOTSDOWN = 0x22F1;
+sal_Unicode const MS_TRANSR = 0x22B6;
+sal_Unicode const MS_TRANSL = 0x22B7;
+sal_Unicode const MS_BACKSLASH = 0x2216;
+sal_Unicode const MS_NEG = 0x00AC;
+
+sal_Unicode const MS_FORALL = 0x2200;
+sal_Unicode const MS_NABLA = 0x2207;
+sal_Unicode const MS_PROD = 0x220F;
+sal_Unicode const MS_COPROD = 0x2210;
+sal_Unicode const MS_SUM = 0x2211;
+sal_Unicode const MS_SQRT = 0x221A;
+sal_Unicode const MS_INT = 0x222B;
+sal_Unicode const MS_IINT = 0x222C;
+sal_Unicode const MS_IIINT = 0x222D;
+sal_Unicode const MS_LINT = 0x222E;
+sal_Unicode const MS_LLINT = 0x222F;
+sal_Unicode const MS_LLLINT = 0x2230;
+
+sal_Unicode const MS_GRAVE = 0x0060;
+sal_Unicode const MS_COMBGRAVE = 0x0300;
+sal_Unicode const MS_ACUTE = 0x00B4;
+sal_Unicode const MS_COMBACUTE = 0x0301;
+sal_Unicode const MS_HAT = 0x005E;
+sal_Unicode const MS_COMBHAT = 0x0302;
+sal_Unicode const MS_TILDE = 0x007E;
+sal_Unicode const MS_COMBTILDE = 0x0303;
+sal_Unicode const MS_BAR = 0x00AF;
+sal_Unicode const MS_COMBBAR = 0x0304;
+sal_Unicode const MS_BREVE = 0x02D8;
+sal_Unicode const MS_COMBBREVE = 0x0306;
+sal_Unicode const MS_CIRCLE = 0x02DA;
+sal_Unicode const MS_COMBCIRCLE = 0x030A;
+sal_Unicode const MS_CHECK = 0x02C7;
+sal_Unicode const MS_COMBCHECK = 0x030C;
+sal_Unicode const MS_VEC = 0x20D7;
+sal_Unicode const MS_DOT = 0x02D9;
+sal_Unicode const MS_DDOT = 0x00A8;
+sal_Unicode const MS_DDDOT = 0x20DB;
+sal_Unicode const MS_AND = 0x2227;
+sal_Unicode const MS_OR = 0x2228;
+sal_Unicode const MS_NI = 0x220B;
+sal_Unicode const MS_EMPTYSET = 0x2205;
+
+sal_Unicode const MS_LPARENT = 0x0028;
+sal_Unicode const MS_RPARENT = 0x0029;
+sal_Unicode const MS_LBRACKET = 0x005B;
+sal_Unicode const MS_RBRACKET = 0x005D;
+sal_Unicode const MS_LBRACE = 0x007B;
+sal_Unicode const MS_RBRACE = 0x007D;
+sal_Unicode const MS_LCEIL = 0x2308;
+sal_Unicode const MS_RCEIL = 0x2309;
+sal_Unicode const MS_LFLOOR = 0x230A;
+sal_Unicode const MS_RFLOOR = 0x230B;
+sal_Unicode const MS_LANGLE = 0x2329;
+sal_Unicode const MS_RANGLE = 0x232A;
+sal_Unicode const MS_LDBRACKET = 0x27E6;
+sal_Unicode const MS_RDBRACKET = 0x27E7;
+sal_Unicode const MS_LMATHANGLE = 0x27E8;
+sal_Unicode const MS_RMATHANGLE = 0x27E9;
+
+sal_Unicode const MS_PLACE = 0x2751;
+
+sal_Unicode const MS_LAMBDABAR = 0x019B;
+sal_Unicode const MS_HBAR = 0x210F;
+sal_Unicode const MS_LEFTARROW = 0x2190;
+sal_Unicode const MS_UPARROW = 0x2191;
+sal_Unicode const MS_RIGHTARROW = 0x2192;
+sal_Unicode const MS_DOWNARROW = 0x2193;
+sal_Unicode const MS_SETN = 0x2115;
+sal_Unicode const MS_SETZ = 0x2124;
+sal_Unicode const MS_SETQ = 0x211A;
+sal_Unicode const MS_SETR = 0x211D;
+sal_Unicode const MS_SETC = 0x2102;
+
+sal_Unicode const MS_PERCENT = 0x0025;
+
+sal_Unicode const MS_PRECEDES = 0x227A;
+sal_Unicode const MS_PRECEDESEQUAL = 0x227C;
+sal_Unicode const MS_PRECEDESEQUIV = 0x227E;
+sal_Unicode const MS_SUCCEEDS = 0x227B;
+sal_Unicode const MS_SUCCEEDSEQUAL = 0x227D;
+sal_Unicode const MS_SUCCEEDSEQUIV = 0x227F;
+sal_Unicode const MS_NOTPRECEDES = 0x2280;
+sal_Unicode const MS_NOTSUCCEEDS = 0x2281;
#endif
More information about the Libreoffice-commits
mailing list