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