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
26085120
Kaydet (Commit)
26085120
authored
Kas 18, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#86131 SwXTextField::getAnchor: handle postit field with annotation mark
Change-Id: I3881c4577375a2eda053f64800d0991de6f009ad
üst
dca29d67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
uiwriter.cxx
sw/qa/extras/uiwriter/uiwriter.cxx
+7
-0
unofield.cxx
sw/source/core/unocore/unofield.cxx
+14
-0
No files found.
sw/qa/extras/uiwriter/uiwriter.cxx
Dosyayı görüntüle @
26085120
...
...
@@ -443,6 +443,13 @@ void SwUiWriterTest::testCommentedWord()
SwShellCrsr
*
pShellCrsr
=
pWrtShell
->
getShellCrsr
(
false
);
// This was 9, only "word", not "word<anchor character>" was selected.
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
10
),
pShellCrsr
->
End
()
->
nContent
.
GetIndex
());
// Test that getAnchor() points to "word", not to an empty string.
uno
::
Reference
<
text
::
XTextFieldsSupplier
>
xTextFieldsSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
xFieldsAccess
(
xTextFieldsSupplier
->
getTextFields
());
uno
::
Reference
<
container
::
XEnumeration
>
xFields
(
xFieldsAccess
->
createEnumeration
());
uno
::
Reference
<
text
::
XTextContent
>
xField
(
xFields
->
nextElement
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"word"
),
xField
->
getAnchor
()
->
getString
());
}
...
...
sw/source/core/unocore/unofield.cxx
Dosyayı görüntüle @
26085120
...
...
@@ -2078,6 +2078,20 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception)
if
(
pPamForTxtFld
.
get
()
==
NULL
)
return
0
;
// If this is a postit field, then return the range of its annotation mark if it has one.
if
(
const
SwPostItField
*
pPostItField
=
dynamic_cast
<
const
SwPostItField
*>
(
pField
))
{
IDocumentMarkAccess
*
pMarkAccess
=
m_pImpl
->
m_pDoc
->
getIDocumentMarkAccess
();
for
(
IDocumentMarkAccess
::
const_iterator_t
ppMark
=
pMarkAccess
->
getAnnotationMarksBegin
();
ppMark
!=
pMarkAccess
->
getAnnotationMarksEnd
();
++
ppMark
)
{
if
(
ppMark
->
get
()
->
GetName
()
==
pPostItField
->
GetName
())
{
pPamForTxtFld
.
reset
(
new
SwPaM
(
ppMark
->
get
()
->
GetMarkStart
(),
ppMark
->
get
()
->
GetMarkEnd
()));
break
;
}
}
}
uno
::
Reference
<
text
::
XTextRange
>
xRange
=
SwXTextRange
::
CreateXTextRange
(
*
m_pImpl
->
m_pDoc
,
*
(
pPamForTxtFld
->
GetPoint
()),
pPamForTxtFld
->
GetMark
());
return
xRange
;
...
...
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