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
84482f51
Kaydet (Commit)
84482f51
authored
Nis 09, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SfxSlotFilterState to scoped enum
Change-Id: I424a1c71429078f8f83f8f0138c6e12567628ef8
üst
33d39064
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
dispatch.hxx
include/sfx2/dispatch.hxx
+5
-5
docshell.cxx
sd/source/ui/docshell/docshell.cxx
+1
-1
slideshowimpl.cxx
sd/source/ui/slideshow/slideshowimpl.cxx
+1
-1
dispatch.cxx
sfx2/source/control/dispatch.cxx
+10
-10
view.cxx
sw/source/uibase/uiview/view.cxx
+2
-2
No files found.
include/sfx2/dispatch.hxx
Dosyayı görüntüle @
84482f51
...
@@ -67,12 +67,12 @@ namespace o3tl
...
@@ -67,12 +67,12 @@ namespace o3tl
template
<>
struct
typed_flags
<
SfxDispatcherPopFlags
>
:
is_typed_flags
<
SfxDispatcherPopFlags
,
0x07
>
{};
template
<>
struct
typed_flags
<
SfxDispatcherPopFlags
>
:
is_typed_flags
<
SfxDispatcherPopFlags
,
0x07
>
{};
}
}
enum
SfxSlotFilterState
enum
class
SfxSlotFilterState
{
{
SFX_SLOT_FILTER_
DISABLED
,
DISABLED
,
SFX_SLOT_FILTER_
ENABLED
,
ENABLED
,
// enabled even if ReadOnlyDoc
// enabled even if ReadOnlyDoc
SFX_SLOT_FILTER_
ENABLED_READONLY
,
ENABLED_READONLY
,
};
};
...
@@ -168,7 +168,7 @@ public:
...
@@ -168,7 +168,7 @@ public:
void
Flush
();
void
Flush
();
void
Lock
(
bool
bLock
);
void
Lock
(
bool
bLock
);
bool
IsLocked
(
sal_uInt16
nSID
=
0
)
const
;
bool
IsLocked
(
sal_uInt16
nSID
=
0
)
const
;
void
SetSlotFilter
(
SfxSlotFilterState
nEnable
=
S
FX_SLOT_FILTER_
DISABLED
,
void
SetSlotFilter
(
SfxSlotFilterState
nEnable
=
S
fxSlotFilterState
::
DISABLED
,
sal_uInt16
nCount
=
0
,
const
sal_uInt16
*
pSIDs
=
0
);
sal_uInt16
nCount
=
0
,
const
sal_uInt16
*
pSIDs
=
0
);
void
HideUI
(
bool
bHide
=
true
);
void
HideUI
(
bool
bHide
=
true
);
...
...
sd/source/ui/docshell/docshell.cxx
Dosyayı görüntüle @
84482f51
...
@@ -389,7 +389,7 @@ void DrawDocShell::ApplySlotFilter() const
...
@@ -389,7 +389,7 @@ void DrawDocShell::ApplySlotFilter() const
SfxDispatcher
*
pDispatcher
=
pTestViewShell
->
GetViewFrame
()
->
GetDispatcher
();
SfxDispatcher
*
pDispatcher
=
pTestViewShell
->
GetViewFrame
()
->
GetDispatcher
();
if
(
mpFilterSIDs
)
if
(
mpFilterSIDs
)
pDispatcher
->
SetSlotFilter
(
mbFilterEnable
?
S
FX_SLOT_FILTER_ENABLED
:
SFX_SLOT_FILTER_
DISABLED
,
mnFilterCount
,
mpFilterSIDs
);
pDispatcher
->
SetSlotFilter
(
mbFilterEnable
?
S
fxSlotFilterState
::
ENABLED
:
SfxSlotFilterState
::
DISABLED
,
mnFilterCount
,
mpFilterSIDs
);
else
else
pDispatcher
->
SetSlotFilter
();
pDispatcher
->
SetSlotFilter
();
...
...
sd/source/ui/slideshow/slideshowimpl.cxx
Dosyayı görüntüle @
84482f51
...
@@ -2669,7 +2669,7 @@ void SAL_CALL SlideshowImpl::activate() throw (RuntimeException, std::exception)
...
@@ -2669,7 +2669,7 @@ void SAL_CALL SlideshowImpl::activate() throw (RuntimeException, std::exception)
if
(
pDispatcher
)
if
(
pDispatcher
)
{
{
// filter all forbbiden slots
// filter all forbbiden slots
pDispatcher
->
SetSlotFilter
(
S
FX_SLOT_FILTER_
ENABLED
,
sizeof
(
pAllowed
)
/
sizeof
(
sal_uInt16
),
pAllowed
);
pDispatcher
->
SetSlotFilter
(
S
fxSlotFilterState
::
ENABLED
,
sizeof
(
pAllowed
)
/
sizeof
(
sal_uInt16
),
pAllowed
);
}
}
if
(
getBindings
()
)
if
(
getBindings
()
)
...
...
sfx2/source/control/dispatch.cxx
Dosyayı görüntüle @
84482f51
...
@@ -321,7 +321,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
...
@@ -321,7 +321,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
xImp
->
bQuiet
=
false
;
xImp
->
bQuiet
=
false
;
xImp
->
bModal
=
false
;
xImp
->
bModal
=
false
;
xImp
->
pInCallAliveFlag
=
0
;
xImp
->
pInCallAliveFlag
=
0
;
xImp
->
nFilterEnabling
=
S
FX_SLOT_FILTER_
DISABLED
;
xImp
->
nFilterEnabling
=
S
fxSlotFilterState
::
DISABLED
;
xImp
->
nFilterCount
=
0
;
xImp
->
nFilterCount
=
0
;
xImp
->
pFilterSIDs
=
0
;
xImp
->
pFilterSIDs
=
0
;
xImp
->
nDisableFlags
=
0
;
xImp
->
nDisableFlags
=
0
;
...
@@ -1626,20 +1626,20 @@ SfxSlotFilterState SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID )
...
@@ -1626,20 +1626,20 @@ SfxSlotFilterState SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID )
// no filter?
// no filter?
if
(
0
==
xImp
->
nFilterCount
)
if
(
0
==
xImp
->
nFilterCount
)
// => all SIDs allowed
// => all SIDs allowed
return
S
FX_SLOT_FILTER_
ENABLED
;
return
S
fxSlotFilterState
::
ENABLED
;
// search
// search
bool
bFound
=
0
!=
bsearch
(
&
nSID
,
xImp
->
pFilterSIDs
,
xImp
->
nFilterCount
,
bool
bFound
=
0
!=
bsearch
(
&
nSID
,
xImp
->
pFilterSIDs
,
xImp
->
nFilterCount
,
sizeof
(
sal_uInt16
),
SfxCompareSIDs_Impl
);
sizeof
(
sal_uInt16
),
SfxCompareSIDs_Impl
);
// even if ReadOnlyDoc
// even if ReadOnlyDoc
if
(
S
FX_SLOT_FILTER_
ENABLED_READONLY
==
xImp
->
nFilterEnabling
)
if
(
S
fxSlotFilterState
::
ENABLED_READONLY
==
xImp
->
nFilterEnabling
)
return
bFound
?
S
FX_SLOT_FILTER_ENABLED_READONLY
:
SFX_SLOT_FILTER_
ENABLED
;
return
bFound
?
S
fxSlotFilterState
::
ENABLED_READONLY
:
SfxSlotFilterState
::
ENABLED
;
// Otherwise after Negative/Positive Filter
// Otherwise after Negative/Positive Filter
else
if
(
S
FX_SLOT_FILTER_
ENABLED
==
xImp
->
nFilterEnabling
)
else
if
(
S
fxSlotFilterState
::
ENABLED
==
xImp
->
nFilterEnabling
)
return
bFound
?
S
FX_SLOT_FILTER_ENABLED
:
SFX_SLOT_FILTER_
DISABLED
;
return
bFound
?
S
fxSlotFilterState
::
ENABLED
:
SfxSlotFilterState
::
DISABLED
;
else
else
return
bFound
?
S
FX_SLOT_FILTER_DISABLED
:
SFX_SLOT_FILTER_
ENABLED
;
return
bFound
?
S
fxSlotFilterState
::
DISABLED
:
SfxSlotFilterState
::
ENABLED
;
}
}
/** This helper method searches for the <Slot-Server> which currently serves
/** This helper method searches for the <Slot-Server> which currently serves
...
@@ -1706,11 +1706,11 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b
...
@@ -1706,11 +1706,11 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b
}
}
// SID check against set filter
// SID check against set filter
SfxSlotFilterState
nSlotEnableMode
=
S
FX_SLOT_FILTER_
DISABLED
;
SfxSlotFilterState
nSlotEnableMode
=
S
fxSlotFilterState
::
DISABLED
;
if
(
xImp
->
pFrame
)
if
(
xImp
->
pFrame
)
{
{
nSlotEnableMode
=
IsSlotEnabledByFilter_Impl
(
nSlot
);
nSlotEnableMode
=
IsSlotEnabledByFilter_Impl
(
nSlot
);
if
(
S
FX_SLOT_FILTER_
DISABLED
==
nSlotEnableMode
)
if
(
S
fxSlotFilterState
::
DISABLED
==
nSlotEnableMode
)
return
false
;
return
false
;
}
}
...
@@ -1728,7 +1728,7 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b
...
@@ -1728,7 +1728,7 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b
return
false
;
return
false
;
}
}
bool
bReadOnly
=
(
S
FX_SLOT_FILTER_
ENABLED_READONLY
!=
nSlotEnableMode
&&
xImp
->
bReadOnly
);
bool
bReadOnly
=
(
S
fxSlotFilterState
::
ENABLED_READONLY
!=
nSlotEnableMode
&&
xImp
->
bReadOnly
);
// search through all the shells of the chained dispatchers
// search through all the shells of the chained dispatchers
// from top to bottom
// from top to bottom
...
...
sw/source/uibase/uiview/view.cxx
Dosyayı görüntüle @
84482f51
...
@@ -602,7 +602,7 @@ void SwView::_CheckReadonlyState()
...
@@ -602,7 +602,7 @@ void SwView::_CheckReadonlyState()
}
}
if
(
SfxItemState
::
DISABLED
==
eStateRO
)
if
(
SfxItemState
::
DISABLED
==
eStateRO
)
{
{
rDis
.
SetSlotFilter
(
S
FX_SLOT_FILTER_
ENABLED_READONLY
,
sizeof
(
aROIds
)
/
sizeof
(
sal_uInt16
),
aROIds
);
rDis
.
SetSlotFilter
(
S
fxSlotFilterState
::
ENABLED_READONLY
,
sizeof
(
aROIds
)
/
sizeof
(
sal_uInt16
),
aROIds
);
bChgd
=
true
;
bChgd
=
true
;
}
}
}
}
...
@@ -617,7 +617,7 @@ void SwView::_CheckReadonlyState()
...
@@ -617,7 +617,7 @@ void SwView::_CheckReadonlyState()
qsort
(
(
void
*
)
aAllProtIds
,
sizeof
(
aAllProtIds
)
/
sizeof
(
sal_uInt16
),
sizeof
(
sal_uInt16
),
lcl_CmpIds
);
qsort
(
(
void
*
)
aAllProtIds
,
sizeof
(
aAllProtIds
)
/
sizeof
(
sal_uInt16
),
sizeof
(
sal_uInt16
),
lcl_CmpIds
);
bAllProtFirst
=
false
;
bAllProtFirst
=
false
;
}
}
rDis
.
SetSlotFilter
(
S
FX_SLOT_FILTER_
ENABLED_READONLY
,
rDis
.
SetSlotFilter
(
S
fxSlotFilterState
::
ENABLED_READONLY
,
sizeof
(
aAllProtIds
)
/
sizeof
(
sal_uInt16
),
sizeof
(
aAllProtIds
)
/
sizeof
(
sal_uInt16
),
aAllProtIds
);
aAllProtIds
);
bChgd
=
true
;
bChgd
=
true
;
...
...
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