Kaydet (Commit) 0fd9b796 authored tarafından Noel Grandin's avatar Noel Grandin

shell,sfx2,sd: inline some use-once typedefs

Change-Id: Ifde52b0d92163f99d399b4a9544a196defad1ba4
üst 3fc7f4c5
...@@ -133,7 +133,6 @@ bool ButtonsImpl::copyGraphic( const OUString& rName, const OUString& rPath ) ...@@ -133,7 +133,6 @@ bool ButtonsImpl::copyGraphic( const OUString& rName, const OUString& rPath )
return false; return false;
} }
typedef std::vector< boost::shared_ptr< ButtonsImpl > > ButtonVector;
class ButtonSetImpl class ButtonSetImpl
{ {
public: public:
...@@ -148,7 +147,7 @@ public: ...@@ -148,7 +147,7 @@ public:
Reference< XGraphicProvider > getGraphicProvider(); Reference< XGraphicProvider > getGraphicProvider();
ButtonVector maButtons; std::vector< boost::shared_ptr< ButtonsImpl > > maButtons;
Reference< XGraphicProvider > mxGraphicProvider; Reference< XGraphicProvider > mxGraphicProvider;
}; };
......
...@@ -114,8 +114,6 @@ protected: ...@@ -114,8 +114,6 @@ protected:
::osl::Mutex& mrMutex; ::osl::Mutex& mrMutex;
}; };
typedef ::std::unique_ptr< SlideShowViewListeners > SlideShowViewListenersPtr;
// SlideShowViewPaintListeners // SlideShowViewPaintListeners
typedef ::comphelper::OListenerContainerBase< ::com::sun::star::awt::XPaintListener, typedef ::comphelper::OListenerContainerBase< ::com::sun::star::awt::XPaintListener,
::com::sun::star::awt::PaintEvent > SlideShowViewPaintListeners_Base; ::com::sun::star::awt::PaintEvent > SlideShowViewPaintListeners_Base;
...@@ -128,7 +126,6 @@ public: ...@@ -128,7 +126,6 @@ public:
protected: protected:
virtual bool implTypedNotify( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& rListener, const ::com::sun::star::awt::PaintEvent& rEvent ) throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; virtual bool implTypedNotify( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& rListener, const ::com::sun::star::awt::PaintEvent& rEvent ) throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE;
}; };
typedef ::std::unique_ptr< SlideShowViewPaintListeners > SlideShowViewPaintListenersPtr;
// SlideShowViewMouseListeners // SlideShowViewMouseListeners
typedef ::comphelper::OListenerContainerBase< ::com::sun::star::awt::XMouseListener, WrappedMouseEvent > SlideShowViewMouseListeners_Base; typedef ::comphelper::OListenerContainerBase< ::com::sun::star::awt::XMouseListener, WrappedMouseEvent > SlideShowViewMouseListeners_Base;
...@@ -143,7 +140,6 @@ protected: ...@@ -143,7 +140,6 @@ protected:
const WrappedMouseEvent& rEvent ) throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; const WrappedMouseEvent& rEvent ) throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE;
}; };
typedef ::std::unique_ptr< SlideShowViewMouseListeners > SlideShowViewMouseListenersPtr;
// SlideShowViewMouseMotionListeners // SlideShowViewMouseMotionListeners
typedef ::comphelper::OListenerContainerBase< ::com::sun::star::awt::XMouseMotionListener, typedef ::comphelper::OListenerContainerBase< ::com::sun::star::awt::XMouseMotionListener,
...@@ -158,7 +154,6 @@ protected: ...@@ -158,7 +154,6 @@ protected:
virtual bool implTypedNotify( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& rListener, virtual bool implTypedNotify( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& rListener,
const WrappedMouseMotionEvent& rEvent ) throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; const WrappedMouseMotionEvent& rEvent ) throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE;
}; };
typedef ::std::unique_ptr< SlideShowViewMouseMotionListeners > SlideShowViewMouseMotionListenersPtr;
// SlideShowView // SlideShowView
class ShowWindow; class ShowWindow;
...@@ -237,10 +232,14 @@ private: ...@@ -237,10 +232,14 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XPointer > mxPointer; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPointer > mxPointer;
SlideshowImpl* mpSlideShow; SlideshowImpl* mpSlideShow;
ShowWindow& mrOutputWindow; ShowWindow& mrOutputWindow;
SlideShowViewListenersPtr mpViewListeners; ::std::unique_ptr< SlideShowViewListeners >
SlideShowViewPaintListenersPtr mpPaintListeners; mpViewListeners;
SlideShowViewMouseListenersPtr mpMouseListeners; ::std::unique_ptr< SlideShowViewPaintListeners >
SlideShowViewMouseMotionListenersPtr mpMouseMotionListeners; mpPaintListeners;
::std::unique_ptr< SlideShowViewMouseListeners >
mpMouseListeners;
::std::unique_ptr< SlideShowViewMouseMotionListeners >
mpMouseMotionListeners;
SdDrawDocument* mpDoc; SdDrawDocument* mpDoc;
bool mbIsMouseMotionListener; bool mbIsMouseMotionListener;
Rectangle maPresentationArea; Rectangle maPresentationArea;
......
...@@ -53,24 +53,22 @@ typedef boost::ptr_map<sal_uInt16, SfxPoolItem> SfxItemPtrMap; ...@@ -53,24 +53,22 @@ typedef boost::ptr_map<sal_uInt16, SfxPoolItem> SfxItemPtrMap;
TYPEINIT0(SfxShell); TYPEINIT0(SfxShell);
typedef boost::ptr_vector<SfxSlot> SfxVerbSlotArr_Impl;
using namespace com::sun::star; using namespace com::sun::star;
struct SfxShell_Impl: public SfxBroadcaster struct SfxShell_Impl: public SfxBroadcaster
{ {
OUString aObjectName; // Name of Sbx-Objects OUString aObjectName; // Name of Sbx-Objects
SfxItemPtrMap aItems; // Data exchange on Item level SfxItemPtrMap aItems; // Data exchange on Item level
SfxViewShell* pViewSh; // SfxViewShell if Shell is SfxViewShell* pViewSh; // SfxViewShell if Shell is
// ViewFrame/ViewShell/SubShell list // ViewFrame/ViewShell/SubShell list
SfxViewFrame* pFrame; // Frame, if <UI-active> SfxViewFrame* pFrame; // Frame, if <UI-active>
SfxRepeatTarget* pRepeatTarget; // SbxObjectRef xParent; SfxRepeatTarget* pRepeatTarget; // SbxObjectRef xParent;
bool bActive; bool bActive;
sal_uIntPtr nDisableFlags; sal_uIntPtr nDisableFlags;
sal_uIntPtr nHelpId; sal_uIntPtr nHelpId;
svtools::AsynchronLink* pExecuter; svtools::AsynchronLink* pExecuter;
svtools::AsynchronLink* pUpdater; svtools::AsynchronLink* pUpdater;
SfxVerbSlotArr_Impl aSlotArr; boost::ptr_vector<SfxSlot> aSlotArr;
com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aVerbList; com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aVerbList;
::sfx2::sidebar::ContextChangeBroadcaster maContextChangeBroadcaster; ::sfx2::sidebar::ContextChangeBroadcaster maContextChangeBroadcaster;
......
...@@ -167,8 +167,6 @@ void ColorListBoxWrapper::SetControlValue( Color aColor ) ...@@ -167,8 +167,6 @@ void ColorListBoxWrapper::SetControlValue( Color aColor )
typedef std::vector< ControlWrapperBase* > ControlWrpVec; typedef std::vector< ControlWrapperBase* > ControlWrpVec;
typedef ControlWrpVec::iterator ControlWrpVecI;
typedef ControlWrpVec::const_iterator ControlWrpVecCI;
struct MultiControlWrapperHelper_Impl struct MultiControlWrapperHelper_Impl
{ {
...@@ -191,21 +189,21 @@ void MultiControlWrapperHelper::RegisterControlWrapper( ControlWrapperBase& rWra ...@@ -191,21 +189,21 @@ void MultiControlWrapperHelper::RegisterControlWrapper( ControlWrapperBase& rWra
void MultiControlWrapperHelper::ModifyControl( TriState eEnable, TriState eShow ) void MultiControlWrapperHelper::ModifyControl( TriState eEnable, TriState eShow )
{ {
for( ControlWrpVecI aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); aIt != aEnd; ++aIt ) for( ControlWrpVec::iterator aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); aIt != aEnd; ++aIt )
(*aIt)->ModifyControl( eEnable, eShow ); (*aIt)->ModifyControl( eEnable, eShow );
} }
bool MultiControlWrapperHelper::IsControlDontKnow() const bool MultiControlWrapperHelper::IsControlDontKnow() const
{ {
bool bIs = !mxImpl->maVec.empty(); bool bIs = !mxImpl->maVec.empty();
for( ControlWrpVecCI aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); bIs && (aIt != aEnd); ++aIt ) for( ControlWrpVec::const_iterator aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); bIs && (aIt != aEnd); ++aIt )
bIs &= (*aIt)->IsControlDontKnow(); bIs &= (*aIt)->IsControlDontKnow();
return bIs; return bIs;
} }
void MultiControlWrapperHelper::SetControlDontKnow( bool bSet ) void MultiControlWrapperHelper::SetControlDontKnow( bool bSet )
{ {
for( ControlWrpVecI aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); aIt != aEnd; ++aIt ) for( ControlWrpVec::iterator aIt = mxImpl->maVec.begin(), aEnd = mxImpl->maVec.end(); aIt != aEnd; ++aIt )
(*aIt)->SetControlDontKnow( bSet ); (*aIt)->SetControlDontKnow( bSet );
} }
......
...@@ -64,12 +64,10 @@ struct SfxVersionInfo ...@@ -64,12 +64,10 @@ struct SfxVersionInfo
SfxVersionInfo(); SfxVersionInfo();
}; };
typedef vector< SfxVersionInfo* > _SfxVersionTable;
class SfxVersionTableDtor: private boost::noncopyable class SfxVersionTableDtor: private boost::noncopyable
{ {
private: private:
_SfxVersionTable aTableList; std::vector< SfxVersionInfo* > aTableList;
public: public:
SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo ); SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo );
SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo ); SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo );
......
...@@ -153,7 +153,6 @@ class Updater_Impl; ...@@ -153,7 +153,6 @@ class Updater_Impl;
class DocTemplates_EntryData_Impl; class DocTemplates_EntryData_Impl;
class GroupData_Impl; class GroupData_Impl;
typedef vector< NamePair_Impl* > NameList_Impl;
typedef vector< GroupData_Impl* > GroupList_Impl; typedef vector< GroupData_Impl* > GroupList_Impl;
...@@ -185,12 +184,12 @@ class SfxDocTplService_Impl ...@@ -185,12 +184,12 @@ class SfxDocTplService_Impl
Sequence< OUString > maTemplateDirs; Sequence< OUString > maTemplateDirs;
Sequence< OUString > maInternalTemplateDirs; Sequence< OUString > maInternalTemplateDirs;
OUString maRootURL; OUString maRootURL;
NameList_Impl maNames; std::vector< NamePair_Impl* > maNames;
lang::Locale maLocale; lang::Locale maLocale;
Content maRootContent; Content maRootContent;
Updater_Impl* mpUpdater; Updater_Impl* mpUpdater;
bool mbIsInitialized : 1; bool mbIsInitialized : 1;
bool mbLocaleSet : 1; bool mbLocaleSet : 1;
SfxURLRelocator_Impl maRelocator; SfxURLRelocator_Impl maRelocator;
...@@ -198,7 +197,7 @@ class SfxDocTplService_Impl ...@@ -198,7 +197,7 @@ class SfxDocTplService_Impl
void getDefaultLocale(); void getDefaultLocale();
void getDirList(); void getDirList();
void readFolderList(); void readFolderList();
bool needsUpdate(); bool needsUpdate();
OUString getLongName( const OUString& rShortName ); OUString getLongName( const OUString& rShortName );
bool setTitleForURL( const OUString& rURL, const OUString& aTitle ); bool setTitleForURL( const OUString& rURL, const OUString& aTitle );
bool getTitleFromURL( const OUString& rURL, OUString& aTitle, OUString& aType, bool& bDocHasTitle ); bool getTitleFromURL( const OUString& rURL, OUString& aTitle, OUString& aType, bool& bDocHasTitle );
......
...@@ -155,9 +155,6 @@ enum class SfxDockingConfig ...@@ -155,9 +155,6 @@ enum class SfxDockingConfig
MOVEDOCKINGWINDOW MOVEDOCKINGWINDOW
}; };
typedef std::vector<SfxChild_Impl*> SfxChildList_Impl;
typedef std::vector<SfxChildWin_Impl*> SfxChildWindows_Impl;
struct SfxObjectBarList_Impl struct SfxObjectBarList_Impl
{ {
...@@ -221,8 +218,10 @@ protected: ...@@ -221,8 +218,10 @@ protected:
Rectangle aUpperClientArea; Rectangle aUpperClientArea;
SfxWorkWindow* pParent; SfxWorkWindow* pParent;
VclPtr<SfxSplitWindow> pSplit[SFX_SPLITWINDOWS_MAX]; VclPtr<SfxSplitWindow> pSplit[SFX_SPLITWINDOWS_MAX];
SfxChildList_Impl aChildren; std::vector<SfxChild_Impl*>
SfxChildWindows_Impl aChildWins; aChildren;
std::vector<SfxChildWin_Impl*>
aChildWins;
SfxBindings* pBindings; SfxBindings* pBindings;
VclPtr<vcl::Window> pWorkWin; VclPtr<vcl::Window> pWorkWin;
SfxShell* pConfigShell; SfxShell* pConfigShell;
...@@ -237,10 +236,10 @@ protected: ...@@ -237,10 +236,10 @@ protected:
bool bIsFullScreen : 1; bool bIsFullScreen : 1;
bool bShowStatusBar : 1; bool bShowStatusBar : 1;
sal_Int32 m_nLock; sal_Int32 m_nLock;
OUString m_aStatusBarResName; OUString m_aStatusBarResName;
OUString m_aLayoutManagerPropName; OUString m_aLayoutManagerPropName;
OUString m_aTbxTypeName; OUString m_aTbxTypeName;
OUString m_aProgressBarResName; OUString m_aProgressBarResName;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xLayoutManagerListener; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xLayoutManagerListener;
protected: protected:
......
...@@ -27,14 +27,14 @@ namespace sfx2 { namespace sidebar { ...@@ -27,14 +27,14 @@ namespace sfx2 { namespace sidebar {
namespace { namespace {
typedef ::std::map<rtl::OUString,EnumContext::Application> ApplicationMap; typedef ::std::map<rtl::OUString,EnumContext::Application> ApplicationMap;
typedef ::std::vector<rtl::OUString> ApplicationVector;
static ApplicationMap maApplicationMap; static ApplicationMap maApplicationMap;
static ApplicationVector maApplicationVector; static ::std::vector<rtl::OUString> maApplicationVector;
typedef ::std::map<rtl::OUString,EnumContext::Context> ContextMap; typedef ::std::map<rtl::OUString,EnumContext::Context> ContextMap;
typedef ::std::vector<rtl::OUString> ContextVector;
static ContextMap maContextMap; static ContextMap maContextMap;
static ContextVector maContextVector; static ::std::vector<rtl::OUString> maContextVector;
} }
...@@ -211,8 +211,7 @@ EnumContext::Context EnumContext::GetContextEnum (const ::rtl::OUString& rsConte ...@@ -211,8 +211,7 @@ EnumContext::Context EnumContext::GetContextEnum (const ::rtl::OUString& rsConte
{ {
ProvideContextContainers(); ProvideContextContainers();
ContextMap::const_iterator iContext( ContextMap::const_iterator iContext( maContextMap.find(rsContextName) );
maContextMap.find(rsContextName));
if (iContext != maContextMap.end()) if (iContext != maContextMap.end())
return iContext->second; return iContext->second;
else else
......
...@@ -33,13 +33,9 @@ typedef std::vector<std::wstring> StringList_t; ...@@ -33,13 +33,9 @@ typedef std::vector<std::wstring> StringList_t;
// XmlTags_t, tags defined with tag name and xml tag. // XmlTags_t, tags defined with tag name and xml tag.
// Contents: Definitions of xml tag used in parser. // Contents: Definitions of xml tag used in parser.
typedef std::wstring Name_t; typedef std::map<std::wstring, std::wstring> XmlTagAttributes_t;
typedef std::wstring Value_t; typedef std::pair<std::wstring, XmlTagAttributes_t> XmlTag_t;
typedef std::wstring Characters_t; typedef std::map<std::wstring, XmlTag_t> XmlTags_t;
typedef std::map<Name_t, Value_t> XmlTagAttributes_t;
typedef std::pair<Characters_t, XmlTagAttributes_t> XmlTag_t;
typedef std::map<Name_t, XmlTag_t> XmlTags_t;
const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t()); const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t());
......
...@@ -281,8 +281,6 @@ private: ...@@ -281,8 +281,6 @@ private:
iso_lang_identifier active_iso_lang_; iso_lang_identifier active_iso_lang_;
}; };
typedef std::map< unsigned short , std::string , std::less< unsigned short > > shortmap;
void add_group_entries( void add_group_entries(
Config& aConfig, Config& aConfig,
const OString& GroupName, const OString& GroupName,
...@@ -292,7 +290,7 @@ void add_group_entries( ...@@ -292,7 +290,7 @@ void add_group_entries(
aConfig.SetGroup(GroupName); aConfig.SetGroup(GroupName);
size_t key_count = aConfig.GetKeyCount(); size_t key_count = aConfig.GetKeyCount();
shortmap map; std::map< unsigned short , std::string > map;
for (size_t i = 0; i < key_count; i++) for (size_t i = 0; i < key_count; i++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment