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
a3d92536
Kaydet (Commit)
a3d92536
authored
Eki 29, 2012
tarafından
Ivan Timofeev
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String -> OUString
Change-Id: I9d86ea5b27e8b8db75bf7a2ea9965621c857adb7
üst
f5d97226
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
31 deletions
+37
-31
document.hxx
starmath/inc/document.hxx
+2
-2
node.hxx
starmath/inc/node.hxx
+4
-4
accessibility.cxx
starmath/source/accessibility.cxx
+14
-12
document.cxx
starmath/source/document.cxx
+8
-4
node.cxx
starmath/source/node.cxx
+9
-9
No files found.
starmath/inc/document.hxx
Dosyayı görüntüle @
a3d92536
...
...
@@ -96,7 +96,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
String
aText
;
SmFormat
aFormat
;
SmParser
aInterpreter
;
String
aAccText
;
OUString
aAccText
;
SmNode
*
pTree
;
SfxMenuBarManager
*
pMenuMgr
;
SfxItemPool
*
pEditEngineItemPool
;
...
...
@@ -198,7 +198,7 @@ public:
const
std
::
set
<
rtl
::
OUString
>
&
GetUsedSymbols
()
const
{
return
aUsedSymbols
;
}
String
GetAccessibleText
();
OUString
GetAccessibleText
();
EditEngine
&
GetEditEngine
();
SfxItemPool
&
GetEditEngineItemPool
();
...
...
starmath/inc/node.hxx
Dosyayı görüntüle @
a3d92536
...
...
@@ -156,7 +156,7 @@ public:
virtual
void
Arrange
(
const
OutputDevice
&
rDev
,
const
SmFormat
&
rFormat
);
virtual
void
CreateTextFromNode
(
String
&
rText
);
virtual
void
GetAccessibleText
(
String
&
rText
)
const
;
virtual
void
GetAccessibleText
(
OUStringBuffer
&
rText
)
const
;
sal_Int32
GetAccessibleIndex
()
const
{
return
nAccIndex
;
}
const
SmNode
*
FindNodeWithAccessibleIndex
(
xub_StrLen
nAccIndex
)
const
;
...
...
@@ -324,7 +324,7 @@ public:
SmStructureNode
&
operator
=
(
const
SmStructureNode
&
rNode
);
virtual
void
GetAccessibleText
(
String
&
rText
)
const
;
virtual
void
GetAccessibleText
(
OUStringBuffer
&
rText
)
const
;
void
SetSubNode
(
size_t
nIndex
,
SmNode
*
pNode
)
{
...
...
@@ -378,7 +378,7 @@ protected:
public
:
virtual
void
GetAccessibleText
(
String
&
rText
)
const
;
virtual
void
GetAccessibleText
(
OUStringBuffer
&
rText
)
const
;
};
...
...
@@ -490,7 +490,7 @@ public:
virtual
void
Arrange
(
const
OutputDevice
&
rDev
,
const
SmFormat
&
rFormat
);
virtual
void
CreateTextFromNode
(
String
&
rText
);
virtual
void
GetAccessibleText
(
String
&
rText
)
const
;
virtual
void
GetAccessibleText
(
OUStringBuffer
&
rText
)
const
;
void
Accept
(
SmVisitor
*
pVisitor
);
/**
Converts the character from StarMath's private area symbols to a matching Unicode
...
...
starmath/source/accessibility.cxx
Dosyayı görüntüle @
a3d92536
...
...
@@ -514,10 +514,11 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
OSL_ENSURE
(
nAccIndex
>=
0
,
"invalid accessible index"
);
OSL_ENSURE
(
nIndex
>=
nAccIndex
,
"index out of range"
);
String
aNodeText
;
pNode
->
GetAccessibleText
(
aNodeText
);
OUStringBuffer
aBuf
;
pNode
->
GetAccessibleText
(
aBuf
);
OUString
aNodeText
=
aBuf
.
makeStringAndClear
();
sal_Int32
nNodeIndex
=
nIndex
-
nAccIndex
;
if
(
0
<=
nNodeIndex
&&
nNodeIndex
<
aNodeText
.
Len
())
if
(
0
<=
nNodeIndex
&&
nNodeIndex
<
aNodeText
.
getLength
())
{
// get appropriate rectangle
Point
aOffset
(
pNode
->
GetTopLeft
()
-
pTree
->
GetTopLeft
());
...
...
@@ -525,9 +526,9 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
aTLPos
.
X
()
-=
0
;
Size
aSize
(
pNode
->
GetSize
());
sal_Int32
*
pXAry
=
new
sal_Int32
[
aNodeText
.
Len
()
];
sal_Int32
*
pXAry
=
new
sal_Int32
[
aNodeText
.
getLength
()
];
pWin
->
SetFont
(
pNode
->
GetFont
()
);
pWin
->
GetTextArray
(
aNodeText
,
pXAry
,
0
,
aNodeText
.
Len
()
);
pWin
->
GetTextArray
(
aNodeText
,
pXAry
,
0
,
aNodeText
.
getLength
()
);
aTLPos
.
X
()
+=
nNodeIndex
>
0
?
pXAry
[
nNodeIndex
-
1
]
:
0
;
aSize
.
Width
()
=
nNodeIndex
>
0
?
pXAry
[
nNodeIndex
]
-
pXAry
[
nNodeIndex
-
1
]
:
pXAry
[
nNodeIndex
];
delete
[]
pXAry
;
...
...
@@ -600,22 +601,23 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
if
(
aRect
.
IsInside
(
aPos
))
{
OSL_ENSURE
(
pNode
->
IsVisible
(),
"node is not a leaf"
);
String
aTxt
;
pNode
->
GetAccessibleText
(
aTxt
);
OSL_ENSURE
(
aTxt
.
Len
(),
"no accessible text available"
);
OUStringBuffer
aBuf
;
pNode
->
GetAccessibleText
(
aBuf
);
OUString
aTxt
=
aBuf
.
makeStringAndClear
();
OSL_ENSURE
(
!
aTxt
.
isEmpty
(),
"no accessible text available"
);
long
nNodeX
=
pNode
->
GetLeft
();
sal_Int32
*
pXAry
=
new
sal_Int32
[
aTxt
.
Len
()
];
sal_Int32
*
pXAry
=
new
sal_Int32
[
aTxt
.
getLength
()
];
pWin
->
SetFont
(
pNode
->
GetFont
()
);
pWin
->
GetTextArray
(
aTxt
,
pXAry
,
0
,
aTxt
.
Len
()
);
for
(
sal_Int32
i
=
0
;
i
<
aTxt
.
Len
()
&&
nRes
==
-
1
;
++
i
)
pWin
->
GetTextArray
(
aTxt
,
pXAry
,
0
,
aTxt
.
getLength
()
);
for
(
sal_Int32
i
=
0
;
i
<
aTxt
.
getLength
()
&&
nRes
==
-
1
;
++
i
)
{
if
(
pXAry
[
i
]
+
nNodeX
>
aPos
.
X
())
nRes
=
i
;
}
delete
[]
pXAry
;
OSL_ENSURE
(
nRes
>=
0
&&
nRes
<
aTxt
.
Len
(),
"index out of range"
);
OSL_ENSURE
(
nRes
>=
0
&&
nRes
<
aTxt
.
getLength
(),
"index out of range"
);
OSL_ENSURE
(
pNode
->
GetAccessibleIndex
()
>=
0
,
"invalid accessible index"
);
...
...
starmath/source/document.cxx
Dosyayı görüntüle @
a3d92536
...
...
@@ -224,17 +224,21 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
}
}
String
SmDocShell
::
GetAccessibleText
()
OU
String
SmDocShell
::
GetAccessibleText
()
{
RTL_LOGFILE_CONTEXT
(
aLog
,
"starmath: SmDocShell::GetAccessibleText"
);
if
(
!
IsFormulaArranged
())
ArrangeFormula
();
if
(
0
==
aAccText
.
Len
())
if
(
aAccText
.
isEmpty
())
{
OSL_ENSURE
(
pTree
,
"Tree missing"
);
if
(
pTree
)
pTree
->
GetAccessibleText
(
aAccText
);
{
OUStringBuffer
aBuf
;
pTree
->
GetAccessibleText
(
aBuf
);
aAccText
=
aBuf
.
makeStringAndClear
();
}
}
return
aAccText
;
}
...
...
@@ -306,7 +310,7 @@ void SmDocShell::ArrangeFormula()
SetFormulaArranged
(
true
);
// invalidate accessible text
aAccText
=
String
();
aAccText
=
OU
String
();
}
...
...
starmath/source/node.cxx
Dosyayı görüntüle @
a3d92536
...
...
@@ -520,7 +520,7 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
return
pResult
;
}
void
SmNode
::
GetAccessibleText
(
String
&
/*rText*/
)
const
void
SmNode
::
GetAccessibleText
(
OUStringBuffer
&
/*rText*/
)
const
{
OSL_FAIL
(
"SmNode: GetAccessibleText not overloaded"
);
}
...
...
@@ -530,12 +530,12 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const
const
SmNode
*
pResult
=
0
;
sal_Int32
nIdx
=
GetAccessibleIndex
();
String
aTxt
;
OUStringBuffer
aTxt
;
if
(
nIdx
>=
0
)
GetAccessibleText
(
aTxt
);
// get text if used in following 'if' statement
if
(
nIdx
>=
0
&&
nIdx
<=
nAccIdx
&&
nAccIdx
<
nIdx
+
aTxt
.
Len
())
&&
nIdx
<=
nAccIdx
&&
nAccIdx
<
nIdx
+
aTxt
.
getLength
())
pResult
=
this
;
else
{
...
...
@@ -749,7 +749,7 @@ SmNode * SmStructureNode::GetSubNode(sal_uInt16 nIndex)
}
void
SmStructureNode
::
GetAccessibleText
(
String
&
rText
)
const
void
SmStructureNode
::
GetAccessibleText
(
OUStringBuffer
&
rText
)
const
{
sal_uInt16
nNodes
=
GetNumSubNodes
();
for
(
sal_uInt16
i
=
0
;
i
<
nNodes
;
++
i
)
...
...
@@ -758,7 +758,7 @@ void SmStructureNode::GetAccessibleText( String &rText ) const
if
(
pNode
)
{
if
(
pNode
->
IsVisible
())
((
SmStructureNode
*
)
pNode
)
->
nAccIndex
=
rText
.
Len
();
((
SmStructureNode
*
)
pNode
)
->
nAccIndex
=
rText
.
getLength
();
pNode
->
GetAccessibleText
(
rText
);
}
}
...
...
@@ -787,9 +787,9 @@ SmNode * SmVisibleNode::GetSubNode(sal_uInt16 /*nIndex*/)
///////////////////////////////////////////////////////////////////////////
void
SmGraphicNode
::
GetAccessibleText
(
String
&
rText
)
const
void
SmGraphicNode
::
GetAccessibleText
(
OUStringBuffer
&
rText
)
const
{
rText
+=
GetToken
().
aText
;
rText
.
append
(
GetToken
().
aText
)
;
}
///////////////////////////////////////////////////////////////////////////
...
...
@@ -2440,9 +2440,9 @@ void SmTextNode::CreateTextFromNode(String &rText)
}
void
SmTextNode
::
GetAccessibleText
(
String
&
rText
)
const
void
SmTextNode
::
GetAccessibleText
(
OUStringBuffer
&
rText
)
const
{
rText
+=
aText
;
rText
.
append
(
aText
)
;
}
void
SmTextNode
::
AdjustFontDesc
()
...
...
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