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
4ba49781
Kaydet (Commit)
4ba49781
authored
Agu 03, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
split CalcHiddenRanges into hidden text and redline deletion handlers
Change-Id: I17f0a5e0a076af86a49070debe2c4990fcd95e21
üst
00f1a3ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
17 deletions
+27
-17
scriptinfo.hxx
sw/source/core/inc/scriptinfo.hxx
+3
-2
porlay.cxx
sw/source/core/text/porlay.cxx
+24
-15
No files found.
sw/source/core/inc/scriptinfo.hxx
Dosyayı görüntüle @
4ba49781
...
...
@@ -130,8 +130,9 @@ public:
inline
size_t
CountHiddenChg
()
const
;
inline
xub_StrLen
GetHiddenChg
(
const
size_t
nCnt
)
const
;
static
void
CalcHiddenRanges
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
);
static
void
CalcHiddenRanges
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
);
static
void
selectHiddenTextProperty
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
);
static
void
selectRedLineDeleted
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
,
bool
bSelect
=
true
);
// "high" level operations, nPos refers to string position
xub_StrLen
NextScriptChg
(
const
xub_StrLen
nPos
)
const
;
...
...
sw/source/core/text/porlay.cxx
Dosyayı görüntüle @
4ba49781
...
...
@@ -2192,14 +2192,7 @@ SwTwips SwTxtFrm::HangingMargin() const
return
nRet
;
}
/*************************************************************************
* SwScriptInfo::CalcHiddenRanges()
*
* Returns a MultiSection indicating the hidden ranges.
*************************************************************************/
void
SwScriptInfo
::
CalcHiddenRanges
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
)
void
SwScriptInfo
::
selectHiddenTextProperty
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
)
{
const
SfxPoolItem
*
pItem
=
0
;
if
(
SFX_ITEM_SET
==
rNode
.
GetSwAttrSet
().
GetItemState
(
RES_CHRATR_HIDDEN
,
sal_True
,
&
pItem
)
&&
...
...
@@ -2209,7 +2202,6 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
}
const
SwpHints
*
pHints
=
rNode
.
GetpSwpHints
();
const
SwTxtAttr
*
pTxtAttr
=
0
;
if
(
pHints
)
{
...
...
@@ -2217,8 +2209,9 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
while
(
nTmp
<
pHints
->
GetStartCount
()
)
{
pTxtAttr
=
pHints
->
GetStart
(
nTmp
++
);
const
SvxCharHiddenItem
*
pHiddenItem
=
static_cast
<
const
SvxCharHiddenItem
*>
(
CharFmt
::
GetItem
(
*
pTxtAttr
,
RES_CHRATR_HIDDEN
)
);
const
SwTxtAttr
*
pTxtAttr
=
pHints
->
GetStart
(
nTmp
++
);
const
SvxCharHiddenItem
*
pHiddenItem
=
static_cast
<
const
SvxCharHiddenItem
*>
(
CharFmt
::
GetItem
(
*
pTxtAttr
,
RES_CHRATR_HIDDEN
)
);
if
(
pHiddenItem
)
{
xub_StrLen
nSt
=
*
pTxtAttr
->
GetStart
();
...
...
@@ -2231,11 +2224,12 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
}
}
}
}
// If there are any hidden ranges in the current text node, we have
// to unhide the redlining ranges:
void
SwScriptInfo
::
selectRedLineDeleted
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
,
bool
bSelect
)
{
const
IDocumentRedlineAccess
&
rIDRA
=
*
rNode
.
getIDocumentRedlineAccess
();
if
(
rHiddenMulti
.
GetRangeCount
()
&&
IDocumentRedlineAccess
::
IsShowChanges
(
rIDRA
.
GetRedlineMode
()
)
)
if
(
IDocumentRedlineAccess
::
IsShowChanges
(
rIDRA
.
GetRedlineMode
()
)
)
{
sal_uInt16
nAct
=
rIDRA
.
GetRedlinePos
(
rNode
,
USHRT_MAX
);
...
...
@@ -2252,10 +2246,25 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
if
(
nRedlnEnd
>
nRedlStart
)
{
Range
aTmp
(
nRedlStart
,
nRedlnEnd
-
1
);
rHiddenMulti
.
Select
(
aTmp
,
false
);
rHiddenMulti
.
Select
(
aTmp
,
bSelect
);
}
}
}
}
/*************************************************************************
* SwScriptInfo::CalcHiddenRanges()
*
* Returns a MultiSection indicating the hidden ranges.
*************************************************************************/
void
SwScriptInfo
::
CalcHiddenRanges
(
const
SwTxtNode
&
rNode
,
MultiSelection
&
rHiddenMulti
)
{
selectHiddenTextProperty
(
rNode
,
rHiddenMulti
);
// If there are any hidden ranges in the current text node, we have
// to unhide the redlining ranges:
selectRedLineDeleted
(
rNode
,
rHiddenMulti
,
false
);
//
// We calculated a lot of stuff. Finally we can update the flags at the text node.
...
...
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