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
e0284f4b
Kaydet (Commit)
e0284f4b
authored
Mar 14, 2011
tarafından
npcdoom
Kaydeden (comit)
Thorsten Behrens
Mar 14, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove usage of deprecated container List in sd.
üst
923452cf
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
151 additions
and
120 deletions
+151
-120
fuinsfil.cxx
sd/source/ui/func/fuinsfil.cxx
+6
-4
fuprobjs.cxx
sd/source/ui/func/fuprobjs.cxx
+11
-5
OutlineView.hxx
sd/source/ui/inc/OutlineView.hxx
+2
-2
drawview.cxx
sd/source/ui/view/drawview.cxx
+10
-5
drtxtob.cxx
sd/source/ui/view/drtxtob.cxx
+10
-9
outlnvsh.cxx
sd/source/ui/view/outlnvsh.cxx
+52
-34
outlview.cxx
sd/source/ui/view/outlview.cxx
+60
-61
No files found.
sd/source/ui/func/fuinsfil.cxx
Dosyayı görüntüle @
e0284f4b
...
...
@@ -630,14 +630,16 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
nFormat
=
EE_FORMAT_HTML
;
::
Outliner
*
pDocliner
=
static_cast
<
OutlineView
*>
(
mpView
)
->
GetOutliner
();
List
*
pList
=
pDocliner
->
GetView
(
0
)
->
CreateSelectionList
();
Paragraph
*
pPara
=
(
Paragraph
*
)
pList
->
First
();
std
::
vector
<
Paragraph
*>
aSelList
;
pDocliner
->
GetView
(
0
)
->
CreateSelectionList
(
aSelList
);
Paragraph
*
pPara
=
aSelList
.
empty
()
?
NULL
:
*
(
aSelList
.
begin
());
// wo soll eingefuegt werden?
while
(
!
pDocliner
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
)
)
{
pPara
=
pDocliner
->
GetParent
(
pPara
);
}
ULONG
nTargetPos
=
pDocliner
->
GetAbsPos
(
pPara
)
+
1
;
// Layout der Vorgaengerseite uebernehmen
...
...
sd/source/ui/func/fuprobjs.cxx
Dosyayı görüntüle @
e0284f4b
...
...
@@ -99,13 +99,20 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
OutlineView
*
pOlView
=
static_cast
<
OutlineView
*>
(
pOutlineViewShell
->
GetView
());
OutlinerView
*
pOutlinerView
=
pOlView
->
GetViewByWindow
(
(
Window
*
)
mpWindow
);
::
Outliner
*
pOutl
=
pOutlinerView
->
GetOutliner
();
List
*
pList
=
pOutlinerView
->
CreateSelectionList
();
Paragraph
*
pPara
=
(
Paragraph
*
)
pList
->
First
();
std
::
vector
<
Paragraph
*>
aSelList
;
pOutlinerView
->
CreateSelectionList
(
aSelList
);
std
::
vector
<
Paragraph
*>::
const_iterator
iter
=
aSelList
.
begin
();
Paragraph
*
pPara
=
aSelList
.
empty
()
?
NULL
:
*
iter
;
nDepth
=
pOutl
->
GetDepth
((
USHORT
)
pOutl
->
GetAbsPos
(
pPara
)
);
bool
bPage
=
pOutl
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
);
while
(
pPara
)
while
(
iter
!=
aSelList
.
end
()
)
{
pPara
=
*
iter
;
nTmp
=
pOutl
->
GetDepth
((
USHORT
)
pOutl
->
GetAbsPos
(
pPara
)
);
if
(
nDepth
!=
nTmp
)
...
...
@@ -120,8 +127,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
break
;
}
bUnique
=
TRUE
;
pPara
=
(
Paragraph
*
)
pList
->
Next
();
++
iter
;
}
if
(
bUnique
)
...
...
sd/source/ui/inc/OutlineView.hxx
Dosyayı görüntüle @
e0284f4b
...
...
@@ -191,8 +191,8 @@ private:
SdrOutliner
*
mpOutliner
;
OutlinerView
*
mpOutlinerView
[
MAX_OUTLINERVIEWS
];
List
*
mp
OldParaOrder
;
List
*
mp
SelectedParas
;
std
::
vector
<
Paragraph
*>
ma
OldParaOrder
;
std
::
vector
<
Paragraph
*>
ma
SelectedParas
;
USHORT
mnPagesToProcess
;
// fuer die Fortschrittsanzeige
USHORT
mnPagesProcessed
;
...
...
sd/source/ui/view/drawview.cxx
Dosyayı görüntüle @
e0284f4b
...
...
@@ -206,7 +206,7 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
// Presentation object outline
OutlinerView
*
pOV
=
GetTextEditOutlinerView
();
::
Outliner
*
pOutliner
=
pOV
->
GetOutliner
();
List
*
pList
=
(
List
*
)
pOV
->
CreateSelectionList
();
aTemplateName
+=
String
(
SdResId
(
STR_LAYOUT_OUTLINE
));
pOutliner
->
SetUpdateMode
(
FALSE
);
...
...
@@ -219,7 +219,12 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
aComment
.
Insert
(
String
((
SdResId
(
STR_PSEUDOSHEET_OUTLINE
))),
nPos
);
mpDocSh
->
GetUndoManager
()
->
EnterListAction
(
aComment
,
String
()
);
Paragraph
*
pPara
=
(
Paragraph
*
)
pList
->
Last
();
std
::
vector
<
Paragraph
*>
aSelList
;
pOV
->
CreateSelectionList
(
aSelList
);
std
::
vector
<
Paragraph
*>::
reverse_iterator
iter
=
aSelList
.
rbegin
();
Paragraph
*
pPara
=
iter
!=
aSelList
.
rend
()
?
*
iter
:
NULL
;
while
(
pPara
)
{
ULONG
nParaPos
=
pOutliner
->
GetAbsPos
(
pPara
);
...
...
@@ -260,10 +265,11 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
pOutlSheet
->
Broadcast
(
SfxSimpleHint
(
SFX_HINT_DATACHANGED
));
}
pPara
=
(
Paragraph
*
)
pList
->
Prev
();
++
iter
;
pPara
=
iter
!=
aSelList
.
rend
()
?
*
iter
:
NULL
;
if
(
!
pPara
&&
nDepth
>
0
&&
rSet
.
GetItemState
(
EE_PARA_NUMBULLET
)
==
SFX_ITEM_ON
&&
pOutliner
->
GetDepth
(
(
USHORT
)
pOutliner
->
GetAbsPos
(
(
Paragraph
*
)
pList
->
First
()
)
)
>
0
)
pOutliner
->
GetDepth
(
(
USHORT
)
pOutliner
->
GetAbsPos
(
*
(
aSelList
.
begin
())
)
)
>
0
)
pPara
=
pOutliner
->
GetParagraph
(
0
);
// Put NumBulletItem in outline level 1
}
...
...
@@ -272,7 +278,6 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh
->
GetUndoManager
()
->
LeaveListAction
();
delete
pList
;
bOk
=
TRUE
;
}
else
...
...
sd/source/ui/view/drtxtob.cxx
Dosyayı görüntüle @
e0284f4b
...
...
@@ -262,8 +262,10 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
{
// Outliner im Gliederungsmodus
::
Outliner
*
pOutl
=
pOLV
->
GetOutliner
();
List
*
pList
=
pOLV
->
CreateSelectionList
();
Paragraph
*
pPara
=
(
Paragraph
*
)
pList
->
First
();
std
::
vector
<
Paragraph
*>
aSelList
;
pOLV
->
CreateSelectionList
(
aSelList
);
Paragraph
*
pPara
=
aSelList
.
empty
()
?
NULL
:
*
(
aSelList
.
begin
());
// find out if we are a OutlineView
BOOL
bIsOutlineView
(
OUTLINERMODE_OUTLINEVIEW
==
pOLV
->
GetOutliner
()
->
GetMode
());
...
...
@@ -289,8 +291,10 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
}
while
(
pPara
)
for
(
std
::
vector
<
Paragraph
*>::
const_iterator
iter
=
aSelList
.
begin
();
iter
!=
aSelList
.
end
();
++
iter
)
{
pPara
=
*
iter
;
sal_Int16
nDepth
=
pOutl
->
GetDepth
(
(
USHORT
)
pOutl
->
GetAbsPos
(
pPara
)
);
if
(
nDepth
>
0
||
(
bOutlineViewSh
&&
(
nDepth
<=
0
)
&&
!
pOutl
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
))
)
...
...
@@ -305,11 +309,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
// Nicht maximale Tiefe und nicht ganz oben
bDisableRight
=
FALSE
;
}
pPara
=
static_cast
<
Paragraph
*>
(
pList
->
Next
()
);
}
if
(
(
pOutl
->
GetAbsPos
(
(
Paragraph
*
)
pList
->
Last
()
)
<
pOutl
->
GetParagraphCount
()
-
1
)
&&
if
(
(
pOutl
->
GetAbsPos
(
pPara
)
<
pOutl
->
GetParagraphCount
()
-
1
)
&&
(
pOutl
->
GetParagraphCount
()
>
1
||
!
bOutlineViewSh
)
)
{
// Nicht letzter Absatz
...
...
@@ -317,7 +319,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
// disable when first para and 2nd is not a title
pPara
=
static_cast
<
Paragraph
*
>
(
pList
->
First
()
);
pPara
=
aSelList
.
empty
()
?
NULL
:
*
(
aSelList
.
begin
());
if
(
!
bDisableDown
&&
bIsOutlineView
&&
pPara
&&
0
==
pOutl
->
GetAbsPos
(
pPara
)
...
...
@@ -327,8 +330,6 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
// Needs to be disabled
bDisableDown
=
TRUE
;
}
delete
pList
;
}
if
(
bDisableLeft
)
...
...
sd/source/ui/view/outlnvsh.cxx
Dosyayı görüntüle @
e0284f4b
...
...
@@ -862,29 +862,39 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
BOOL
bDisableExpand
=
TRUE
;
BOOL
bUnique
=
TRUE
;
OutlinerView
*
pOutlinerView
=
pOlView
->
GetViewByWindow
(
GetActiveWindow
());
List
*
pList
=
pOutlinerView
->
CreateSelectionList
();
Paragraph
*
pPara
=
(
Paragraph
*
)
pList
->
First
();
s
al_Int16
nDepth
;
sal_Int16
nTmpDepth
=
pOutl
->
GetDepth
(
(
USHORT
)
pOutl
->
GetAbsPos
(
pPara
)
);
bool
bPage
=
pOutl
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
);
while
(
pPara
)
s
td
::
vector
<
Paragraph
*>
aSelList
;
pOutlinerView
->
CreateSelectionList
(
aSelList
);
if
(
!
aSelList
.
empty
()
)
{
nDepth
=
pOutl
->
GetDepth
(
(
USHORT
)
pOutl
->
GetAbsPos
(
pPara
)
);
std
::
vector
<
Paragraph
*>::
const_iterator
iter
=
aSelList
.
begin
();
Paragraph
*
pPara
=
*
iter
;
if
(
nDepth
!=
nTmpDepth
)
bUnique
=
FALSE
;
if
(
bPage
!=
pOutl
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
)
)
bUnique
=
FALSE
;
if
(
!
pOutl
->
IsExpanded
(
pPara
)
&&
pOutl
->
HasChilds
(
pPara
))
bDisableExpand
=
FALSE
;
if
(
pOutl
->
IsExpanded
(
pPara
)
&&
pOutl
->
HasChilds
(
pPara
))
bDisableCollapse
=
FALSE
;
sal_Int16
nDepth
;
sal_Int16
nTmpDepth
=
pOutl
->
GetDepth
(
(
USHORT
)
pOutl
->
GetAbsPos
(
pPara
)
);
bool
bPage
=
pOutl
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
);
pPara
=
(
Paragraph
*
)
pList
->
Next
();
}
while
(
iter
!=
aSelList
.
begin
())
{
pPara
=
*
iter
;
delete
pList
;
nDepth
=
pOutl
->
GetDepth
(
(
USHORT
)
pOutl
->
GetAbsPos
(
pPara
)
);
if
(
nDepth
!=
nTmpDepth
||
bPage
!=
pOutl
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
))
bUnique
=
FALSE
;
if
(
pOutl
->
HasChilds
(
pPara
))
{
if
(
!
pOutl
->
IsExpanded
(
pPara
))
bDisableExpand
=
FALSE
;
else
bDisableCollapse
=
FALSE
;
}
++
iter
;
}
}
if
(
bDisableExpand
)
rSet
.
DisableItem
(
SID_OUTLINE_EXPAND
);
...
...
@@ -919,7 +929,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if
(
bDisableCollapseAll
||
bDisableExpandAll
)
{
ULONG
nParaPos
=
0
;
pPara
=
pOutl
->
GetParagraph
(
nParaPos
);
Paragraph
*
pPara
=
pOutl
->
GetParagraph
(
nParaPos
);
while
(
pPara
&&
(
bDisableCollapseAll
||
bDisableExpandAll
))
{
if
(
!
pOutl
->
IsExpanded
(
pPara
)
&&
pOutl
->
HasChilds
(
pPara
))
...
...
@@ -1393,9 +1403,18 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
::
sd
::
Window
*
pWin
=
GetActiveWindow
();
OutlinerView
*
pActiveView
=
pOlView
->
GetViewByWindow
(
pWin
);
::
Outliner
*
pOutliner
=
pOlView
->
GetOutliner
();
List
*
pSelList
=
(
List
*
)
pActiveView
->
CreateSelectionList
();
Paragraph
*
pFirstPara
=
(
Paragraph
*
)
pSelList
->
First
();
Paragraph
*
pLastPara
=
(
Paragraph
*
)
pSelList
->
Last
();
std
::
vector
<
Paragraph
*>
aSelList
;
pActiveView
->
CreateSelectionList
(
aSelList
);
Paragraph
*
pFirstPara
=
NULL
;
Paragraph
*
pLastPara
=
NULL
;
if
(
!
aSelList
.
empty
())
{
pFirstPara
=
*
(
aSelList
.
begin
());
pLastPara
=
*
(
aSelList
.
rbegin
());
}
if
(
!
pOutliner
->
HasParaFlag
(
pFirstPara
,
PARAFLAG_ISPAGE
)
)
pFirstPara
=
pOlView
->
GetPrevTitle
(
pFirstPara
);
...
...
@@ -1403,8 +1422,6 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
if
(
!
pOutliner
->
HasParaFlag
(
pLastPara
,
PARAFLAG_ISPAGE
)
)
pLastPara
=
pOlView
->
GetPrevTitle
(
pLastPara
);
delete
pSelList
;
// has been created only for us
// only one page selected?
if
(
pFirstPara
==
pLastPara
)
{
...
...
@@ -1759,12 +1776,6 @@ SdPage* OutlineViewShell::GetActualPage()
String
OutlineViewShell
::
GetPageRangeString
()
{
::
sd
::
Window
*
pWin
=
GetActiveWindow
();
OutlinerView
*
pActiveView
=
pOlView
->
GetViewByWindow
(
pWin
);
::
Outliner
*
pOutl
=
pActiveView
->
GetOutliner
();
List
*
pSelList
=
(
List
*
)
pActiveView
->
CreateSelectionList
();
Paragraph
*
pPara
=
(
Paragraph
*
)
pSelList
->
First
();
String
aStrPageRange
;
BOOL
bFirstPageNo
=
TRUE
;
BOOL
bOpenRange
=
FALSE
;
...
...
@@ -1776,8 +1787,18 @@ String OutlineViewShell::GetPageRangeString()
if
(
(
(
SdPage
*
)
GetDoc
()
->
GetPage
(
n
)
)
->
GetPageKind
()
==
PK_STANDARD
)
nPageCount
++
;
while
(
pPara
)
::
sd
::
Window
*
pWin
=
GetActiveWindow
();
OutlinerView
*
pActiveView
=
pOlView
->
GetViewByWindow
(
pWin
);
::
Outliner
*
pOutl
=
pActiveView
->
GetOutliner
();
std
::
vector
<
Paragraph
*>
aSelList
;
pActiveView
->
CreateSelectionList
(
aSelList
);
Paragraph
*
pPara
=
NULL
;
for
(
std
::
vector
<
Paragraph
*>::
const_iterator
iter
=
aSelList
.
begin
();
iter
!=
aSelList
.
end
();
++
iter
)
{
pPara
=
*
iter
;
if
(
!
pOutl
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
)
)
{
pPara
=
pOlView
->
GetPrevTitle
(
pPara
);
...
...
@@ -1827,7 +1848,6 @@ String OutlineViewShell::GetPageRangeString()
}
nLastPage
=
nPageToSelect
;
pPara
=
(
Paragraph
*
)
pSelList
->
Next
();
}
if
(
bOpenRange
)
...
...
@@ -1843,8 +1863,6 @@ String OutlineViewShell::GetPageRangeString()
if
(
nPageCount
==
0
)
aStrPageRange
.
Erase
();
delete
pSelList
;
// has been created only for us
return
aStrPageRange
;
}
...
...
sd/source/ui/view/outlview.cxx
Dosyayı görüntüle @
e0284f4b
...
...
@@ -113,8 +113,6 @@ OutlineView::OutlineView( DrawDocShell* pDocSh, ::Window* pWindow, OutlineViewSh
:
::
sd
::
View
(
pDocSh
->
GetDoc
(),
pWindow
,
pOutlineViewSh
)
,
mpOutlineViewShell
(
pOutlineViewSh
)
,
mpOutliner
(
mpDoc
->
GetOutliner
(
TRUE
)
)
,
mpOldParaOrder
(
NULL
)
,
mpSelectedParas
(
NULL
)
,
mnPagesToProcess
(
0
)
,
mnPagesProcessed
(
0
)
,
mbFirstPaint
(
TRUE
)
...
...
@@ -669,14 +667,18 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
{
Window
*
pActWin
=
mpOutlineViewShell
->
GetActiveWindow
();
OutlinerView
*
pOlView
=
GetViewByWindow
(
pActWin
);
List
*
pList
=
pOlView
->
CreateSelectionList
();
Paragraph
*
pParagraph
=
(
Paragraph
*
)
pList
->
First
();
while
(
pParagraph
)
std
::
vector
<
Paragraph
*>
aSelList
;
pOlView
->
CreateSelectionList
(
aSelList
);
Paragraph
*
pParagraph
=
NULL
;
for
(
std
::
vector
<
Paragraph
*>::
const_iterator
iter
=
aSelList
.
begin
();
iter
!=
aSelList
.
end
();
++
iter
)
{
if
(
!
pOutliner
->
HasParaFlag
(
pParagraph
,
PARAFLAG_ISPAGE
)
&&
(
pOutliner
->
GetDepth
(
(
USHORT
)
pOutliner
->
GetAbsPos
(
pParagraph
)
)
<=
0
)
)
pParagraph
=
*
iter
;
if
(
!
pOutliner
->
HasParaFlag
(
pParagraph
,
PARAFLAG_ISPAGE
)
&&
(
pOutliner
->
GetDepth
(
(
USHORT
)
pOutliner
->
GetAbsPos
(
pParagraph
)
)
<=
0
)
)
mnPagesToProcess
++
;
pParagraph
=
(
Paragraph
*
)
pList
->
Next
();
}
mnPagesToProcess
++
;
// the paragraph being in level 0 already
...
...
@@ -695,7 +697,6 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
{
mpDocSh
->
SetWaitCursor
(
TRUE
);
}
delete
pList
;
}
ParagraphInsertedHdl
(
pOutliner
);
...
...
@@ -923,41 +924,35 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner )
OutlineViewPageChangesGuard
aGuard
(
this
);
mpOldParaOrder
=
new
List
;
// list of selected title paragraphs
mp
SelectedParas
=
mpOutlinerView
[
0
]
->
CreateSelectionList
(
);
Paragraph
*
pPara
=
static_cast
<
Paragraph
*>
(
mpSelectedParas
->
First
());
while
(
pPara
)
mp
OutlinerView
[
0
]
->
CreateSelectionList
(
maSelectedParas
);
for
(
std
::
vector
<
Paragraph
*>::
iterator
it
=
maSelectedParas
.
begin
();
it
!=
maSelectedParas
.
end
();
)
{
if
(
!
pOutliner
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
)
)
{
mpSelectedParas
->
Remove
();
pPara
=
static_cast
<
Paragraph
*>
(
mpSelectedParas
->
GetCurObject
());
}
if
(
!
pOutliner
->
HasParaFlag
(
*
it
,
PARAFLAG_ISPAGE
))
it
=
maSelectedParas
.
erase
(
it
);
else
{
pPara
=
static_cast
<
Paragraph
*>
(
mpSelectedParas
->
Next
());
}
++
it
;
}
// select the pages belonging to the paragraphs on level 0 to select
USHORT
nPos
=
0
;
ULONG
nParaPos
=
0
;
pPara
=
pOutliner
->
GetParagraph
(
0
);
Paragraph
*
pPara
=
pOutliner
->
GetParagraph
(
0
);
std
::
vector
<
Paragraph
*>::
const_iterator
fiter
;
while
(
pPara
)
{
if
(
pOutliner
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
)
)
// one page?
{
m
pOldParaOrder
->
Insert
(
pPara
,
LIST_APPEND
);
m
aOldParaOrder
.
push_back
(
pPara
);
SdPage
*
pPage
=
mpDoc
->
GetSdPage
(
nPos
,
PK_STANDARD
);
pPage
->
SetSelected
(
FALSE
);
if
(
mpSelectedParas
->
Seek
(
pPara
))
// selected?
{
pPage
->
SetSelected
(
TRUE
);
}
nPos
++
;
fiter
=
std
::
find
(
maSelectedParas
.
begin
(),
maSelectedParas
.
end
(),
pPara
);
pPage
->
SetSelected
(
fiter
!=
maSelectedParas
.
end
()
);
++
nPos
;
}
pPara
=
pOutliner
->
GetParagraph
(
++
nParaPos
);
}
...
...
@@ -975,12 +970,10 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner )
{
OutlineViewPageChangesGuard
aGuard
(
this
);
DBG_ASSERT
(
mpSelectedParas
,
"keine Absatzliste"
);
DBG_ASSERT
(
mpOldParaOrder
,
"keine Absatzliste"
);
DBG_ASSERT
(
isRecordingUndo
(),
"sd::OutlineView::EndMovingHdl(), model change without undo?!"
);
// look for insertion position via the first paragraph
Paragraph
*
pSearchIt
=
(
Paragraph
*
)
mpSelectedParas
->
First
(
);
Paragraph
*
pSearchIt
=
maSelectedParas
.
empty
()
?
NULL
:
*
(
maSelectedParas
.
begin
()
);
// look for the first of the selected paragraphs in the new ordering
USHORT
nPosNewOrder
=
0
;
...
...
@@ -1005,14 +998,22 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner )
else
{
// look for the predecessor in the old ordering
nPos
=
(
USHORT
)
mpOldParaOrder
->
GetPos
(
pPrev
);
std
::
vector
<
Paragraph
*>::
const_iterator
it
=
std
::
find
(
maOldParaOrder
.
begin
(),
maOldParaOrder
.
end
(),
pPrev
);
if
(
it
!=
maOldParaOrder
.
end
())
nPos
=
static_cast
<
USHORT
>
(
it
-
maOldParaOrder
.
begin
());
else
nPos
=
0xffff
;
DBG_ASSERT
(
nPos
!=
0xffff
,
"Absatz nicht gefunden"
);
}
mpDoc
->
MovePages
(
nPos
);
// deselect the pages again
USHORT
nPageCount
=
(
USHORT
)
m
pSelectedParas
->
Count
();
USHORT
nPageCount
=
(
USHORT
)
m
aSelectedParas
.
size
();
while
(
nPageCount
)
{
SdPage
*
pPage
=
mpDoc
->
GetSdPage
(
nPosNewOrder
,
PK_STANDARD
);
...
...
@@ -1023,10 +1024,8 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner )
pOutliner
->
UpdateFields
();
delete
mpSelectedParas
;
mpSelectedParas
=
NULL
;
delete
mpOldParaOrder
;
mpOldParaOrder
=
NULL
;
maSelectedParas
.
clear
();
maOldParaOrder
.
clear
();
InvalidateSlideNumberArea
();
...
...
@@ -1350,17 +1349,22 @@ SdPage* OutlineView::GetActualPage()
{
::
sd
::
Window
*
pWin
=
mpOutlineViewShell
->
GetActiveWindow
();
OutlinerView
*
pActiveView
=
GetViewByWindow
(
pWin
);
std
::
auto_ptr
<
List
>
pSelList
(
static_cast
<
List
*
>
(
pActiveView
->
CreateSelectionList
())
);
SdPage
*
pCurrent
=
GetPageForParagraph
(
static_cast
<
Paragraph
*>
(
pSelList
->
First
())
);
std
::
vector
<
Paragraph
*>
aSelList
;
pActiveView
->
CreateSelectionList
(
aSelList
);
Paragraph
*
pPar
=
aSelList
.
empty
()
?
NULL
:
*
(
aSelList
.
begin
());
SdPage
*
pCurrent
=
GetPageForParagraph
(
pPar
);
DBG_ASSERT
(
pCurrent
||
(
mpDocSh
->
GetUndoManager
()
&&
static_cast
<
sd
::
UndoManager
*>
(
mpDocSh
->
GetUndoManager
())
->
isInUndo
())
||
maDragAndDropModelGuard
.
get
(),
"sd::OutlineView::GetActualPage(), no current page?"
);
if
(
pCurrent
)
return
pCurrent
;
else
return
mpDoc
->
GetSdPage
(
0
,
PK_STANDARD
);
return
mpDoc
->
GetSdPage
(
0
,
PK_STANDARD
);
}
SdPage
*
OutlineView
::
GetPageForParagraph
(
Paragraph
*
pPara
)
...
...
@@ -1378,8 +1382,8 @@ SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara )
if
(
nPageToSelect
<
(
sal_uInt32
)
mpDoc
->
GetSdPageCount
(
PK_STANDARD
)
)
return
static_cast
<
SdPage
*
>
(
mpDoc
->
GetSdPage
(
(
USHORT
)
nPageToSelect
,
PK_STANDARD
)
);
else
return
0
;
return
0
;
}
Paragraph
*
OutlineView
::
GetParagraphForPage
(
::
Outliner
*
pOutl
,
SdPage
*
pPage
)
...
...
@@ -1447,26 +1451,22 @@ SfxStyleSheet* OutlineView::GetStyleSheet() const
void
OutlineView
::
SetSelectedPages
()
{
// list of selected title paragraphs
List
*
pSelParas
=
mpOutlinerView
[
0
]
->
CreateSelectionList
()
;
Paragraph
*
pPara
=
(
Paragraph
*
)
pSelParas
->
First
(
);
std
::
vector
<
Paragraph
*>
aSelParas
;
mpOutlinerView
[
0
]
->
CreateSelectionList
(
aSelParas
);
while
(
pPara
)
for
(
std
::
vector
<
Paragraph
*>::
iterator
it
=
aSelParas
.
begin
();
it
!=
aSelParas
.
end
();
)
{
if
(
!
mpOutliner
->
HasParaFlag
(
pPara
,
PARAFLAG_ISPAGE
)
)
{
pSelParas
->
Remove
();
pPara
=
(
Paragraph
*
)
pSelParas
->
GetCurObject
();
}
if
(
!
mpOutliner
->
HasParaFlag
(
*
it
,
PARAFLAG_ISPAGE
))
it
=
aSelParas
.
erase
(
it
);
else
{
pPara
=
(
Paragraph
*
)
pSelParas
->
Next
();
}
++
it
;
}
// select the pages belonging to the paragraphs on level 0 to select
USHORT
nPos
=
0
;
ULONG
nParaPos
=
0
;
pPara
=
mpOutliner
->
GetParagraph
(
0
);
Paragraph
*
pPara
=
mpOutliner
->
GetParagraph
(
0
);
std
::
vector
<
Paragraph
*>::
const_iterator
fiter
;
while
(
pPara
)
{
...
...
@@ -1475,12 +1475,11 @@ void OutlineView::SetSelectedPages()
SdPage
*
pPage
=
mpDoc
->
GetSdPage
(
nPos
,
PK_STANDARD
);
DBG_ASSERT
(
pPage
!=
NULL
,
"Trying to select non-existing page OutlineView::SetSelectedPages()"
);
if
(
pPage
!=
NULL
)
{
pPage
->
SetSelected
(
FALSE
);
if
(
pSelParas
->
Seek
(
pPara
))
// selected?
pPage
->
SetSelected
(
TRUE
);
if
(
pPage
)
{
fiter
=
std
::
find
(
aSelParas
.
begin
(),
aSelParas
.
end
(),
pPara
);
pPage
->
SetSelected
(
fiter
!=
aSelParas
.
end
());
}
nPos
++
;
...
...
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