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
08e14eb2
Kaydet (Commit)
08e14eb2
authored
Mar 01, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:unuseddefaultparam in starmath
Change-Id: I740d931c0236c1a4d40013b458f249692695d6e5
üst
1685ff14
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
40 deletions
+32
-40
cursor.hxx
starmath/inc/cursor.hxx
+6
-6
dialog.hxx
starmath/inc/dialog.hxx
+3
-3
cursor.cxx
starmath/source/cursor.cxx
+17
-22
dialog.cxx
starmath/source/dialog.cxx
+6
-9
No files found.
starmath/inc/cursor.hxx
Dosyayı görüntüle @
08e14eb2
...
...
@@ -164,11 +164,11 @@ public:
* This method only work if the caret is inside an SmOperNode, or to the right of one.
* Notice also that this method ignores any selection made.
*
*
@param bMoveCaret If true that
caret will be moved into the limit.
*
The
caret will be moved into the limit.
*
* @returns True, if the caret was in a context where this operation was possible.
*/
bool
InsertLimit
(
SmSubSup
eSubSup
,
bool
bMoveCaret
=
true
);
bool
InsertLimit
(
SmSubSup
eSubSup
);
/** Insert a new row or newline
*
...
...
@@ -217,7 +217,7 @@ public:
void
Draw
(
OutputDevice
&
pDev
,
Point
Offset
,
bool
isCaretVisible
);
bool
IsAtTailOfBracket
(
SmBracketType
eBracketType
,
SmBraceNode
**
ppBraceNode
=
nullptr
)
const
;
void
MoveAfterBracket
(
SmBraceNode
*
pBraceNode
,
bool
bMoveAnchor
=
true
);
void
MoveAfterBracket
(
SmBraceNode
*
pBraceNode
);
private
:
friend
class
SmDocShell
;
...
...
@@ -414,11 +414,11 @@ public:
SmNodeListParser
(){
pList
=
nullptr
;
}
/** Parse a list of nodes to an expression
/** Parse a list of nodes to an expression
.
*
*
If bDeleteErrorNodes is true, o
ld error nodes will be deleted.
*
O
ld error nodes will be deleted.
*/
SmNode
*
Parse
(
SmNodeList
*
list
,
bool
bDeleteErrorNodes
=
true
);
SmNode
*
Parse
(
SmNodeList
*
list
);
/** True, if the token is an operator */
static
bool
IsOperator
(
const
SmToken
&
token
);
/** True, if the token is a relation operator */
...
...
starmath/inc/dialog.hxx
Dosyayı görüntüle @
08e14eb2
...
...
@@ -371,7 +371,7 @@ class SmSymbolDialog : public ModalDialog
DECL_LINK_TYPED
(
GetClickHdl
,
Button
*
,
void
);
void
SymbolDblClickHdl
();
void
FillSymbolSets
(
bool
bDeleteText
=
true
);
void
FillSymbolSets
();
const
SmSym
*
GetSymbol
()
const
;
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
)
override
;
...
...
@@ -444,8 +444,8 @@ class SmSymDefineDialog : public ModalDialog
void
FillSymbols
(
ComboBox
&
rComboBox
,
bool
bDeleteText
=
true
);
void
FillSymbolSets
(
ComboBox
&
rComboBox
,
bool
bDeleteText
=
true
);
void
FillFonts
(
bool
bDeleteText
=
true
);
void
FillStyles
(
bool
bDeleteText
=
true
);
void
FillFonts
();
void
FillStyles
();
void
SetSymbolSetManager
(
const
SmSymbolManager
&
rMgr
);
void
SetFont
(
const
OUString
&
rFontName
,
const
OUString
&
rStyleName
);
...
...
starmath/source/cursor.cxx
Dosyayı görüntüle @
08e14eb2
...
...
@@ -587,7 +587,7 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
FinishEdit
(
pLineList
,
pLineParent
,
nParentIndex
,
PosAfterScript
,
pScriptLine
);
}
bool
SmCursor
::
InsertLimit
(
SmSubSup
eSubSup
,
bool
bMoveCaret
)
{
bool
SmCursor
::
InsertLimit
(
SmSubSup
eSubSup
)
{
//Find a subject to set limits on
SmOperNode
*
pSubject
=
nullptr
;
//Check if pSelectedNode might be a subject
...
...
@@ -629,7 +629,7 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) {
pSubSup
->
SetSubSup
(
eSubSup
,
pLine
);
PosAfterLimit
=
SmCaretPos
(
pLine
,
1
);
//If it's already there... let's move the caret
}
else
if
(
bMoveCaret
)
{
}
else
{
pLine
=
pSubSup
->
GetSubSup
(
eSubSup
);
SmNodeList
*
pLineList
=
NodeToList
(
pLine
);
if
(
pLineList
->
size
()
>
0
)
...
...
@@ -644,9 +644,8 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) {
AnnotateSelection
();
//Set caret position
if
(
bMoveCaret
)
if
(
!
SetCaretPosition
(
PosAfterLimit
,
true
))
SetCaretPosition
(
SmCaretPos
(
pLine
,
0
),
true
);
if
(
!
SetCaretPosition
(
PosAfterLimit
,
true
))
SetCaretPosition
(
SmCaretPos
(
pLine
,
0
),
true
);
EndEdit
();
...
...
@@ -1539,33 +1538,29 @@ bool SmCursor::IsAtTailOfBracket(SmBracketType eBracketType, SmBraceNode** ppBra
return
true
;
}
void
SmCursor
::
MoveAfterBracket
(
SmBraceNode
*
pBraceNode
,
bool
bMoveAnchor
)
void
SmCursor
::
MoveAfterBracket
(
SmBraceNode
*
pBraceNode
)
{
mpPosition
->
CaretPos
.
pSelectedNode
=
pBraceNode
;
mpPosition
->
CaretPos
.
Index
=
1
;
if
(
bMoveAnchor
)
{
mpAnchor
->
CaretPos
.
pSelectedNode
=
pBraceNode
;
mpAnchor
->
CaretPos
.
Index
=
1
;
}
mpAnchor
->
CaretPos
.
pSelectedNode
=
pBraceNode
;
mpAnchor
->
CaretPos
.
Index
=
1
;
RequestRepaint
();
}
/////////////////////////////////////// SmNodeListParser
SmNode
*
SmNodeListParser
::
Parse
(
SmNodeList
*
list
,
bool
bDeleteErrorNodes
){
SmNode
*
SmNodeListParser
::
Parse
(
SmNodeList
*
list
){
pList
=
list
;
if
(
bDeleteErrorNodes
){
//Delete error nodes
SmNodeList
::
iterator
it
=
pList
->
begin
();
while
(
it
!=
pList
->
end
())
{
if
((
*
it
)
->
GetType
()
==
NERROR
){
//Delete and erase
delete
*
it
;
it
=
pList
->
erase
(
it
);
}
else
++
it
;
}
//Delete error nodes
SmNodeList
::
iterator
it
=
pList
->
begin
();
while
(
it
!=
pList
->
end
())
{
if
((
*
it
)
->
GetType
()
==
NERROR
){
//Delete and erase
delete
*
it
;
it
=
pList
->
erase
(
it
);
}
else
++
it
;
}
SmNode
*
retval
=
Expression
();
pList
=
nullptr
;
...
...
starmath/source/dialog.cxx
Dosyayı görüntüle @
08e14eb2
...
...
@@ -1437,13 +1437,12 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
}
void
SmSymbolDialog
::
FillSymbolSets
(
bool
bDeleteText
)
void
SmSymbolDialog
::
FillSymbolSets
()
// populate the entries of possible SymbolsSets in the dialog with
// current values of the SymbolSet manager but selects none of those
{
m_pSymbolSets
->
Clear
();
if
(
bDeleteText
)
m_pSymbolSets
->
SetNoSelection
();
m_pSymbolSets
->
SetNoSelection
();
std
::
set
<
OUString
>
aSybolSetNames
(
rSymbolMgr
.
GetSymbolSetNames
()
);
std
::
set
<
OUString
>::
const_iterator
aIt
(
aSybolSetNames
.
begin
()
);
...
...
@@ -1743,11 +1742,10 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, bool bDeleteText)
}
void
SmSymDefineDialog
::
FillFonts
(
bool
bDelete
)
void
SmSymDefineDialog
::
FillFonts
()
{
pFonts
->
Clear
();
if
(
bDelete
)
pFonts
->
SetNoSelection
();
pFonts
->
SetNoSelection
();
// Include all fonts of FontList into the font list.
// If there are duplicates, only include one entry of each font since the style will be
...
...
@@ -1761,11 +1759,10 @@ void SmSymDefineDialog::FillFonts(bool bDelete)
}
void
SmSymDefineDialog
::
FillStyles
(
bool
bDeleteText
)
void
SmSymDefineDialog
::
FillStyles
()
{
pStyles
->
Clear
();
if
(
bDeleteText
)
pStyles
->
SetText
(
OUString
());
pStyles
->
SetText
(
OUString
());
OUString
aText
(
pFonts
->
GetSelectEntry
());
if
(
!
aText
.
isEmpty
())
...
...
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