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
8d9991c9
Kaydet (Commit)
8d9991c9
authored
Tem 19, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
TextFieldmark::ReleaseDoc: properly remove text fieldmarks from SwDoc
Change-Id: I7b11cf78f106807561be77c51641796319aaf636
üst
672ca607
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
bookmrk.cxx
sw/source/core/crsr/bookmrk.cxx
+37
-0
docbm.cxx
sw/source/core/doc/docbm.cxx
+4
-1
bookmrk.hxx
sw/source/core/inc/bookmrk.hxx
+1
-0
No files found.
sw/source/core/crsr/bookmrk.cxx
Dosyayı görüntüle @
8d9991c9
...
@@ -98,6 +98,38 @@ namespace
...
@@ -98,6 +98,38 @@ namespace
}
}
io_pDoc
->
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_UI_REPLACE
,
NULL
);
io_pDoc
->
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_UI_REPLACE
,
NULL
);
};
};
static
void
lcl_RemoveFieldMarks
(
Fieldmark
*
const
pField
,
SwDoc
*
const
io_pDoc
,
const
sal_Unicode
aStartMark
,
const
sal_Unicode
aEndMark
)
{
SwPosition
&
rStart
=
pField
->
GetMarkStart
();
SwPosition
&
rEnd
=
pField
->
GetMarkEnd
();
SwTxtNode
const
*
const
pStartTxtNode
=
rStart
.
nNode
.
GetNode
().
GetTxtNode
();
SwTxtNode
const
*
const
pEndTxtNode
=
rEnd
.
nNode
.
GetNode
().
GetTxtNode
();
const
sal_Unicode
ch_start
=
pStartTxtNode
->
GetTxt
().
GetChar
(
rStart
.
nContent
.
GetIndex
());
xub_StrLen
nEndPos
=
(
rEnd
==
rStart
||
rEnd
.
nContent
.
GetIndex
()
==
0
)
?
rEnd
.
nContent
.
GetIndex
()
:
rEnd
.
nContent
.
GetIndex
()
-
1
;
const
sal_Unicode
ch_end
=
pEndTxtNode
->
GetTxt
().
GetChar
(
nEndPos
);
SwPaM
aStartPaM
(
rStart
);
SwPaM
aEndPaM
(
rEnd
);
io_pDoc
->
GetIDocumentUndoRedo
().
StartUndo
(
UNDO_UI_REPLACE
,
NULL
);
if
(
ch_start
==
aStartMark
)
{
SwPaM
aStart
(
rStart
,
rStart
);
aStart
.
End
()
->
nContent
++
;
io_pDoc
->
DeleteRange
(
aStart
);
}
if
(
ch_end
==
aEndMark
)
{
SwPaM
aEnd
(
rEnd
,
rEnd
);
aEnd
.
Start
()
->
nContent
--
;
io_pDoc
->
DeleteRange
(
aEnd
);
}
io_pDoc
->
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_UI_REPLACE
,
NULL
);
};
}
}
namespace
sw
{
namespace
mark
namespace
sw
{
namespace
mark
...
@@ -316,6 +348,11 @@ namespace sw { namespace mark
...
@@ -316,6 +348,11 @@ namespace sw { namespace mark
lcl_AssureFieldMarksSet
(
this
,
io_pDoc
,
CH_TXT_ATR_FIELDSTART
,
CH_TXT_ATR_FIELDEND
);
lcl_AssureFieldMarksSet
(
this
,
io_pDoc
,
CH_TXT_ATR_FIELDSTART
,
CH_TXT_ATR_FIELDEND
);
}
}
void
TextFieldmark
::
ReleaseDoc
(
SwDoc
*
const
pDoc
)
{
lcl_RemoveFieldMarks
(
this
,
pDoc
,
CH_TXT_ATR_FIELDSTART
,
CH_TXT_ATR_FIELDEND
);
}
CheckboxFieldmark
::
CheckboxFieldmark
(
const
SwPaM
&
rPaM
)
CheckboxFieldmark
::
CheckboxFieldmark
(
const
SwPaM
&
rPaM
)
:
Fieldmark
(
rPaM
)
:
Fieldmark
(
rPaM
)
{
}
{
}
...
...
sw/source/core/doc/docbm.cxx
Dosyayı görüntüle @
8d9991c9
...
@@ -593,7 +593,7 @@ namespace sw { namespace mark
...
@@ -593,7 +593,7 @@ namespace sw { namespace mark
isPosInRange
=
true
,
isOtherPosInRange
=
true
;
isPosInRange
=
true
,
isOtherPosInRange
=
true
;
}
}
if
(
isPosInRange
&&
(
isOtherPosInRange
||
!
pMark
->
IsExpanded
()))
if
(
isPosInRange
&&
(
isOtherPosInRange
||
!
pMark
->
IsExpanded
()
||
IDocumentMarkAccess
::
GetType
(
*
pMark
)
==
TEXT_FIELDMARK
))
{
{
// completely in range
// completely in range
...
@@ -697,6 +697,9 @@ namespace sw { namespace mark
...
@@ -697,6 +697,9 @@ namespace sw { namespace mark
"<MarkManager::deleteMark(..)>"
"<MarkManager::deleteMark(..)>"
" - Bookmark not found."
);
" - Bookmark not found."
);
m_vFieldmarks
.
erase
(
ppFieldmark
);
m_vFieldmarks
.
erase
(
ppFieldmark
);
sw
::
mark
::
TextFieldmark
*
pTextFieldmark
=
dynamic_cast
<
sw
::
mark
::
TextFieldmark
*>
(
ppMark
->
get
());
if
(
pTextFieldmark
)
pTextFieldmark
->
ReleaseDoc
(
m_pDoc
);
break
;
break
;
}
}
case
IDocumentMarkAccess
:
:
NAVIGATOR_REMINDER
:
case
IDocumentMarkAccess
:
:
NAVIGATOR_REMINDER
:
...
...
sw/source/core/inc/bookmrk.hxx
Dosyayı görüntüle @
8d9991c9
...
@@ -237,6 +237,7 @@ namespace sw {
...
@@ -237,6 +237,7 @@ namespace sw {
public
:
public
:
TextFieldmark
(
const
SwPaM
&
rPaM
);
TextFieldmark
(
const
SwPaM
&
rPaM
);
virtual
void
InitDoc
(
SwDoc
*
const
io_pDoc
);
virtual
void
InitDoc
(
SwDoc
*
const
io_pDoc
);
void
ReleaseDoc
(
SwDoc
*
const
pDoc
);
};
};
class
CheckboxFieldmark
class
CheckboxFieldmark
...
...
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