36 return static_cast<int>(
static_cast<SfxSlot const *
>(pSmaller)->GetSlotId()) -
43 return static_cast<int>(*
static_cast<sal_uInt16
const *
>(pSmaller)) -
44 static_cast<int>(
static_cast<SfxSlot const *
>(pBigger)->GetSlotId());
51struct SfxObjectUI_Impl
73 std::vector<SfxObjectUI_Impl>
75 std::vector<SfxObjectUI_Impl>
90 bool bUsableSuperClass,
93 SfxSlot &rSlotMap, sal_uInt16 nSlotCount ):
97 bSuperClass(bUsableSuperClass),
125 sal_uInt16 nIter = 1;
126 for ( pIter =
pSlots; nIter <=
nCount; ++pIter, ++nIter )
129 assert( nIter ==
nCount ||
130 pIter->
GetSlotId() != (pIter+1)->GetSlotId() );
137 for ( sal_uInt16
n = nIter;
n <
Count(); ++
n )
143 pLastSlot = pCurSlot;
153 sal_uInt16 nIter = 1;
154 for (
SfxSlot *pNext = pIter+1; nIter <
nCount; ++pNext, ++nIter )
157 if ( pNext->GetSlotId() <= pIter->
GetSlotId() )
158 SAL_WARN(
"sfx.control",
"Wrong order" );
160 const SfxSlot *pCurSlot = pIter;
166 SAL_WARN(
"sfx.control",
"Linked Slots with different State Methods : "
171 while ( pCurSlot != pIter );
199 return static_cast<const SfxSlot*
>(
p);
204 static const char UNO_COMMAND[] =
".uno:";
207 if (
aCommand.startsWith( UNO_COMMAND ) )
230 SAL_WARN(
"sfx.control",
"unknown Slot" );
258 return SfxObjectUI_Impl(
nPos, nFlags,
static_cast<sal_uInt32
>(eId), nFeature);
268 if ( nNo < nBaseCount )
272 nNo = nNo - nBaseCount;
275 assert( nNo<pImplData->aObjectBars.size() );
287 if ( nNo < nBaseCount )
291 nNo = nNo - nBaseCount;
294 assert( nNo<pImplData->aObjectBars.size() );
306 if ( nNo < nBaseCount )
310 nNo = nNo - nBaseCount;
313 assert( nNo<pImplData->aObjectBars.size() );
315 return pImplData->aObjectBars[nNo].nFlags;
334 aUI.bContext = bContext;
335 pImplData->aChildWindows.emplace_back(aUI);
349 if ( nNo < nBaseCount )
353 nNo = nNo - nBaseCount;
356 assert( nNo<pImplData->aChildWindows.size() );
358 sal_uInt32 nRet =
pImplData->aChildWindows[nNo].nObjId;
359 if (
pImplData->aChildWindows[nNo].bContext )
360 nRet += sal_uInt16(
nClassId ) << 16;
370 if ( nNo < nBaseCount )
374 nNo = nNo - nBaseCount;
377 assert( nNo<pImplData->aChildWindows.size() );
379 return pImplData->aChildWindows[nNo].nFeature;
411 if ( nNo < nBaseCount )
415 nNo = nNo - nBaseCount;
418 assert( nNo<pImplData->aObjectBars.size() );
420 return pImplData->aObjectBars[nNo].nFeature;
430 if ( nNo < nBaseCount )
434 nNo = nNo - nBaseCount;
437 assert( nNo<pImplData->aObjectBars.size() );
SfxApplication * SfxGetpApp()
SAL_DLLPRIVATE SfxSlotPool & GetAppSlotPool_Impl() const
StatusBarId GetStatusBarId() const
void RegisterStatusBar(StatusBarId eId)
const SfxInterface * pGenoType
bool IsObjectBarVisible(sal_uInt16 nNo) const
std::unique_ptr< SfxInterface_Impl > pImplData
void SetSlotMap(SfxSlot &rMessages, sal_uInt16 nMsgCount)
const SfxSlot * GetSlot(sal_uInt16 nSlotId) const
void Register(const SfxModule *)
sal_uInt16 GetChildWindowCount() const
SfxShellFeature GetChildWindowFeature(sal_uInt16 nNo) const
SAL_DLLPRIVATE bool ContainsSlot_Impl(const SfxSlot *pSlot) const
void RegisterPopupMenu(const OUString &)
void RegisterChildWindow(sal_uInt16, bool bContext=false)
ToolbarId GetObjectBarId(sal_uInt16 nNo) const
sal_uInt16 GetObjectBarCount() const
bool UseAsSuperClass() const
void RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, ToolbarId eId)
const OUString & GetPopupMenuName() const
SfxVisibilityFlags GetObjectBarFlags(sal_uInt16 nNo) const
const SfxSlot * GetRealSlot(const SfxSlot *) const
sal_uInt16 GetObjectBarPos(sal_uInt16 nNo) const
SfxShellFeature GetObjectBarFeature(sal_uInt16 nNo) const
sal_uInt32 GetChildWindowId(sal_uInt16 nNo) const
SfxInterface(const char *pClass, bool bSuperClass, SfxInterfaceId nClassId, const SfxInterface *pGeno, SfxSlot &rMessages, sal_uInt16 nMsgCount)
SfxSlotPool * GetSlotPool() const
void RegisterInterface(SfxInterface &rFace)
sal_uInt16 GetSlotId() const
const SfxSlot * pNextSlot
const SfxSlot * GetNextSlot() const
SfxStateFunc GetStateFnc() const
#define SAL_WARN(area, stream)
static int SfxCompareSlots_qsort(const void *pSmaller, const void *pBigger)
static SfxObjectUI_Impl CreateObjectBarUI_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId, SfxShellFeature nFeature)
static int SfxCompareSlots_bsearch(const void *pSmaller, const void *pBigger)
StatusBarId eStatBarResId
std::vector< SfxObjectUI_Impl > aObjectBars
std::vector< SfxObjectUI_Impl > aChildWindows