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
903afaa8
Kaydet (Commit)
903afaa8
authored
Şub 28, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i87182 secured usage of LayerTabBar in Draw application, ensured initialization when used as OLE
üst
28c209b6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
22 deletions
+83
-22
AccessibleDocumentViewBase.cxx
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+2
-1
drviews1.cxx
sd/source/ui/view/drviews1.cxx
+12
-2
drviews3.cxx
sd/source/ui/view/drviews3.cxx
+23
-6
drviews4.cxx
sd/source/ui/view/drviews4.cxx
+6
-0
drviews7.cxx
sd/source/ui/view/drviews7.cxx
+18
-11
drviewsb.cxx
sd/source/ui/view/drviewsb.cxx
+22
-2
No files found.
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
Dosyayı görüntüle @
903afaa8
...
@@ -876,7 +876,8 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
...
@@ -876,7 +876,8 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
sValue
+=
sName
;
sValue
+=
sName
;
sValue
+=
String
::
CreateFromInt32
(
pDrViewSh
->
GetPageTabControl
()
->
GetPageCount
())
;
sValue
+=
String
::
CreateFromInt32
(
pDrViewSh
->
GetPageTabControl
()
->
GetPageCount
())
;
sValue
+=
rtl
::
OUString
::
createFromAscii
(
";"
);
sValue
+=
rtl
::
OUString
::
createFromAscii
(
";"
);
if
(
pDrViewSh
->
IsLayerModeActive
()
)
if
(
pDrViewSh
->
IsLayerModeActive
()
&&
pDrViewSh
->
GetLayerTabControl
())
// #87182#
{
{
sName
=
rtl
::
OUString
::
createFromAscii
(
"page-name:"
);
sName
=
rtl
::
OUString
::
createFromAscii
(
"page-name:"
);
sValue
=
sName
;
sValue
=
sName
;
...
...
sd/source/ui/view/drviews1.cxx
Dosyayı görüntüle @
903afaa8
...
@@ -401,7 +401,13 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
...
@@ -401,7 +401,13 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
GetViewShellBase
().
GetDrawController
().
BroadcastContextChange
();
GetViewShellBase
().
GetDrawController
().
BroadcastContextChange
();
meEditMode
=
eEMode
;
meEditMode
=
eEMode
;
mbIsLayerModeActive
=
bIsLayerModeActive
;
if
(
pLayerBar
)
{
// #87182# only switch activation mode of LayerTabBar when there is one,
// else it will not get initialized with the current set of Layers as needed
mbIsLayerModeActive
=
bIsLayerModeActive
;
}
// Determine whether to show the master view toolbar. The master
// Determine whether to show the master view toolbar. The master
// page mode has to be active and the shell must not be a handout
// page mode has to be active and the shell must not be a handout
...
@@ -684,7 +690,11 @@ IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab )
...
@@ -684,7 +690,11 @@ IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab )
aTabSize
.
Width
()
=
Min
(
pTab
->
GetSplitSize
(),
(
long
)(
nMax
-
1
));
aTabSize
.
Width
()
=
Min
(
pTab
->
GetSplitSize
(),
(
long
)(
nMax
-
1
));
maTabControl
.
SetSizePixel
(
aTabSize
);
maTabControl
.
SetSizePixel
(
aTabSize
);
GetLayerTabControl
()
->
SetSizePixel
(
aTabSize
);
if
(
GetLayerTabControl
())
// #87182#
{
GetLayerTabControl
()
->
SetSizePixel
(
aTabSize
);
}
Point
aPos
=
maTabControl
.
GetPosPixel
();
Point
aPos
=
maTabControl
.
GetPosPixel
();
aPos
.
X
()
+=
aTabSize
.
Width
();
aPos
.
X
()
+=
aTabSize
.
Width
();
...
...
sd/source/ui/view/drviews3.cxx
Dosyayı görüntüle @
903afaa8
...
@@ -222,17 +222,34 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
...
@@ -222,17 +222,34 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case
SID_SWITCHLAYER
:
// BASIC
case
SID_SWITCHLAYER
:
// BASIC
{
{
const
SfxItemSet
*
pArgs
=
rReq
.
GetArgs
();
const
SfxItemSet
*
pArgs
=
rReq
.
GetArgs
();
sal_uInt16
nCurPage
=
GetLayerTabControl
()
->
GetCurPageId
();
if
(
pArgs
&&
pArgs
->
Count
()
==
1
)
// #87182#
bool
bCurPageValid
(
false
);
sal_uInt16
nCurPage
(
0
);
if
(
GetLayerTabControl
())
{
nCurPage
=
GetLayerTabControl
()
->
GetCurPageId
();
bCurPageValid
=
true
;
}
if
(
pArgs
&&
1
==
pArgs
->
Count
())
{
{
SFX_REQUEST_ARG
(
rReq
,
pWhatLayer
,
SfxUInt32Item
,
ID_VAL_WHATLAYER
,
sal_False
);
SFX_REQUEST_ARG
(
rReq
,
pWhatLayer
,
SfxUInt32Item
,
ID_VAL_WHATLAYER
,
sal_False
);
if
(
pWhatLayer
)
nCurPage
=
(
short
)
pWhatLayer
->
GetValue
();
if
(
pWhatLayer
)
{
nCurPage
=
(
short
)
pWhatLayer
->
GetValue
();
bCurPageValid
=
true
;
}
}
if
(
bCurPageValid
)
{
mpDrawView
->
SetActiveLayer
(
GetLayerTabControl
()
->
GetPageText
(
nCurPage
)
);
Invalidate
();
}
}
mpDrawView
->
SetActiveLayer
(
GetLayerTabControl
()
->
GetPageText
(
nCurPage
)
);
Invalidate
();
rReq
.
Done
();
rReq
.
Done
();
break
;
break
;
...
...
sd/source/ui/view/drviews4.cxx
Dosyayı görüntüle @
903afaa8
...
@@ -124,6 +124,12 @@ void DrawViewShell::DeleteActualPage()
...
@@ -124,6 +124,12 @@ void DrawViewShell::DeleteActualPage()
void
DrawViewShell
::
DeleteActualLayer
()
void
DrawViewShell
::
DeleteActualLayer
()
{
{
if
(
!
GetLayerTabControl
())
// #87182#
{
OSL_ENSURE
(
false
,
"No LayerTabBar (!)"
);
return
;
}
SdrLayerAdmin
&
rAdmin
=
GetDoc
()
->
GetLayerAdmin
();
SdrLayerAdmin
&
rAdmin
=
GetDoc
()
->
GetLayerAdmin
();
const
String
&
rName
=
GetLayerTabControl
()
->
GetPageText
(
GetLayerTabControl
()
->
GetCurPageId
());
const
String
&
rName
=
GetLayerTabControl
()
->
GetPageText
(
GetLayerTabControl
()
->
GetCurPageId
());
String
aString
(
SdResId
(
STR_ASK_DELETE_LAYER
));
String
aString
(
SdResId
(
STR_ASK_DELETE_LAYER
));
...
...
sd/source/ui/view/drviews7.cxx
Dosyayı görüntüle @
903afaa8
...
@@ -911,20 +911,27 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
...
@@ -911,20 +911,27 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
// darf der aktuelle Layer geloescht werden?
// darf der aktuelle Layer geloescht werden?
if
(
SFX_ITEM_AVAILABLE
==
rSet
.
GetItemState
(
SID_DELETE_LAYER
)
)
if
(
SFX_ITEM_AVAILABLE
==
rSet
.
GetItemState
(
SID_DELETE_LAYER
)
)
{
{
sal_uInt16
nCurrentLayer
=
GetLayerTabControl
()
->
GetCurPageId
();
if
(
GetLayerTabControl
())
// #87182#
const
String
&
rName
=
GetLayerTabControl
()
->
GetPageText
(
nCurrentLayer
);
{
sal_uInt16
nCurrentLayer
=
GetLayerTabControl
()
->
GetCurPageId
();
const
String
&
rName
=
GetLayerTabControl
()
->
GetPageText
(
nCurrentLayer
);
sal_Bool
bDisableIt
=
!
IsLayerModeActive
();
sal_Bool
bDisableIt
=
!
IsLayerModeActive
();
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_LAYOUT
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_LAYOUT
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_BCKGRND
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_BCKGRND
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_BCKGRNDOBJ
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_BCKGRNDOBJ
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_CONTROLS
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_CONTROLS
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_MEASURELINES
)));
bDisableIt
|=
(
rName
==
String
(
SdResId
(
STR_LAYER_MEASURELINES
)));
if
(
bDisableIt
)
if
(
bDisableIt
)
{
rSet
.
DisableItem
(
SID_DELETE_LAYER
);
rSet
.
DisableItem
(
SID_RENAMELAYER
);
}
}
else
{
{
rSet
.
DisableItem
(
SID_DELETE_LAYER
);
OSL_ENSURE
(
false
,
"No LayerTabBar (!)"
);
rSet
.
DisableItem
(
SID_RENAMELAYER
);
}
}
}
}
...
...
sd/source/ui/view/drviewsb.cxx
Dosyayı görüntüle @
903afaa8
...
@@ -233,6 +233,14 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
...
@@ -233,6 +233,14 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
case
SID_MODIFYLAYER
:
case
SID_MODIFYLAYER
:
{
{
if
(
!
GetLayerTabControl
())
// #87182#
{
OSL_ENSURE
(
false
,
"No LayerTabBar (!)"
);
Cancel
();
rReq
.
Ignore
();
break
;
}
if
(
mpDrawView
->
IsTextEdit
()
)
if
(
mpDrawView
->
IsTextEdit
()
)
{
{
mpDrawView
->
SdrEndTextEdit
();
mpDrawView
->
SdrEndTextEdit
();
...
@@ -387,8 +395,14 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
...
@@ -387,8 +395,14 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
mpDrawView
->
SdrEndTextEdit
();
mpDrawView
->
SdrEndTextEdit
();
}
}
GetLayerTabControl
()
->
StartEditMode
(
if
(
GetLayerTabControl
())
// #87182#
GetLayerTabControl
()
->
GetCurPageId
()
);
{
GetLayerTabControl
()
->
StartEditMode
(
GetLayerTabControl
()
->
GetCurPageId
());
}
else
{
OSL_ENSURE
(
false
,
"No LayerTabBar (!)"
);
}
Cancel
();
Cancel
();
rReq
.
Ignore
();
rReq
.
Ignore
();
...
@@ -825,6 +839,12 @@ void DrawViewShell::ModifyLayer (
...
@@ -825,6 +839,12 @@ void DrawViewShell::ModifyLayer (
bool
bIsLocked
,
bool
bIsLocked
,
bool
bIsPrintable
)
bool
bIsPrintable
)
{
{
if
(
!
GetLayerTabControl
())
// #87182#
{
OSL_ENSURE
(
false
,
"No LayerTabBar (!)"
);
return
;
}
if
(
pLayer
)
if
(
pLayer
)
{
{
const
sal_uInt16
nPageCount
=
GetLayerTabControl
()
->
GetPageCount
();
const
sal_uInt16
nPageCount
=
GetLayerTabControl
()
->
GetPageCount
();
...
...
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