Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
53acdd29
Kaydet (Commit)
53acdd29
authored
Eki 12, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
XubString->OUString
Change-Id: Ib5f39e099d238b739e0d6b3d92d3f04ee50022fb
üst
a551cad4
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
123 additions
and
137 deletions
+123
-137
outlobj.hxx
editeng/inc/editeng/outlobj.hxx
+6
-3
svxfont.hxx
editeng/inc/editeng/svxfont.hxx
+1
-1
svxfont.cxx
editeng/source/items/svxfont.cxx
+12
-12
outlobj.cxx
editeng/source/outliner/outlobj.cxx
+6
-3
dialog.hxx
starmath/inc/dialog.hxx
+14
-14
symbol.hxx
starmath/inc/symbol.hxx
+20
-36
cfgitem.cxx
starmath/source/cfgitem.cxx
+1
-1
dialog.cxx
starmath/source/dialog.cxx
+42
-46
node.cxx
starmath/source/node.cxx
+1
-1
symbol.cxx
starmath/source/symbol.cxx
+20
-20
No files found.
editeng/inc/editeng/outlobj.hxx
Dosyayı görüntüle @
53acdd29
...
@@ -78,9 +78,12 @@ public:
...
@@ -78,9 +78,12 @@ public:
void
ClearPortionInfo
();
void
ClearPortionInfo
();
// StyleSheet support
// StyleSheet support
bool
ChangeStyleSheets
(
const
XubString
&
rOldName
,
SfxStyleFamily
eOldFamily
,
const
XubString
&
rNewName
,
SfxStyleFamily
eNewFamily
);
bool
ChangeStyleSheets
(
const
OUString
&
rOldName
,
SfxStyleFamily
eOldFamily
,
void
ChangeStyleSheetName
(
SfxStyleFamily
eFamily
,
const
XubString
&
rOldName
,
const
XubString
&
rNewName
);
const
OUString
&
rNewName
,
SfxStyleFamily
eNewFamily
);
void
SetStyleSheets
(
sal_uInt16
nLevel
,
const
XubString
rNewName
,
const
SfxStyleFamily
&
rNewFamily
);
void
ChangeStyleSheetName
(
SfxStyleFamily
eFamily
,
const
OUString
&
rOldName
,
const
OUString
&
rNewName
);
void
SetStyleSheets
(
sal_uInt16
nLevel
,
const
OUString
rNewName
,
const
SfxStyleFamily
&
rNewFamily
);
};
};
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
...
...
editeng/inc/editeng/svxfont.hxx
Dosyayı görüntüle @
53acdd29
...
@@ -82,7 +82,7 @@ public:
...
@@ -82,7 +82,7 @@ public:
inline
sal_Bool
IsEsc
()
const
{
return
0
!=
nEsc
;
}
inline
sal_Bool
IsEsc
()
const
{
return
0
!=
nEsc
;
}
// Consider Upper case, Lower case letters etc.
// Consider Upper case, Lower case letters etc.
String
CalcCaseMap
(
const
String
&
rTxt
)
const
;
OUString
CalcCaseMap
(
const
OUString
&
rTxt
)
const
;
// The following section is not needed by anyone, so it can be excluded.
// The following section is not needed by anyone, so it can be excluded.
#ifndef REDUCEDSVXFONT
#ifndef REDUCEDSVXFONT
...
...
editeng/source/items/svxfont.cxx
Dosyayı görüntüle @
53acdd29
...
@@ -110,10 +110,11 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
...
@@ -110,10 +110,11 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
}
}
XubString
SvxFont
::
CalcCaseMap
(
const
XubString
&
rTxt
)
const
OUString
SvxFont
::
CalcCaseMap
(
const
OUString
&
rTxt
)
const
{
{
if
(
!
IsCaseMap
()
||
!
rTxt
.
Len
()
)
return
rTxt
;
if
(
!
IsCaseMap
()
||
rTxt
.
isEmpty
())
XubString
aTxt
(
rTxt
);
return
rTxt
;
OUString
aTxt
(
rTxt
);
// I still have to get the language
// I still have to get the language
const
LanguageType
eLng
=
LANGUAGE_DONTKNOW
==
eLang
const
LanguageType
eLng
=
LANGUAGE_DONTKNOW
==
eLang
?
LANGUAGE_SYSTEM
:
eLang
;
?
LANGUAGE_SYSTEM
:
eLang
;
...
@@ -139,21 +140,20 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
...
@@ -139,21 +140,20 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
// Every beginning of a word is capitalized, the rest of the word
// Every beginning of a word is capitalized, the rest of the word
// is taken over as is.
// is taken over as is.
// Bug: if the attribute starts in the middle of the word.
// Bug: if the attribute starts in the middle of the word.
sal_Bool
bBlank
=
sal_T
rue
;
bool
bBlank
=
t
rue
;
for
(
sal_uInt16
i
=
0
;
i
<
aTxt
.
Len
();
++
i
)
for
(
sal_Int32
i
=
0
;
i
<
aTxt
.
getLength
();
++
i
)
{
{
if
(
sal_Unicode
(
' '
)
==
aTxt
.
GetChar
(
i
)
||
sal_Unicode
(
'\t'
)
==
aTxt
.
GetChar
(
i
)
)
if
(
aTxt
[
i
]
==
' '
||
aTxt
[
i
]
==
'\t'
)
bBlank
=
sal_T
rue
;
bBlank
=
t
rue
;
else
else
{
{
if
(
bBlank
)
if
(
bBlank
)
{
{
rtl
::
OUString
aTemp
(
aTxt
.
GetChar
(
i
));
OUString
sTitle
(
aCharClass
.
uppercase
(
OUString
(
aTxt
[
i
])));
aTemp
=
aCharClass
.
uppercase
(
aTemp
);
aTxt
=
aTxt
.
replaceAt
(
i
,
1
,
sTitle
);
aTxt
.
Replace
(
i
,
1
,
aTemp
);
}
}
bBlank
=
sal_F
alse
;
bBlank
=
f
alse
;
}
}
}
}
break
;
break
;
...
...
editeng/source/outliner/outlobj.cxx
Dosyayı görüntüle @
53acdd29
...
@@ -240,19 +240,22 @@ void OutlinerParaObject::ClearPortionInfo()
...
@@ -240,19 +240,22 @@ void OutlinerParaObject::ClearPortionInfo()
mpImplOutlinerParaObject
->
mpEditTextObject
->
ClearPortionInfo
();
mpImplOutlinerParaObject
->
mpEditTextObject
->
ClearPortionInfo
();
}
}
bool
OutlinerParaObject
::
ChangeStyleSheets
(
const
XubString
&
rOldName
,
SfxStyleFamily
eOldFamily
,
const
XubString
&
rNewName
,
SfxStyleFamily
eNewFamily
)
bool
OutlinerParaObject
::
ChangeStyleSheets
(
const
OUString
&
rOldName
,
SfxStyleFamily
eOldFamily
,
const
OUString
&
rNewName
,
SfxStyleFamily
eNewFamily
)
{
{
ImplMakeUnique
();
ImplMakeUnique
();
return
mpImplOutlinerParaObject
->
mpEditTextObject
->
ChangeStyleSheets
(
rOldName
,
eOldFamily
,
rNewName
,
eNewFamily
);
return
mpImplOutlinerParaObject
->
mpEditTextObject
->
ChangeStyleSheets
(
rOldName
,
eOldFamily
,
rNewName
,
eNewFamily
);
}
}
void
OutlinerParaObject
::
ChangeStyleSheetName
(
SfxStyleFamily
eFamily
,
const
XubString
&
rOldName
,
const
XubString
&
rNewName
)
void
OutlinerParaObject
::
ChangeStyleSheetName
(
SfxStyleFamily
eFamily
,
const
OUString
&
rOldName
,
const
OUString
&
rNewName
)
{
{
ImplMakeUnique
();
ImplMakeUnique
();
mpImplOutlinerParaObject
->
mpEditTextObject
->
ChangeStyleSheetName
(
eFamily
,
rOldName
,
rNewName
);
mpImplOutlinerParaObject
->
mpEditTextObject
->
ChangeStyleSheetName
(
eFamily
,
rOldName
,
rNewName
);
}
}
void
OutlinerParaObject
::
SetStyleSheets
(
sal_uInt16
nLevel
,
const
XubString
rNewName
,
const
SfxStyleFamily
&
rNewFamily
)
void
OutlinerParaObject
::
SetStyleSheets
(
sal_uInt16
nLevel
,
const
OUString
rNewName
,
const
SfxStyleFamily
&
rNewFamily
)
{
{
const
sal_uInt32
nCount
(
mpImplOutlinerParaObject
->
maParagraphDataVector
.
size
());
const
sal_uInt32
nCount
(
mpImplOutlinerParaObject
->
maParagraphDataVector
.
size
());
...
...
starmath/inc/dialog.hxx
Dosyayı görüntüle @
53acdd29
...
@@ -44,7 +44,7 @@ class SubsetMap;
...
@@ -44,7 +44,7 @@ class SubsetMap;
/**************************************************************************/
/**************************************************************************/
void
SetFontStyle
(
const
Xub
String
&
rStyleName
,
Font
&
rFont
);
void
SetFontStyle
(
const
OU
String
&
rStyleName
,
Font
&
rFont
);
/**************************************************************************/
/**************************************************************************/
...
@@ -382,7 +382,7 @@ public:
...
@@ -382,7 +382,7 @@ public:
SmSymbolManager
&
rSymbolMgr
,
SmViewShell
&
rViewShell
,
bool
bFreeRes
=
true
);
SmSymbolManager
&
rSymbolMgr
,
SmViewShell
&
rViewShell
,
bool
bFreeRes
=
true
);
virtual
~
SmSymbolDialog
();
virtual
~
SmSymbolDialog
();
bool
SelectSymbolSet
(
const
Xub
String
&
rSymbolSetName
);
bool
SelectSymbolSet
(
const
OU
String
&
rSymbolSetName
);
void
SelectSymbol
(
sal_uInt16
nSymbolPos
);
void
SelectSymbol
(
sal_uInt16
nSymbolPos
);
sal_uInt16
GetSelectedSymbol
()
const
{
return
aSymbolSetDisplay
.
GetSelectSymbol
();
}
sal_uInt16
GetSelectedSymbol
()
const
{
return
aSymbolSetDisplay
.
GetSelectSymbol
();
}
};
};
...
@@ -462,16 +462,16 @@ class SmSymDefineDialog : public ModalDialog
...
@@ -462,16 +462,16 @@ class SmSymDefineDialog : public ModalDialog
void
FillStyles
(
bool
bDeleteText
=
true
);
void
FillStyles
(
bool
bDeleteText
=
true
);
void
SetSymbolSetManager
(
const
SmSymbolManager
&
rMgr
);
void
SetSymbolSetManager
(
const
SmSymbolManager
&
rMgr
);
void
SetFont
(
const
XubString
&
rFontName
,
const
Xub
String
&
rStyleName
);
void
SetFont
(
const
OUString
&
rFontName
,
const
OU
String
&
rStyleName
);
void
SetOrigSymbol
(
const
SmSym
*
pSymbol
,
const
Xub
String
&
rSymbolSetName
);
void
SetOrigSymbol
(
const
SmSym
*
pSymbol
,
const
OU
String
&
rSymbolSetName
);
void
UpdateButtons
();
void
UpdateButtons
();
bool
SelectSymbolSet
(
ComboBox
&
rComboBox
,
const
Xub
String
&
rSymbolSetName
,
bool
SelectSymbolSet
(
ComboBox
&
rComboBox
,
const
OU
String
&
rSymbolSetName
,
bool
bDeleteText
);
bool
bDeleteText
);
bool
SelectSymbol
(
ComboBox
&
rComboBox
,
const
Xub
String
&
rSymbolName
,
bool
SelectSymbol
(
ComboBox
&
rComboBox
,
const
OU
String
&
rSymbolName
,
bool
bDeleteText
);
bool
bDeleteText
);
bool
SelectFont
(
const
Xub
String
&
rFontName
,
bool
bApplyFont
);
bool
SelectFont
(
const
OU
String
&
rFontName
,
bool
bApplyFont
);
bool
SelectStyle
(
const
Xub
String
&
rStyleName
,
bool
bApplyFont
);
bool
SelectStyle
(
const
OU
String
&
rStyleName
,
bool
bApplyFont
);
SmSym
*
GetSymbol
(
const
ComboBox
&
rComboBox
);
SmSym
*
GetSymbol
(
const
ComboBox
&
rComboBox
);
const
SmSym
*
GetSymbol
(
const
ComboBox
&
rComboBox
)
const
const
SmSym
*
GetSymbol
(
const
ComboBox
&
rComboBox
)
const
...
@@ -492,28 +492,28 @@ public:
...
@@ -492,28 +492,28 @@ public:
// Dialog
// Dialog
virtual
short
Execute
();
virtual
short
Execute
();
bool
SelectOldSymbolSet
(
const
Xub
String
&
rSymbolSetName
)
bool
SelectOldSymbolSet
(
const
OU
String
&
rSymbolSetName
)
{
{
return
SelectSymbolSet
(
aOldSymbolSets
,
rSymbolSetName
,
false
);
return
SelectSymbolSet
(
aOldSymbolSets
,
rSymbolSetName
,
false
);
}
}
bool
SelectOldSymbol
(
const
Xub
String
&
rSymbolName
)
bool
SelectOldSymbol
(
const
OU
String
&
rSymbolName
)
{
{
return
SelectSymbol
(
aOldSymbols
,
rSymbolName
,
false
);
return
SelectSymbol
(
aOldSymbols
,
rSymbolName
,
false
);
}
}
bool
SelectSymbolSet
(
const
Xub
String
&
rSymbolSetName
)
bool
SelectSymbolSet
(
const
OU
String
&
rSymbolSetName
)
{
{
return
SelectSymbolSet
(
aSymbolSets
,
rSymbolSetName
,
false
);
return
SelectSymbolSet
(
aSymbolSets
,
rSymbolSetName
,
false
);
}
}
bool
SelectSymbol
(
const
Xub
String
&
rSymbolName
)
bool
SelectSymbol
(
const
OU
String
&
rSymbolName
)
{
{
return
SelectSymbol
(
aSymbols
,
rSymbolName
,
false
);
return
SelectSymbol
(
aSymbols
,
rSymbolName
,
false
);
}
}
bool
SelectFont
(
const
Xub
String
&
rFontName
)
{
return
SelectFont
(
rFontName
,
true
);
}
bool
SelectFont
(
const
OU
String
&
rFontName
)
{
return
SelectFont
(
rFontName
,
true
);
}
bool
SelectStyle
(
const
Xub
String
&
rStyleName
)
{
return
SelectStyle
(
rStyleName
,
true
);
};
bool
SelectStyle
(
const
OU
String
&
rStyleName
)
{
return
SelectStyle
(
rStyleName
,
true
);
};
void
SelectChar
(
xub_Unicode
cChar
);
void
SelectChar
(
xub_Unicode
cChar
);
};
};
...
...
starmath/inc/symbol.hxx
Dosyayı görüntüle @
53acdd29
...
@@ -40,24 +40,24 @@
...
@@ -40,24 +40,24 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
inline
const
String
GetExportSymbolName
(
const
String
&
rUiSymbolName
)
inline
const
OUString
GetExportSymbolName
(
const
OU
String
&
rUiSymbolName
)
{
{
return
SM_MOD
()
->
GetLocSymbolData
().
GetExportSymbolName
(
rUiSymbolName
);
return
SM_MOD
()
->
GetLocSymbolData
().
GetExportSymbolName
(
rUiSymbolName
);
}
}
inline
const
String
GetUiSymbolName
(
const
String
&
rExportSymbolName
)
inline
const
OUString
GetUiSymbolName
(
const
OU
String
&
rExportSymbolName
)
{
{
return
SM_MOD
()
->
GetLocSymbolData
().
GetUiSymbolName
(
rExportSymbolName
);
return
SM_MOD
()
->
GetLocSymbolData
().
GetUiSymbolName
(
rExportSymbolName
);
}
}
inline
const
String
GetExportSymbolSetName
(
const
String
&
rUiSymbolSetName
)
inline
const
OUString
GetExportSymbolSetName
(
const
OU
String
&
rUiSymbolSetName
)
{
{
return
SM_MOD
()
->
GetLocSymbolData
().
GetExportSymbolSetName
(
rUiSymbolSetName
);
return
SM_MOD
()
->
GetLocSymbolData
().
GetExportSymbolSetName
(
rUiSymbolSetName
);
}
}
inline
const
String
GetUiSymbolSetName
(
const
String
&
rExportSymbolSetName
)
inline
const
OUString
GetUiSymbolSetName
(
const
OU
String
&
rExportSymbolSetName
)
{
{
return
SM_MOD
()
->
GetLocSymbolData
().
GetUiSymbolSetName
(
rExportSymbolSetName
);
return
SM_MOD
()
->
GetLocSymbolData
().
GetUiSymbolSetName
(
rExportSymbolSetName
);
}
}
...
@@ -68,37 +68,33 @@ class SmSym
...
@@ -68,37 +68,33 @@ class SmSym
{
{
private
:
private
:
SmFace
m_aFace
;
SmFace
m_aFace
;
String
m_aName
;
OUString
m_aName
;
String
m_aExportName
;
OUString
m_aExportName
;
String
m_aSetName
;
OUString
m_aSetName
;
sal_UCS4
m_cChar
;
sal_UCS4
m_cChar
;
bool
m_bPredefined
;
bool
m_bPredefined
;
bool
m_bDocSymbol
;
bool
m_bDocSymbol
;
public
:
public
:
SmSym
();
SmSym
();
SmSym
(
const
String
&
rName
,
const
Font
&
rFont
,
sal_UCS4
cChar
,
SmSym
(
const
OU
String
&
rName
,
const
Font
&
rFont
,
sal_UCS4
cChar
,
const
String
&
rSet
,
bool
bIsPredefined
=
false
);
const
OU
String
&
rSet
,
bool
bIsPredefined
=
false
);
SmSym
(
const
SmSym
&
rSymbol
);
SmSym
(
const
SmSym
&
rSymbol
);
SmSym
&
operator
=
(
const
SmSym
&
rSymbol
);
SmSym
&
operator
=
(
const
SmSym
&
rSymbol
);
const
Font
&
GetFace
()
const
{
return
m_aFace
;
}
const
Font
&
GetFace
()
const
{
return
m_aFace
;
}
sal_UCS4
GetCharacter
()
const
{
return
m_cChar
;
}
sal_UCS4
GetCharacter
()
const
{
return
m_cChar
;
}
const
String
&
GetName
()
const
{
return
m_aName
;
}
const
OU
String
&
GetName
()
const
{
return
m_aName
;
}
void
SetFace
(
const
Font
&
rFont
)
{
m_aFace
=
rFont
;
}
void
SetFace
(
const
Font
&
rFont
)
{
m_aFace
=
rFont
;
}
void
SetCharacter
(
sal_UCS4
cChar
)
{
m_cChar
=
cChar
;
}
void
SetCharacter
(
sal_UCS4
cChar
)
{
m_cChar
=
cChar
;
}
//! since the symbol name is also used as key in the map it should not be possible to change the name
//! because ten the key would not be the same as its supposed copy here
// void SetName( const String &rTxt ) { m_aName = rTxt; }
bool
IsPredefined
()
const
{
return
m_bPredefined
;
}
bool
IsPredefined
()
const
{
return
m_bPredefined
;
}
const
String
&
GetSymbolSetName
()
const
{
return
m_aSetName
;
}
const
OUString
&
GetSymbolSetName
()
const
{
return
m_aSetName
;
}
void
SetSymbolSetName
(
const
String
&
rName
)
{
m_aSetName
=
rName
;
}
void
SetSymbolSetName
(
const
OU
String
&
rName
)
{
m_aSetName
=
rName
;
}
const
String
&
GetExportName
()
const
{
return
m_aExportName
;
}
const
OUString
&
GetExportName
()
const
{
return
m_aExportName
;
}
void
SetExportName
(
const
String
&
rName
)
{
m_aExportName
=
rName
;
}
void
SetExportName
(
const
OU
String
&
rName
)
{
m_aExportName
=
rName
;
}
bool
IsDocSymbol
()
const
{
return
m_bDocSymbol
;
}
bool
IsDocSymbol
()
const
{
return
m_bDocSymbol
;
}
void
SetDocSymbol
(
bool
bVal
)
{
m_bDocSymbol
=
bVal
;
}
void
SetDocSymbol
(
bool
bVal
)
{
m_bDocSymbol
=
bVal
;
}
...
@@ -107,20 +103,8 @@ public:
...
@@ -107,20 +103,8 @@ public:
bool
IsEqualInUI
(
const
SmSym
&
rSymbol
)
const
;
bool
IsEqualInUI
(
const
SmSym
&
rSymbol
)
const
;
};
};
/**************************************************************************/
struct
lt_String
{
bool
operator
()(
const
String
&
r1
,
const
String
&
r2
)
const
{
// r1 < r2 ?
return
r1
.
CompareTo
(
r2
)
==
COMPARE_LESS
;
}
};
// type of the actual container to hold the symbols
// type of the actual container to hold the symbols
typedef
std
::
map
<
String
,
SmSym
,
lt_String
>
SymbolMap_t
;
typedef
std
::
map
<
OUString
,
SmSym
>
SymbolMap_t
;
// vector of pointers to the actual symbols in the above container
// vector of pointers to the actual symbols in the above container
typedef
std
::
vector
<
const
SmSym
*
>
SymbolPtrVec_t
;
typedef
std
::
vector
<
const
SmSym
*
>
SymbolPtrVec_t
;
...
@@ -151,16 +135,16 @@ public:
...
@@ -151,16 +135,16 @@ public:
SmSymbolManager
&
operator
=
(
const
SmSymbolManager
&
rSymbolSetManager
);
SmSymbolManager
&
operator
=
(
const
SmSymbolManager
&
rSymbolSetManager
);
// symbol sets are for UI purpose only, thus we assemble them here
// symbol sets are for UI purpose only, thus we assemble them here
std
::
set
<
String
>
GetSymbolSetNames
()
const
;
std
::
set
<
OU
String
>
GetSymbolSetNames
()
const
;
const
SymbolPtrVec_t
GetSymbolSet
(
const
String
&
rSymbolSetName
);
const
SymbolPtrVec_t
GetSymbolSet
(
const
OU
String
&
rSymbolSetName
);
sal_uInt16
GetSymbolCount
()
const
{
return
static_cast
<
sal_uInt16
>
(
m_aSymbols
.
size
());
}
sal_uInt16
GetSymbolCount
()
const
{
return
static_cast
<
sal_uInt16
>
(
m_aSymbols
.
size
());
}
const
SymbolPtrVec_t
GetSymbols
()
const
;
const
SymbolPtrVec_t
GetSymbols
()
const
;
bool
AddOrReplaceSymbol
(
const
SmSym
&
rSymbol
,
bool
bForceChange
=
false
);
bool
AddOrReplaceSymbol
(
const
SmSym
&
rSymbol
,
bool
bForceChange
=
false
);
void
RemoveSymbol
(
const
String
&
rSymbolName
);
void
RemoveSymbol
(
const
OU
String
&
rSymbolName
);
SmSym
*
GetSymbolByName
(
const
String
&
rSymbolName
);
SmSym
*
GetSymbolByName
(
const
OU
String
&
rSymbolName
);
const
SmSym
*
GetSymbolByName
(
const
String
&
rSymbolName
)
const
const
SmSym
*
GetSymbolByName
(
const
OU
String
&
rSymbolName
)
const
{
{
return
((
SmSymbolManager
*
)
this
)
->
GetSymbolByName
(
rSymbolName
);
return
((
SmSymbolManager
*
)
this
)
->
GetSymbolByName
(
rSymbolName
);
}
}
...
...
starmath/source/cfgitem.cxx
Dosyayı görüntüle @
53acdd29
...
@@ -809,7 +809,7 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
...
@@ -809,7 +809,7 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
SmFontFormatList
aUsedList
;
SmFontFormatList
aUsedList
;
for
(
i
=
0
;
i
<
rSymbols
.
size
();
++
i
)
for
(
i
=
0
;
i
<
rSymbols
.
size
();
++
i
)
{
{
OSL_ENSURE
(
rSymbols
[
i
].
GetName
().
Len
()
>
0
,
"non named symbol"
);
OSL_ENSURE
(
rSymbols
[
i
].
GetName
().
getLength
()
>
0
,
"non named symbol"
);
aUsedList
.
GetFontFormatId
(
SmFontFormat
(
rSymbols
[
i
].
GetFace
()
)
,
true
);
aUsedList
.
GetFontFormatId
(
SmFontFormat
(
rSymbols
[
i
].
GetFace
()
)
,
true
);
}
}
const
SmFormat
&
rStdFmt
=
GetStandardFormat
();
const
SmFormat
&
rStdFmt
=
GetStandardFormat
();
...
...
starmath/source/dialog.cxx
Dosyayı görüntüle @
53acdd29
...
@@ -59,18 +59,18 @@ using ::rtl::OUString;
...
@@ -59,18 +59,18 @@ using ::rtl::OUString;
class
SmFontStyles
class
SmFontStyles
{
{
String
aNormal
;
OUString
aNormal
;
String
aBold
;
OUString
aBold
;
String
aItalic
;
OUString
aItalic
;
String
aBoldItalic
;
OUString
aBoldItalic
;
String
aEmpty
;
OUString
aEmpty
;
public
:
public
:
SmFontStyles
();
SmFontStyles
();
sal_uInt16
GetCount
()
const
{
return
4
;
}
sal_uInt16
GetCount
()
const
{
return
4
;
}
const
String
&
GetStyleName
(
const
Font
&
rFont
)
const
;
const
OUString
&
GetStyleName
(
const
Font
&
rFont
)
const
;
const
String
&
GetStyleName
(
sal_uInt16
nIdx
)
const
;
const
OUString
&
GetStyleName
(
sal_uInt16
nIdx
)
const
;
};
};
...
@@ -81,12 +81,12 @@ SmFontStyles::SmFontStyles() :
...
@@ -81,12 +81,12 @@ SmFontStyles::SmFontStyles() :
{
{
aBoldItalic
=
aBold
;
aBoldItalic
=
aBold
;
aBoldItalic
.
AppendAscii
(
", "
)
;
aBoldItalic
+=
", "
;
aBoldItalic
+=
aItalic
;
aBoldItalic
+=
aItalic
;
}
}
const
String
&
SmFontStyles
::
GetStyleName
(
const
Font
&
rFont
)
const
const
OUString
&
SmFontStyles
::
GetStyleName
(
const
Font
&
rFont
)
const
{
{
//! compare also SmSpecialNode::Prepare
//! compare also SmSpecialNode::Prepare
bool
bBold
=
IsBold
(
rFont
),
bool
bBold
=
IsBold
(
rFont
),
...
@@ -98,12 +98,11 @@ const String & SmFontStyles::GetStyleName( const Font &rFont ) const
...
@@ -98,12 +98,11 @@ const String & SmFontStyles::GetStyleName( const Font &rFont ) const
return
aItalic
;
return
aItalic
;
else
if
(
bBold
)
else
if
(
bBold
)
return
aBold
;
return
aBold
;
else
return
aNormal
;
return
aNormal
;
}
}
const
String
&
SmFontStyles
::
GetStyleName
(
sal_uInt16
nIdx
)
const
const
OUString
&
SmFontStyles
::
GetStyleName
(
sal_uInt16
nIdx
)
const
{
{
// 0 = "normal", 1 = "italic",
// 0 = "normal", 1 = "italic",
// 2 = "bold", 3 = "bold italic"
// 2 = "bold", 3 = "bold italic"
...
@@ -130,17 +129,17 @@ const SmFontStyles & GetFontStyles()
...
@@ -130,17 +129,17 @@ const SmFontStyles & GetFontStyles()
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
void
SetFontStyle
(
const
Xub
String
&
rStyleName
,
Font
&
rFont
)
void
SetFontStyle
(
const
OU
String
&
rStyleName
,
Font
&
rFont
)
{
{
// Find index related to StyleName. For an empty StyleName it's assumed to be
// Find index related to StyleName. For an empty StyleName it's assumed to be
// 0 (neither bold nor italic).
// 0 (neither bold nor italic).
sal_uInt16
nIndex
=
0
;
sal_uInt16
nIndex
=
0
;
if
(
rStyleName
.
Len
())
if
(
!
rStyleName
.
isEmpty
())
{
{
sal_uInt16
i
;
sal_uInt16
i
;
const
SmFontStyles
&
rStyles
=
GetFontStyles
();
const
SmFontStyles
&
rStyles
=
GetFontStyles
();
for
(
i
=
0
;
i
<
rStyles
.
GetCount
();
i
++
)
for
(
i
=
0
;
i
<
rStyles
.
GetCount
();
++
i
)
if
(
rStyleName
.
CompareTo
(
rStyles
.
GetStyleName
(
i
)
)
==
COMPARE_EQUAL
)
if
(
rStyleName
==
rStyles
.
GetStyleName
(
i
)
)
break
;
break
;
#if OSL_DEBUG_LEVEL > 1
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE
(
i
<
rStyles
.
GetCount
(),
"style-name unknown"
);
OSL_ENSURE
(
i
<
rStyles
.
GetCount
(),
"style-name unknown"
);
...
@@ -242,7 +241,7 @@ void SmShowFont::Paint(const Rectangle& rRect )
...
@@ -242,7 +241,7 @@ void SmShowFont::Paint(const Rectangle& rRect )
{
{
Control
::
Paint
(
rRect
);
Control
::
Paint
(
rRect
);
Xub
String
Text
(
GetFont
().
GetName
());
OU
String
Text
(
GetFont
().
GetName
());
Size
TextSize
(
GetTextWidth
(
Text
),
GetTextHeight
());
Size
TextSize
(
GetTextWidth
(
Text
),
GetTextHeight
());
DrawText
(
Point
((
GetOutputSize
().
Width
()
-
TextSize
.
Width
())
/
2
,
DrawText
(
Point
((
GetOutputSize
().
Width
()
-
TextSize
.
Width
())
/
2
,
...
@@ -801,10 +800,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpI
...
@@ -801,10 +800,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpI
// HelpIDs which are explicitly set in this way have to be defined in the
// HelpIDs which are explicitly set in this way have to be defined in the
// util directory in the file "hidother.src" with the help of "hidspecial"!
// util directory in the file "hidother.src" with the help of "hidspecial"!
const
XubString
aEmptyText
;
const
OUString
aEmptyText
;
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE
(
aEmptyText
.
Len
()
==
0
,
"Sm: Ooops..."
);
#endif
rField
.
SetHelpId
(
sHelpId
);
rField
.
SetHelpId
(
sHelpId
);
rField
.
SetHelpText
(
aEmptyText
);
rField
.
SetHelpText
(
aEmptyText
);
...
@@ -1360,7 +1356,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect)
...
@@ -1360,7 +1356,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect)
{
{
Control
::
Paint
(
rRect
);
Control
::
Paint
(
rRect
);
const
Xub
String
&
rText
=
GetText
();
const
OU
String
&
rText
=
GetText
();
Size
aTextSize
(
GetTextWidth
(
rText
),
GetTextHeight
());
Size
aTextSize
(
GetTextWidth
(
rText
),
GetTextHeight
());
DrawText
(
Point
((
GetOutputSize
().
Width
()
-
aTextSize
.
Width
())
/
2
,
DrawText
(
Point
((
GetOutputSize
().
Width
()
-
aTextSize
.
Width
())
/
2
,
...
@@ -1407,8 +1403,8 @@ void SmSymbolDialog::FillSymbolSets(bool bDeleteText)
...
@@ -1407,8 +1403,8 @@ void SmSymbolDialog::FillSymbolSets(bool bDeleteText)
if
(
bDeleteText
)
if
(
bDeleteText
)
aSymbolSets
.
SetNoSelection
();
aSymbolSets
.
SetNoSelection
();
std
::
set
<
String
>
aSybolSetNames
(
rSymbolMgr
.
GetSymbolSetNames
()
);
std
::
set
<
OU
String
>
aSybolSetNames
(
rSymbolMgr
.
GetSymbolSetNames
()
);
std
::
set
<
String
>::
const_iterator
aIt
(
aSybolSetNames
.
begin
()
);
std
::
set
<
OU
String
>::
const_iterator
aIt
(
aSybolSetNames
.
begin
()
);
for
(
;
aIt
!=
aSybolSetNames
.
end
();
++
aIt
)
for
(
;
aIt
!=
aSybolSetNames
.
end
();
++
aIt
)
aSymbolSets
.
InsertEntry
(
*
aIt
);
aSymbolSets
.
InsertEntry
(
*
aIt
);
}
}
...
@@ -1447,7 +1443,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
...
@@ -1447,7 +1443,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
SmSymDefineDialog
*
pDialog
=
new
SmSymDefineDialog
(
this
,
pFontListDev
,
rSymbolMgr
);
SmSymDefineDialog
*
pDialog
=
new
SmSymDefineDialog
(
this
,
pFontListDev
,
rSymbolMgr
);
// set current symbol and SymbolSet for the new dialog
// set current symbol and SymbolSet for the new dialog
const
Xub
String
aSymSetName
(
aSymbolSets
.
GetSelectEntry
()),
const
OU
String
aSymSetName
(
aSymbolSets
.
GetSelectEntry
()),
aSymName
(
aSymbolName
.
GetText
());
aSymName
(
aSymbolName
.
GetText
());
pDialog
->
SelectOldSymbolSet
(
aSymSetName
);
pDialog
->
SelectOldSymbolSet
(
aSymSetName
);
pDialog
->
SelectOldSymbol
(
aSymName
);
pDialog
->
SelectOldSymbol
(
aSymName
);
...
@@ -1455,7 +1451,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
...
@@ -1455,7 +1451,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
pDialog
->
SelectSymbol
(
aSymName
);
pDialog
->
SelectSymbol
(
aSymName
);
// remember old SymbolSet
// remember old SymbolSet
Xub
String
aOldSymbolSet
(
aSymbolSets
.
GetSelectEntry
());
OU
String
aOldSymbolSet
(
aSymbolSets
.
GetSelectEntry
());
sal_uInt16
nSymPos
=
GetSelectedSymbol
();
sal_uInt16
nSymPos
=
GetSelectedSymbol
();
...
@@ -1625,7 +1621,7 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
...
@@ -1625,7 +1621,7 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
}
}
bool
SmSymbolDialog
::
SelectSymbolSet
(
const
Xub
String
&
rSymbolSetName
)
bool
SmSymbolDialog
::
SelectSymbolSet
(
const
OU
String
&
rSymbolSetName
)
{
{
bool
bRet
=
false
;
bool
bRet
=
false
;
sal_uInt16
nPos
=
aSymbolSets
.
GetEntryPos
(
rSymbolSetName
);
sal_uInt16
nPos
=
aSymbolSets
.
GetEntryPos
(
rSymbolSetName
);
...
@@ -1663,7 +1659,7 @@ void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
...
@@ -1663,7 +1659,7 @@ void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
aSymbolSetDisplay
.
SelectSymbol
(
nSymbolNo
);
aSymbolSetDisplay
.
SelectSymbol
(
nSymbolNo
);
aSymbolDisplay
.
SetSymbol
(
pSym
);
aSymbolDisplay
.
SetSymbol
(
pSym
);
aSymbolName
.
SetText
(
pSym
?
pSym
->
GetName
()
:
Xub
String
());
aSymbolName
.
SetText
(
pSym
?
pSym
->
GetName
()
:
OU
String
());
}
}
...
@@ -1751,8 +1747,8 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, bool bDeleteText)
...
@@ -1751,8 +1747,8 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, bool bDeleteText)
if
(
bDeleteText
)
if
(
bDeleteText
)
rComboBox
.
SetText
(
rtl
::
OUString
());
rComboBox
.
SetText
(
rtl
::
OUString
());
const
std
::
set
<
String
>
aSymbolSetNames
(
aSymbolMgrCopy
.
GetSymbolSetNames
()
);
const
std
::
set
<
OU
String
>
aSymbolSetNames
(
aSymbolMgrCopy
.
GetSymbolSetNames
()
);
std
::
set
<
String
>::
const_iterator
aIt
(
aSymbolSetNames
.
begin
()
);
std
::
set
<
OU
String
>::
const_iterator
aIt
(
aSymbolSetNames
.
begin
()
);
for
(
;
aIt
!=
aSymbolSetNames
.
end
();
++
aIt
)
for
(
;
aIt
!=
aSymbolSetNames
.
end
();
++
aIt
)
rComboBox
.
InsertEntry
(
*
aIt
);
rComboBox
.
InsertEntry
(
*
aIt
);
}
}
...
@@ -1782,8 +1778,8 @@ void SmSymDefineDialog::FillStyles(bool bDeleteText)
...
@@ -1782,8 +1778,8 @@ void SmSymDefineDialog::FillStyles(bool bDeleteText)
if
(
bDeleteText
)
if
(
bDeleteText
)
aStyles
.
SetText
(
rtl
::
OUString
());
aStyles
.
SetText
(
rtl
::
OUString
());
Xub
String
aText
(
aFonts
.
GetSelectEntry
());
OU
String
aText
(
aFonts
.
GetSelectEntry
());
if
(
aText
.
Len
()
!=
0
)
if
(
!
aText
.
isEmpty
()
)
{
{
// use own StyleNames
// use own StyleNames
const
SmFontStyles
&
rStyles
=
GetFontStyles
();
const
SmFontStyles
&
rStyles
=
GetFontStyles
();
...
@@ -2040,16 +2036,16 @@ void SmSymDefineDialog::UpdateButtons()
...
@@ -2040,16 +2036,16 @@ void SmSymDefineDialog::UpdateButtons()
bool
bAdd
=
false
,
bool
bAdd
=
false
,
bChange
=
false
,
bChange
=
false
,
bDelete
=
false
;
bDelete
=
false
;
Xub
String
aTmpSymbolName
(
aSymbols
.
GetText
()),
OU
String
aTmpSymbolName
(
aSymbols
.
GetText
()),
aTmpSymbolSetName
(
aSymbolSets
.
GetText
());
aTmpSymbolSetName
(
aSymbolSets
.
GetText
());
if
(
aTmpSymbolName
.
Len
()
>
0
&&
aTmpSymbolSetName
.
Len
()
>
0
)
if
(
aTmpSymbolName
.
getLength
()
>
0
&&
aTmpSymbolSetName
.
getLength
()
>
0
)
{
{
// are all settings equal?
// are all settings equal?
//! (Font-, Style- und SymbolSet name comparison is not case sensitive)
//! (Font-, Style- und SymbolSet name comparison is not case sensitive)
bool
bEqual
=
pOrigSymbol
bool
bEqual
=
pOrigSymbol
&&
aTmpSymbolSetName
.
EqualsIgnoreCaseAscii
(
aOldSymbolSetName
.
GetText
())
&&
aTmpSymbolSetName
.
equalsIgnoreAsciiCase
(
aOldSymbolSetName
.
GetText
())
&&
aTmpSymbolName
.
E
quals
(
pOrigSymbol
->
GetName
())
&&
aTmpSymbolName
.
e
quals
(
pOrigSymbol
->
GetName
())
&&
aFonts
.
GetSelectEntry
().
EqualsIgnoreCaseAscii
(
&&
aFonts
.
GetSelectEntry
().
EqualsIgnoreCaseAscii
(
pOrigSymbol
->
GetFace
().
GetName
())
pOrigSymbol
->
GetFace
().
GetName
())
&&
aStyles
.
GetText
().
EqualsIgnoreCaseAscii
(
&&
aStyles
.
GetText
().
EqualsIgnoreCaseAscii
(
...
@@ -2245,7 +2241,7 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
...
@@ -2245,7 +2241,7 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
bool
SmSymDefineDialog
::
SelectSymbolSet
(
ComboBox
&
rComboBox
,
bool
SmSymDefineDialog
::
SelectSymbolSet
(
ComboBox
&
rComboBox
,
const
Xub
String
&
rSymbolSetName
,
bool
bDeleteText
)
const
OU
String
&
rSymbolSetName
,
bool
bDeleteText
)
{
{
#if OSL_DEBUG_LEVEL > 1
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE
(
&
rComboBox
==
&
aOldSymbolSets
||
&
rComboBox
==
&
aSymbolSets
,
OSL_ENSURE
(
&
rComboBox
==
&
aOldSymbolSets
||
&
rComboBox
==
&
aSymbolSets
,
...
@@ -2253,7 +2249,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
...
@@ -2253,7 +2249,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
#endif
#endif
// trim SymbolName (no leading and trailing blanks)
// trim SymbolName (no leading and trailing blanks)
Xub
String
aNormName
(
rSymbolSetName
);
OU
String
aNormName
(
rSymbolSetName
);
aNormName
=
comphelper
::
string
::
stripStart
(
aNormName
,
' '
);
aNormName
=
comphelper
::
string
::
stripStart
(
aNormName
,
' '
);
aNormName
=
comphelper
::
string
::
stripEnd
(
aNormName
,
' '
);
aNormName
=
comphelper
::
string
::
stripEnd
(
aNormName
,
' '
);
// and remove possible deviations within the input
// and remove possible deviations within the input
...
@@ -2283,7 +2279,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
...
@@ -2283,7 +2279,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
// display a valid respectively no symbol when changing the SymbolSets
// display a valid respectively no symbol when changing the SymbolSets
if
(
bIsOld
)
if
(
bIsOld
)
{
{
Xub
String
aTmpOldSymbolName
;
OU
String
aTmpOldSymbolName
;
if
(
aOldSymbols
.
GetEntryCount
()
>
0
)
if
(
aOldSymbols
.
GetEntryCount
()
>
0
)
aTmpOldSymbolName
=
aOldSymbols
.
GetEntry
(
0
);
aTmpOldSymbolName
=
aOldSymbols
.
GetEntry
(
0
);
SelectSymbol
(
aOldSymbols
,
aTmpOldSymbolName
,
true
);
SelectSymbol
(
aOldSymbols
,
aTmpOldSymbolName
,
true
);
...
@@ -2296,13 +2292,13 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
...
@@ -2296,13 +2292,13 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
void
SmSymDefineDialog
::
SetOrigSymbol
(
const
SmSym
*
pSymbol
,
void
SmSymDefineDialog
::
SetOrigSymbol
(
const
SmSym
*
pSymbol
,
const
Xub
String
&
rSymbolSetName
)
const
OU
String
&
rSymbolSetName
)
{
{
// clear old symbol
// clear old symbol
delete
pOrigSymbol
;
delete
pOrigSymbol
;
pOrigSymbol
=
0
;
pOrigSymbol
=
0
;
Xub
String
aSymName
,
OU
String
aSymName
,
aSymSetName
;
aSymSetName
;
if
(
pSymbol
)
if
(
pSymbol
)
{
{
...
@@ -2324,7 +2320,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
...
@@ -2324,7 +2320,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
bool
SmSymDefineDialog
::
SelectSymbol
(
ComboBox
&
rComboBox
,
bool
SmSymDefineDialog
::
SelectSymbol
(
ComboBox
&
rComboBox
,
const
Xub
String
&
rSymbolName
,
bool
bDeleteText
)
const
OU
String
&
rSymbolName
,
bool
bDeleteText
)
{
{
#if OSL_DEBUG_LEVEL > 1
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE
(
&
rComboBox
==
&
aOldSymbols
||
&
rComboBox
==
&
aSymbols
,
OSL_ENSURE
(
&
rComboBox
==
&
aOldSymbols
||
&
rComboBox
==
&
aSymbols
,
...
@@ -2332,7 +2328,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
...
@@ -2332,7 +2328,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
#endif
#endif
// trim SymbolName (no blanks)
// trim SymbolName (no blanks)
Xub
String
aNormName
(
comphelper
::
string
::
remove
(
rSymbolName
,
' '
));
OU
String
aNormName
(
comphelper
::
string
::
remove
(
rSymbolName
,
' '
));
// and remove possible deviations within the input
// and remove possible deviations within the input
rComboBox
.
SetText
(
aNormName
);
rComboBox
.
SetText
(
aNormName
);
...
@@ -2379,7 +2375,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
...
@@ -2379,7 +2375,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
{
{
// if there's a change of the old symbol, show only the available ones, otherwise show none
// if there's a change of the old symbol, show only the available ones, otherwise show none
const
SmSym
*
pOldSymbol
=
NULL
;
const
SmSym
*
pOldSymbol
=
NULL
;
Xub
String
aTmpOldSymbolSetName
;
OU
String
aTmpOldSymbolSetName
;
if
(
nPos
!=
COMBOBOX_ENTRY_NOTFOUND
)
if
(
nPos
!=
COMBOBOX_ENTRY_NOTFOUND
)
{
{
pOldSymbol
=
aSymbolMgrCopy
.
GetSymbolByName
(
aNormName
);
pOldSymbol
=
aSymbolMgrCopy
.
GetSymbolByName
(
aNormName
);
...
@@ -2396,7 +2392,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
...
@@ -2396,7 +2392,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
}
}
void
SmSymDefineDialog
::
SetFont
(
const
XubString
&
rFontName
,
const
Xub
String
&
rStyleName
)
void
SmSymDefineDialog
::
SetFont
(
const
OUString
&
rFontName
,
const
OU
String
&
rStyleName
)
{
{
// get Font (FontInfo) matching name and style
// get Font (FontInfo) matching name and style
FontInfo
aFI
;
FontInfo
aFI
;
...
@@ -2432,7 +2428,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
...
@@ -2432,7 +2428,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
}
}
bool
SmSymDefineDialog
::
SelectFont
(
const
Xub
String
&
rFontName
,
bool
bApplyFont
)
bool
SmSymDefineDialog
::
SelectFont
(
const
OU
String
&
rFontName
,
bool
bApplyFont
)
{
{
bool
bRet
=
false
;
bool
bRet
=
false
;
sal_uInt16
nPos
=
aFonts
.
GetEntryPos
(
rFontName
);
sal_uInt16
nPos
=
aFonts
.
GetEntryPos
(
rFontName
);
...
@@ -2460,7 +2456,7 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
...
@@ -2460,7 +2456,7 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
}
}
bool
SmSymDefineDialog
::
SelectStyle
(
const
Xub
String
&
rStyleName
,
bool
bApplyFont
)
bool
SmSymDefineDialog
::
SelectStyle
(
const
OU
String
&
rStyleName
,
bool
bApplyFont
)
{
{
bool
bRet
=
false
;
bool
bRet
=
false
;
sal_uInt16
nPos
=
aStyles
.
GetEntryPos
(
rStyleName
);
sal_uInt16
nPos
=
aStyles
.
GetEntryPos
(
rStyleName
);
...
...
starmath/source/node.cxx
Dosyayı görüntüle @
53acdd29
...
@@ -2869,7 +2869,7 @@ static bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
...
@@ -2869,7 +2869,7 @@ static bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
{
{
String
aName
(
rTokenText
.
Copy
(
1
)
);
String
aName
(
rTokenText
.
Copy
(
1
)
);
SmSym
*
pSymbol
=
SM_MOD
()
->
GetSymbolManager
().
GetSymbolByName
(
aName
);
SmSym
*
pSymbol
=
SM_MOD
()
->
GetSymbolManager
().
GetSymbolByName
(
aName
);
if
(
pSymbol
&&
GetExportSymbolSetName
(
pSymbol
->
GetSymbolSetName
()
).
EqualsAscii
(
"Greek"
)
)
if
(
pSymbol
&&
GetExportSymbolSetName
(
pSymbol
->
GetSymbolSetName
())
==
"Greek"
)
bRes
=
true
;
bRes
=
true
;
}
}
...
...
starmath/source/symbol.cxx
Dosyayı görüntüle @
53acdd29
...
@@ -47,8 +47,8 @@ using namespace ::rtl;
...
@@ -47,8 +47,8 @@ using namespace ::rtl;
/**************************************************************************/
/**************************************************************************/
SmSym
::
SmSym
()
:
SmSym
::
SmSym
()
:
m_aName
(
rtl
::
OUString
(
"unknown"
)),
m_aName
(
OUString
(
"unknown"
)),
m_aSetName
(
rtl
::
OUString
(
"unknown"
)),
m_aSetName
(
OUString
(
"unknown"
)),
m_cChar
(
'\0'
),
m_cChar
(
'\0'
),
m_bPredefined
(
false
),
m_bPredefined
(
false
),
m_bDocSymbol
(
false
)
m_bDocSymbol
(
false
)
...
@@ -65,8 +65,8 @@ SmSym::SmSym(const SmSym& rSymbol)
...
@@ -65,8 +65,8 @@ SmSym::SmSym(const SmSym& rSymbol)
}
}
SmSym
::
SmSym
(
const
String
&
rName
,
const
Font
&
rFont
,
sal_UCS4
cChar
,
SmSym
::
SmSym
(
const
OU
String
&
rName
,
const
Font
&
rFont
,
sal_UCS4
cChar
,
const
String
&
rSet
,
bool
bIsPredefined
)
const
OU
String
&
rSet
,
bool
bIsPredefined
)
{
{
m_aName
=
m_aExportName
=
rName
;
m_aName
=
m_aExportName
=
rName
;
...
@@ -141,7 +141,7 @@ SmSymbolManager& SmSymbolManager::operator = (const SmSymbolManager& rSymbolSetM
...
@@ -141,7 +141,7 @@ SmSymbolManager& SmSymbolManager::operator = (const SmSymbolManager& rSymbolSetM
}
}
SmSym
*
SmSymbolManager
::
GetSymbolByName
(
const
String
&
rSymbolName
)
SmSym
*
SmSymbolManager
::
GetSymbolByName
(
const
OU
String
&
rSymbolName
)
{
{
SmSym
*
pRes
=
NULL
;
SmSym
*
pRes
=
NULL
;
SymbolMap_t
::
iterator
aIt
(
m_aSymbols
.
find
(
rSymbolName
)
);
SymbolMap_t
::
iterator
aIt
(
m_aSymbols
.
find
(
rSymbolName
)
);
...
@@ -166,8 +166,8 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
...
@@ -166,8 +166,8 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
{
{
bool
bAdded
=
false
;
bool
bAdded
=
false
;
const
String
aSymbolName
(
rSymbol
.
GetName
()
);
const
OU
String
aSymbolName
(
rSymbol
.
GetName
()
);
if
(
aSymbolName
.
Len
()
>
0
&&
rSymbol
.
GetSymbolSetName
().
Len
()
>
0
)
if
(
aSymbolName
.
getLength
()
>
0
&&
rSymbol
.
GetSymbolSetName
().
getLength
()
>
0
)
{
{
const
SmSym
*
pFound
=
GetSymbolByName
(
aSymbolName
);
const
SmSym
*
pFound
=
GetSymbolByName
(
aSymbolName
);
const
bool
bSymbolConflict
=
pFound
&&
!
pFound
->
IsEqualInUI
(
rSymbol
);
const
bool
bSymbolConflict
=
pFound
&&
!
pFound
->
IsEqualInUI
(
rSymbol
);
...
@@ -198,9 +198,9 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
...
@@ -198,9 +198,9 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
}
}
void
SmSymbolManager
::
RemoveSymbol
(
const
String
&
rSymbolName
)
void
SmSymbolManager
::
RemoveSymbol
(
const
OU
String
&
rSymbolName
)
{
{
if
(
rSymbolName
.
Len
()
>
0
)
if
(
rSymbolName
.
getLength
()
>
0
)
{
{
size_t
nOldSize
=
m_aSymbols
.
size
();
size_t
nOldSize
=
m_aSymbols
.
size
();
m_aSymbols
.
erase
(
rSymbolName
);
m_aSymbols
.
erase
(
rSymbolName
);
...
@@ -209,9 +209,9 @@ void SmSymbolManager::RemoveSymbol( const String & rSymbolName )
...
@@ -209,9 +209,9 @@ void SmSymbolManager::RemoveSymbol( const String & rSymbolName )
}
}
std
::
set
<
String
>
SmSymbolManager
::
GetSymbolSetNames
()
const
std
::
set
<
OU
String
>
SmSymbolManager
::
GetSymbolSetNames
()
const
{
{
std
::
set
<
String
>
aRes
;
std
::
set
<
OU
String
>
aRes
;
SymbolMap_t
::
const_iterator
aIt
(
m_aSymbols
.
begin
()
);
SymbolMap_t
::
const_iterator
aIt
(
m_aSymbols
.
begin
()
);
for
(
;
aIt
!=
m_aSymbols
.
end
();
++
aIt
)
for
(
;
aIt
!=
m_aSymbols
.
end
();
++
aIt
)
aRes
.
insert
(
aIt
->
second
.
GetSymbolSetName
()
);
aRes
.
insert
(
aIt
->
second
.
GetSymbolSetName
()
);
...
@@ -219,10 +219,10 @@ std::set< String > SmSymbolManager::GetSymbolSetNames() const
...
@@ -219,10 +219,10 @@ std::set< String > SmSymbolManager::GetSymbolSetNames() const
}
}
const
SymbolPtrVec_t
SmSymbolManager
::
GetSymbolSet
(
const
String
&
rSymbolSetName
)
const
SymbolPtrVec_t
SmSymbolManager
::
GetSymbolSet
(
const
OU
String
&
rSymbolSetName
)
{
{
SymbolPtrVec_t
aRes
;
SymbolPtrVec_t
aRes
;
if
(
rSymbolSetName
.
Len
()
>
0
)
if
(
rSymbolSetName
.
getLength
()
>
0
)
{
{
SymbolMap_t
::
const_iterator
aIt
(
m_aSymbols
.
begin
()
);
SymbolMap_t
::
const_iterator
aIt
(
m_aSymbols
.
begin
()
);
for
(
;
aIt
!=
m_aSymbols
.
end
();
++
aIt
)
for
(
;
aIt
!=
m_aSymbols
.
end
();
++
aIt
)
...
@@ -246,8 +246,8 @@ void SmSymbolManager::Load()
...
@@ -246,8 +246,8 @@ void SmSymbolManager::Load()
for
(
size_t
i
=
0
;
i
<
nSymbolCount
;
++
i
)
for
(
size_t
i
=
0
;
i
<
nSymbolCount
;
++
i
)
{
{
const
SmSym
&
rSym
=
aSymbols
[
i
];
const
SmSym
&
rSym
=
aSymbols
[
i
];
OSL_ENSURE
(
rSym
.
GetName
().
Len
()
>
0
,
"symbol without name!"
);
OSL_ENSURE
(
rSym
.
GetName
().
getLength
()
>
0
,
"symbol without name!"
);
if
(
rSym
.
GetName
().
Len
()
>
0
)
if
(
rSym
.
GetName
().
getLength
()
>
0
)
AddOrReplaceSymbol
(
rSym
);
AddOrReplaceSymbol
(
rSym
);
}
}
m_bModified
=
true
;
m_bModified
=
true
;
...
@@ -260,9 +260,9 @@ void SmSymbolManager::Load()
...
@@ -260,9 +260,9 @@ void SmSymbolManager::Load()
// now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set.
// now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set.
SmLocalizedSymbolData
aLocalizedData
;
SmLocalizedSymbolData
aLocalizedData
;
const
String
aGreekSymbolSetName
(
aLocalizedData
.
GetUiSymbolSetName
(
OUString
::
createFromAscii
(
"Greek"
)
));
const
OUString
aGreekSymbolSetName
(
aLocalizedData
.
GetUiSymbolSetName
(
OUString
(
"Greek"
)
));
const
SymbolPtrVec_t
aGreekSymbols
(
GetSymbolSet
(
aGreekSymbolSetName
)
);
const
SymbolPtrVec_t
aGreekSymbols
(
GetSymbolSet
(
aGreekSymbolSetName
)
);
String
aSymbolSetName
=
rtl
::
OUString
(
'i'
);
String
aSymbolSetName
=
OUString
(
'i'
);
aSymbolSetName
+=
aGreekSymbolSetName
;
aSymbolSetName
+=
aGreekSymbolSetName
;
size_t
nSymbols
=
aGreekSymbols
.
size
();
size_t
nSymbols
=
aGreekSymbols
.
size
();
for
(
size_t
i
=
0
;
i
<
nSymbols
;
++
i
)
for
(
size_t
i
=
0
;
i
<
nSymbols
;
++
i
)
...
@@ -272,7 +272,7 @@ void SmSymbolManager::Load()
...
@@ -272,7 +272,7 @@ void SmSymbolManager::Load()
Font
aFont
(
rSym
.
GetFace
()
);
Font
aFont
(
rSym
.
GetFace
()
);
OSL_ENSURE
(
aFont
.
GetItalic
()
==
ITALIC_NONE
,
"expected Font with ITALIC_NONE, failed."
);
OSL_ENSURE
(
aFont
.
GetItalic
()
==
ITALIC_NONE
,
"expected Font with ITALIC_NONE, failed."
);
aFont
.
SetItalic
(
ITALIC_NORMAL
);
aFont
.
SetItalic
(
ITALIC_NORMAL
);
String
aSymbolName
=
rtl
::
OUString
(
'i'
);
String
aSymbolName
=
OUString
(
'i'
);
aSymbolName
+=
rSym
.
GetName
();
aSymbolName
+=
rSym
.
GetName
();
SmSym
aSymbol
(
aSymbolName
,
aFont
,
rSym
.
GetCharacter
(),
SmSym
aSymbol
(
aSymbolName
,
aFont
,
rSym
.
GetCharacter
(),
aSymbolSetName
,
true
/*bIsPredefined*/
);
aSymbolSetName
,
true
/*bIsPredefined*/
);
...
@@ -289,8 +289,8 @@ void SmSymbolManager::Save()
...
@@ -289,8 +289,8 @@ void SmSymbolManager::Save()
// prepare to skip symbols from iGreek on saving
// prepare to skip symbols from iGreek on saving
SmLocalizedSymbolData
aLocalizedData
;
SmLocalizedSymbolData
aLocalizedData
;
String
aSymbolSetName
=
rtl
::
OUString
(
'i'
);
OUString
aSymbolSetName
(
'i'
);
aSymbolSetName
+=
aLocalizedData
.
GetUiSymbolSetName
(
OUString
::
createFromAscii
(
"Greek"
));
aSymbolSetName
+=
aLocalizedData
.
GetUiSymbolSetName
(
OUString
(
"Greek"
));
SymbolPtrVec_t
aTmp
(
GetSymbols
()
);
SymbolPtrVec_t
aTmp
(
GetSymbols
()
);
std
::
vector
<
SmSym
>
aSymbols
;
std
::
vector
<
SmSym
>
aSymbols
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment