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
939d6400
Kaydet (Commit)
939d6400
authored
Eki 01, 2012
tarafından
Ivan Timofeev
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String -> OUString
Change-Id: I9921e9803e5d63fafffbfcf15e5c4fc2c9080669
üst
3c8e3212
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
35 deletions
+32
-35
edit.hxx
starmath/inc/edit.hxx
+1
-1
edit.cxx
starmath/source/edit.cxx
+29
-31
mathmlexport.cxx
starmath/source/mathmlexport.cxx
+1
-1
mathmlimport.cxx
starmath/source/mathmlimport.cxx
+1
-2
No files found.
starmath/inc/edit.hxx
Dosyayı görüntüle @
939d6400
...
...
@@ -118,7 +118,7 @@ public:
void
MarkError
(
const
Point
&
rPos
);
void
SelNextMark
();
void
SelPrevMark
();
bool
HasMark
(
const
String
&
rText
)
const
;
bool
HasMark
(
const
OU
String
&
rText
)
const
;
void
Flush
();
void
DeleteEditView
(
SmViewShell
&
rView
);
...
...
starmath/source/edit.cxx
Dosyayı görüntüle @
939d6400
...
...
@@ -237,7 +237,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
// forces new settings to be used
// unfortunately this resets the whole edit engine
// thus we need to save at least the text
String
aTxt
(
pEditEngine
->
GetText
(
LINEEND_LF
)
);
OU
String
aTxt
(
pEditEngine
->
GetText
(
LINEEND_LF
)
);
pEditEngine
->
Clear
();
//incorrect font size
pEditEngine
->
SetText
(
aTxt
);
}
...
...
@@ -686,8 +686,8 @@ bool SmEditWindow::IsAllSelected() const
sal_Int32
nParaCnt
=
pEditEngine
->
GetParagraphCount
();
if
(
!
(
nParaCnt
-
1
))
{
String
Text
(
pEditEngine
->
GetText
(
LINEEND_LF
)
);
bRes
=
!
eSelection
.
nStartPos
&&
(
eSelection
.
nEndPos
==
Text
.
Len
()
-
1
);
sal_uInt16
nTextLen
=
pEditEngine
->
GetText
(
LINEEND_LF
).
Len
(
);
bRes
=
!
eSelection
.
nStartPos
&&
(
eSelection
.
nEndPos
==
nTextLen
-
1
);
}
else
{
...
...
@@ -719,7 +719,7 @@ void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
aSelection
.
nEndPara
=
aSelection
.
nStartPara
;
OSL_ENSURE
(
pEditView
,
"NULL pointer"
);
String
aText
=
String
(
SmResId
(
nCommand
)
);
OUString
aText
=
SM_RESSTR
(
nCommand
);
pEditView
->
InsertText
(
aText
);
if
(
HasMark
(
aText
))
...
...
@@ -729,7 +729,7 @@ void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
}
else
{
// set selection after inserted text
aSelection
.
nEndPos
=
aSelection
.
nEndPos
+
sal
::
static_int_cast
<
xub_StrLen
>
(
aText
.
Len
()
);
aSelection
.
nEndPos
+=
aText
.
getLength
(
);
aSelection
.
nStartPos
=
aSelection
.
nEndPos
;
pEditView
->
SetSelection
(
aSelection
);
}
...
...
@@ -761,23 +761,21 @@ void SmEditWindow::SelNextMark()
if
(
pEditEngine
&&
pEditView
)
{
ESelection
eSelection
=
pEditView
->
GetSelection
();
sal_uInt16
Pos
=
eSelection
.
nEndPos
;
rtl
::
OUString
aMark
(
"<?>"
);
String
aText
;
sal_Int32
nPos
=
eSelection
.
nEndPos
;
sal_uInt16
nCounts
=
pEditEngine
->
GetParagraphCount
();
while
(
eSelection
.
nEndPara
<
nCounts
)
{
aText
=
pEditEngine
->
GetText
(
eSelection
.
nEndPara
);
Pos
=
aText
.
Search
(
aMark
,
Pos
);
if
(
Pos
!=
STRING_NOTFOUND
)
OUString
aText
=
pEditEngine
->
GetText
(
eSelection
.
nEndPara
);
nPos
=
aText
.
indexOf
(
"<?>"
,
nPos
);
if
(
nPos
!=
-
1
)
{
pEditView
->
SetSelection
(
ESelection
(
eSelection
.
nEndPara
,
Pos
,
eSelection
.
nEndPara
,
Pos
+
3
));
pEditView
->
SetSelection
(
ESelection
(
eSelection
.
nEndPara
,
nPos
,
eSelection
.
nEndPara
,
nPos
+
3
));
break
;
}
Pos
=
0
;
n
Pos
=
0
;
eSelection
.
nEndPara
++
;
}
}
...
...
@@ -791,43 +789,43 @@ void SmEditWindow::SelPrevMark()
if
(
pEditEngine
&&
pEditView
)
{
ESelection
eSelection
=
pEditView
->
GetSelection
();
sal_
uInt16
Pos
=
STRING_NOTFOUND
;
xub_StrLen
Max
=
eSelection
.
nStartPos
;
String
Text
(
pEditEngine
->
GetText
(
eSelection
.
nStartPara
)
);
rtl
::
OUString
aMark
(
"<?>"
);
sal_
Int32
nPos
=
-
1
;
sal_Int32
nMax
=
eSelection
.
nStartPos
;
OUString
aText
(
pEditEngine
->
GetText
(
eSelection
.
nStartPara
)
);
OUString
aMark
(
"<?>"
);
sal_uInt16
nCounts
=
pEditEngine
->
GetParagraphCount
();
do
{
sal_uInt16
Fnd
=
Text
.
Search
(
aMark
,
0
);
while
((
Fnd
<
Max
)
&&
(
Fnd
!=
STRING_NOTFOUND
))
sal_Int32
nMarkIndex
=
aText
.
indexOf
(
aMark
);
while
((
nMarkIndex
<
nMax
)
&&
(
nMarkIndex
!=
-
1
))
{
Pos
=
Fnd
;
Fnd
=
Text
.
Search
(
aMark
,
Fnd
+
1
);
nPos
=
nMarkIndex
;
nMarkIndex
=
aText
.
indexOf
(
aMark
,
nMarkIndex
+
1
);
}
if
(
Pos
==
STRING_NOTFOUND
)
if
(
nPos
==
-
1
)
{
eSelection
.
nStartPara
--
;
Text
=
pEditEngine
->
GetText
(
eSelection
.
nStartPara
);
Max
=
Text
.
Len
();
aText
=
pEditEngine
->
GetText
(
eSelection
.
nStartPara
);
nMax
=
aText
.
getLength
();
}
}
while
((
eSelection
.
nStartPara
<
nCounts
)
&&
(
Pos
==
STRING_NOTFOUND
));
(
nPos
==
-
1
));
if
(
Pos
!=
STRING_NOTFOUND
)
if
(
nPos
!=
-
1
)
{
pEditView
->
SetSelection
(
ESelection
(
eSelection
.
nStartPara
,
Pos
,
eSelection
.
nStartPara
,
Pos
+
3
));
pEditView
->
SetSelection
(
ESelection
(
eSelection
.
nStartPara
,
nPos
,
eSelection
.
nStartPara
,
nPos
+
3
));
}
}
}
bool
SmEditWindow
::
HasMark
(
const
String
&
rText
)
const
bool
SmEditWindow
::
HasMark
(
const
OU
String
&
rText
)
const
// returns true iff 'rText' contains a mark
{
return
rText
.
SearchAscii
(
"<?>"
,
0
)
!=
STRING_NOTFOUND
;
return
rText
.
indexOf
(
"<?>"
)
!=
-
1
;
}
void
SmEditWindow
::
MouseMove
(
const
MouseEvent
&
rEvt
)
...
...
starmath/source/mathmlexport.cxx
Dosyayı görüntüle @
939d6400
...
...
@@ -134,7 +134,7 @@ sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
if
(
xStatusIndicator
.
is
())
{
sal_Int32
nProgressRange
=
bFlat
?
1
:
3
;
xStatusIndicator
->
start
(
S
tring
(
SmResId
(
STR_STATSTR_WRITING
)
),
xStatusIndicator
->
start
(
S
M_RESSTR
(
STR_STATSTR_WRITING
),
nProgressRange
);
}
}
...
...
starmath/source/mathmlimport.cxx
Dosyayı görüntüle @
939d6400
...
...
@@ -171,8 +171,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
sal_Int32
nProgressRange
(
nSteps
);
if
(
xStatusIndicator
.
is
())
{
xStatusIndicator
->
start
(
String
(
SmResId
(
STR_STATSTR_READING
)),
nProgressRange
);
xStatusIndicator
->
start
(
SM_RESSTR
(
STR_STATSTR_READING
),
nProgressRange
);
}
nSteps
=
0
;
...
...
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