CWS-TOOLING: integrate CWS oj18

2009-08-21 15:08:49 +0200 oj  r275263 : wrong check
2009-08-21 08:56:01 +0200 oj  r275215 : missing not
2009-08-20 07:27:13 +0200 oj  r275164 : use new method from global
2009-08-19 10:22:35 +0200 oj  r275138 : call GetLocale instead of pLocale
2009-08-18 10:39:32 +0200 oj  r275082 : missing header include
2009-08-18 10:09:44 +0200 oj  r275081 : new methods at global
2009-08-18 10:09:00 +0200 oj  r275080 : unused var
2009-08-18 08:59:04 +0200 oj  r275078 : move files from classes to xml
2009-08-17 14:58:16 +0200 oj  r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55)
2009-08-17 13:29:44 +0200 oj  r275047 : compile error
2009-08-17 13:27:47 +0200 oj  r275045 : compile error
2009-08-17 11:44:54 +0200 oj  r275040 : add dep
2009-07-22 14:26:05 +0200 oj  r274240 : move unused services into fwl
2009-07-22 14:25:35 +0200 oj  r274239 : move unused services into fwl
2009-07-22 13:47:45 +0200 oj  r274233 : remove some unused code
2009-07-22 09:06:20 +0200 oj  r274219 : export dbtoolsclient dbcharsethelper for sc
2009-07-22 08:48:58 +0200 oj  r274218 : create NumberFormatter on demand
2009-07-22 08:39:23 +0200 oj  r274217 : change char to sal_Char
2009-07-22 07:33:34 +0200 oj  r274214 : export dbtoolsclient dbcharsethelper for sc
2009-07-22 07:30:04 +0200 oj  r274213 : late init of numberformatter and breakiterator
2009-07-22 07:28:55 +0200 oj  r274212 : export dbtoolsclient dbcharsethelper for sc
2009-07-21 13:43:28 +0200 oj  r274196 : check if quick start is enbaled
2009-07-21 13:40:09 +0200 oj  r274195 : check config entry for UiEventsLogger
2009-07-21 13:37:40 +0200 oj  r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files
2009-07-21 13:35:38 +0200 oj  r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files
2009-07-21 13:33:41 +0200 oj  r274192 : doc meta data will now be created on demand
2009-07-21 13:13:40 +0200 oj  r274187 : load ldap functions on demand
2009-07-21 13:03:17 +0200 oj  r274183 : late init of TransliterationImpl
2009-07-21 12:36:10 +0200 oj  r274180 : late init of charClass
This commit is contained in:
Oliver Bolte
2009-09-08 04:57:32 +00:00
parent 047473d4f1
commit ca00697e3d
257 changed files with 7220 additions and 14638 deletions

View File

@@ -1730,9 +1730,12 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r
// Try to instanciate quickstart service. This service is not mandatory, so
// do nothing if service is not available.
Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments(
if ( bQuickstart )
{
Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments(
DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ),
UNO_QUERY );
}
return sal_True;
}
catch( ::com::sun::star::uno::Exception& )

View File

@@ -51,62 +51,68 @@ namespace desktop
sal_Bool CheckInstallation( OUString& rTitle )
{
Reference< XMultiServiceFactory > xSMgr = ::comphelper::getProcessServiceFactory();
Reference< XExactName > xExactName( xSMgr->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.desktop.Evaluation" ))),
UNO_QUERY );
if ( xExactName.is() )
try
{
try
Reference< XMultiServiceFactory > xSMgr = ::comphelper::getProcessServiceFactory();
Reference< XExactName > xExactName( xSMgr->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.desktop.Evaluation" ))),
UNO_QUERY );
if ( xExactName.is() )
{
rTitle = xExactName->getExactName( rTitle );
Reference< XMaterialHolder > xMaterialHolder( xExactName, UNO_QUERY );
if ( xMaterialHolder.is() )
try
{
com::sun::star::util::Date aExpirationDate;
Any a = xMaterialHolder->getMaterial();
if ( a >>= aExpirationDate )
rTitle = xExactName->getExactName( rTitle );
Reference< XMaterialHolder > xMaterialHolder( xExactName, UNO_QUERY );
if ( xMaterialHolder.is() )
{
Date aToday;
Date aTimeBombDate( aExpirationDate.Day, aExpirationDate.Month, aExpirationDate.Year );
if ( aToday > aTimeBombDate )
com::sun::star::util::Date aExpirationDate;
Any a = xMaterialHolder->getMaterial();
if ( a >>= aExpirationDate )
{
InfoBox aInfoBox( NULL, String::CreateFromAscii( "This version has expired" ) );
aInfoBox.Execute();
return sal_False;
Date aToday;
Date aTimeBombDate( aExpirationDate.Day, aExpirationDate.Month, aExpirationDate.Year );
if ( aToday > aTimeBombDate )
{
InfoBox aInfoBox( NULL, String::CreateFromAscii( "This version has expired" ) );
aInfoBox.Execute();
return sal_False;
}
}
}
return sal_True;
return sal_True;
}
else
{
InfoBox aInfoBox( NULL, rTitle );
aInfoBox.Execute();
return sal_False;
}
}
else
catch ( RuntimeException& )
{
InfoBox aInfoBox( NULL, rTitle );
aInfoBox.Execute();
// Evaluation version expired!
return sal_False;
}
}
catch ( RuntimeException& )
else
{
// Evaluation version expired!
return sal_False;
Reference< com::sun::star::container::XContentEnumerationAccess > rContent( xSMgr , UNO_QUERY );
if( rContent.is() )
{
OUString sEvalService = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Evaluation" ) );
Reference < com::sun::star::container::XEnumeration > rEnum = rContent->createContentEnumeration( sEvalService );
if ( rEnum.is() )
{
InfoBox aInfoBox( NULL, rTitle );
aInfoBox.Execute();
return sal_False;
}
}
}
}
else
catch(Exception)
{
Reference< com::sun::star::container::XContentEnumerationAccess > rContent( xSMgr , UNO_QUERY );
if( rContent.is() )
{
OUString sEvalService = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Evaluation" ) );
Reference < com::sun::star::container::XEnumeration > rEnum = rContent->createContentEnumeration( sEvalService );
if ( rEnum.is() )
{
InfoBox aInfoBox( NULL, rTitle );
aInfoBox.Execute();
return sal_False;
}
}
}
return sal_True;

View File

@@ -865,8 +865,9 @@ bool impl_isDuplicateKey(const KeyCommandInfoList& rList,
const KeyCommandInfo& aInfo)
{
KeyCommandInfoList::const_iterator pInfo;
KeyCommandInfoList::const_iterator aEnd = rList.end();
for ( pInfo = rList.begin();
pInfo != rList.end() ;
pInfo != aEnd ;
++pInfo )
{
if (
@@ -886,6 +887,7 @@ bool ReadAccelerators( int nLangIndex, ResMgr* pResMgr, MODULES eModule, const :
KeyCommandInfoList& rAccs = rLocale[nLangIndex];
USHORT c = pAcc->GetItemCount();
rAccs.reserve(rAccs.size()+c);
USHORT i = 0;
for (i=0; i<c; ++i)
{
@@ -1067,11 +1069,12 @@ SfxSlotInfo::SfxSlotInfo( const ResId &rResId ) :
bool ReadSlotInfos( int nLangIndex, ResMgr* pResMgr, MODULES eModule, const OUString& aProjectName )
{
CommandIDToLabelsMap::iterator pIter = moduleMapFiles[MODULE_GLOBAL].begin();;
CommandIDToLabelsMap::iterator pIter = moduleMapFiles[MODULE_GLOBAL].begin();
CommandIDToLabelsMap::iterator pEnd = moduleMapFiles[MODULE_GLOBAL].end();
if ( eModule != MODULE_GLOBAL )
{
while ( pIter != moduleMapFiles[MODULE_GLOBAL].end() )
while ( pIter != pEnd )
{
int nId = pIter->first;
CommandLabels& rCmdLabels = pIter->second;
@@ -1091,7 +1094,8 @@ bool ReadSlotInfos( int nLangIndex, ResMgr* pResMgr, MODULES eModule, const OUSt
}
pIter = moduleMapFiles[eModule].begin();
while ( pIter != moduleMapFiles[eModule].end() )
pEnd = moduleMapFiles[eModule].end();
while ( pIter != pEnd )
{
int nId = pIter->first;
CommandLabels& rCmdLabels = pIter->second;
@@ -1261,13 +1265,15 @@ void FindAndMarkModulePopupMenuCmds()
for ( int i = 0; i < int( MODULE_COUNT ); i++ )
{
CommandToLabelsMap::iterator pCmdIter = modulePopupMenusCmd[i].begin();
while ( pCmdIter != modulePopupMenusCmd[i].end() )
CommandToLabelsMap::iterator pCmdEnd = modulePopupMenusCmd[i].end();
while ( pCmdIter != pCmdEnd )
{
CommandLabels& rCmdLabel = pCmdIter->second;
if ( rCmdLabel.bPopupMenu )
{
CommandIDToLabelsMap::iterator pIDIter = moduleMapFiles[i].begin();
while ( pIDIter != moduleMapFiles[i].end() )
CommandIDToLabelsMap::iterator pIDEnd = moduleMapFiles[i].end();
while ( pIDIter != pIDEnd )
{
CommandLabels& rIDLabel = pIDIter->second;
if ( rIDLabel.aCommand.equals( rCmdLabel.aCommand ))
@@ -1311,7 +1317,8 @@ bool FindAndMoveGlobalPopupMenus()
for ( int i = 1; i < int( MODULE_COUNT ); i++ )
{
CommandToLabelsMap::iterator pCmdIter = modulePopupMenusCmd[i].begin();
while ( pCmdIter != modulePopupMenusCmd[i].end() )
CommandToLabelsMap::iterator pCmdEnd = modulePopupMenusCmd[i].end();
while ( pCmdIter != pCmdEnd )
{
CommandLabels& rCmdLabel = pCmdIter->second;
if ( rCmdLabel.bPopupMenu )
@@ -1409,8 +1416,8 @@ bool WriteXMLFiles( const OUString& aOutputDirURL)
aXMLFile.write( ComponentDataStartEnd, strlen( ComponentDataStartEnd ), nWritten );
aXMLFile.write( GroupText, strlen( GroupText ), nWritten );
if (( moduleMapFiles[i].size() > 0 ) ||
( modulePopupMenusCmd[i].size() > 0 ) )
if (( !moduleMapFiles[i].empty() ) ||
( !modulePopupMenusCmd[i].empty() ) )
{
for ( int nSets = 0; nSets < 2; nSets++ )
{
@@ -1420,7 +1427,8 @@ bool WriteXMLFiles( const OUString& aOutputDirURL)
aXMLFile.write( SetTextPopups, strlen( SetTextPopups ), nWritten );
CommandIDToLabelsMap::iterator pIter = moduleMapFiles[i].begin();
while ( pIter != moduleMapFiles[i].end() )
CommandIDToLabelsMap::iterator pEnd = moduleMapFiles[i].end();
while ( pIter != pEnd )
{
CommandLabels& rCmdLabels = pIter->second;
@@ -1813,8 +1821,9 @@ bool impl_isAccListDuplicate(const KeyCommandInfoList& rAccsReference,
const KeyCommandInfoList& rAccs )
{
KeyCommandInfoList::const_iterator pIt1;
KeyCommandInfoList::const_iterator aEnd = rAccsReference.end();
for ( pIt1 = rAccsReference.begin();
pIt1 != rAccsReference.end() ;
pIt1 != aEnd ;
++pIt1 )
{
KeyCommandInfoList::const_iterator pIt2 = ::std::find(rAccs.begin(), rAccs.end(), *pIt1);
@@ -1839,7 +1848,7 @@ bool ReadResourceWriteAcceleratorXMLLang( const ::rtl::OUString& aOutDirURL,
KeyCommandInfoList& rAccsReference = rLocale[1]; // en-US!
// dont write empty files :-)
if (rAccs.size()<1)
if ( rAccs.empty() )
return true;
::rtl::OUString sLanguage = ::rtl::OUString::createFromAscii(Language_codes[nLanguage].pLanguage);
@@ -1901,8 +1910,9 @@ bool ReadResourceWriteAcceleratorXMLLang( const ::rtl::OUString& aOutDirURL,
::rtl::OUStringBuffer sAccBuf(10000);
KeyCommandInfoList::const_iterator pIt;
KeyCommandInfoList::const_iterator aEnd = rAccs.end();
for ( pIt = rAccs.begin();
pIt != rAccs.end() ;
pIt != aEnd ;
++pIt )
{
const KeyCommandInfo& aInfo = *pIt;
@@ -2620,7 +2630,7 @@ bool GetCommandOptions( const ::std::vector< OUString >& rArgs, const OUString&
}
}
return( rParams.size() > 0 );
return( !rParams.empty() );
}
void ShowUsage()
@@ -2694,7 +2704,7 @@ void Main()
if ( aVersion.getLength() > 0 &&
aPlatformName.getLength() > 0 &&
aUseRes.getLength() > 0 &&
aInDirVector.size() > 0 )
!aInDirVector.empty() )
{
Convert( bUseProduct, aUseRes, aVersion, aOutputDirName, aPlatformName, aInDirVector, aErrOutputFileName );
}

View File

@@ -697,7 +697,7 @@ bool WriteJumpTable( osl::File& rFile )
sal_uInt32 i = 0;
while ( ModuleName[i] != 0 )
{
if ( moduleMapFiles[i].size() > 0 )
if ( !moduleMapFiles[i].empty() )
{
OString aTableNameStr( ModuleName[i] );
OStringBuffer aJumpMark( aTableNameStr );
@@ -850,7 +850,7 @@ bool WriteHTMLFile( const OUString& aOutputDirURL)
while ( ModuleToXML_Mapping[i] != 0 )
{
SortCommandTable( MODULES( i ));
if ( moduleCmdVector[i].size() > 0 )
if ( !moduleCmdVector[i].empty() )
{
WriteHTMLTable( aHTMLFile, OUString::createFromAscii( ModuleName[i] ));

View File

@@ -56,12 +56,12 @@ class AddonMenu : public PopupMenu
AddonMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
~AddonMenu();
private:
protected:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
};
class AddonMenuManager;
class AddonPopupMenu : public PopupMenu
class AddonPopupMenu : public AddonMenu
{
public:
~AddonPopupMenu();
@@ -78,8 +78,7 @@ class AddonPopupMenu : public PopupMenu
private:
AddonPopupMenu( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame );
rtl::OUString m_aCommandURL;
::com::sun::star::uno::Reference< com::sun::star::frame::XFrame > m_xFrame;
rtl::OUString m_aCommandURL;
friend class AddonMenuManager;
};

View File

@@ -30,6 +30,7 @@
#ifndef __FRAMEWORK_CLASSES_BMKMENU_HXX
#define __FRAMEWORK_CLASSES_BMKMENU_HXX
#include "classes/addonmenu.hxx"
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
@@ -52,7 +53,7 @@ namespace framework
{
class BmkMenu_Impl;
class BmkMenu : public PopupMenu
class BmkMenu : public AddonMenu
{
public:
enum BmkMenuType
@@ -76,7 +77,6 @@ class BmkMenu : public PopupMenu
BmkMenuType, BmkMenu* pRoot );
BmkMenu_Impl* _pImp;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& m_xFrame;
};
} // namespace framework

View File

@@ -1,39 +0,0 @@
#ifndef __FRAMEWORK_CLASSES_EVENTSCONFIGURATION_HXX_
#define __FRAMEWORK_CLASSES_EVENTSCONFIGURATION_HXX_
#include <svtools/svarray.hxx>
#include <tools/string.hxx>
#include <tools/stream.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
// #110897#
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
namespace framework
{
struct EventsConfig
{
::com::sun::star::uno::Sequence< ::rtl::OUString > aEventNames;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aEventsProperties;
};
class EventsConfiguration
{
public:
// #110897#
static sal_Bool LoadEventsConfig(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rInStream, EventsConfig& aItems );
// #110897#
static sal_Bool StoreEventsConfig(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rOutStream, const EventsConfig& aItems );
};
} // namespace framework
#endif // __FRAMEWORK_CLASSES_EVENTSCONFIGURATION_HXX_

View File

@@ -1,198 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: eventsdocumenthandler.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_EVENTSDOCUMENTHANDLER_HXX_
#define __FRAMEWORK_CLASSES_EVENTSDOCUMENTHANDLER_HXX_
#ifndef __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
#include <classes/eventsconfiguration.hxx>
#endif
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#ifndef __SGI_STL_HASH_MAP
#include <hash_map>
#endif
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadEventsDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
enum Events_XML_Entry
{
EV_ELEMENT_EVENTS,
EV_ELEMENT_EVENT,
EV_ATTRIBUTE_TYPE,
EV_ATTRIBUTE_NAME,
XL_ATTRIBUTE_HREF,
XL_ATTRIBUTE_TYPE,
EV_ATTRIBUTE_MACRONAME,
EV_ATTRIBUTE_LIBRARY,
EV_XML_ENTRY_COUNT
};
enum Event_XML_Namespace
{
EV_NS_EVENT,
EV_NS_XLINK,
EV_XML_NAMESPACES_COUNT
};
OReadEventsDocumentHandler( EventsConfig& aItems );
virtual ~OReadEventsDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL ignorableWhitespace(const rtl::OUString& aWhitespaces)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL processingInstruction(const rtl::OUString& aTarget,
const rtl::OUString& aData)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDocumentLocator(
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > &xLocator)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
::rtl::OUString getErrorLineString();
class EventsHashMap : public ::std::hash_map< ::rtl::OUString ,
Events_XML_Entry ,
OUStringHashCode ,
::std::equal_to< ::rtl::OUString > >
{
public:
inline void free()
{
EventsHashMap().swap( *this );
}
};
sal_Bool m_bEventsStartFound;
sal_Bool m_bEventsEndFound;
sal_Bool m_bEventStartFound;
EventsHashMap m_aEventsMap;
EventsConfig& m_aEventItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator;
};
class OWriteEventsDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses.
{
public:
OWriteEventsDocumentHandler(
const EventsConfig& aItems,
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > );
virtual ~OWriteEventsDocumentHandler();
void WriteEventsDocument() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
virtual void WriteEvent(
const ::rtl::OUString& aEventName,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aPropertyValue ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
const EventsConfig& m_aItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > m_xEmptyList;
::rtl::OUString m_aXMLEventNS;
::rtl::OUString m_aXMLXlinkNS;
::rtl::OUString m_aAttributeType;
::rtl::OUString m_aAttributeURL;
::rtl::OUString m_aAttributeLanguage;
::rtl::OUString m_aAttributeLinkType;
::rtl::OUString m_aAttributeMacroName;
::rtl::OUString m_aAttributeLibrary;
::rtl::OUString m_aAttributeName;
};
} // namespace framework
#endif

View File

@@ -0,0 +1,49 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: FwlResId.hxx,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_FwlResId_HXX_
#define __FRAMEWORK_CLASSES_FwlResId_HXX_
#include <tools/resid.hxx>
namespace framework
{
class FwlResId : public ResId
{
public:
FwlResId( USHORT nId );
static ResMgr* GetResManager();
};
}
#endif // __FRAMEWORK_CLASSES_FwlResId

View File

@@ -1,115 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: imagesconfiguration.hxx,v $
* $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_IMAGESCONFIGURATION_HXX_
#define __FRAMEWORK_CLASSES_IMAGESCONFIGURATION_HXX_
#include <svtools/svarray.hxx>
#include <tools/string.hxx>
#include <tools/stream.hxx>
#include <tools/color.hxx>
// #110897#
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
namespace framework
{
enum ImageMaskMode
{
ImageMaskMode_Color,
ImageMaskMode_Bitmap
};
struct ImageItemDescriptor
{
ImageItemDescriptor() : nIndex( -1 ) {}
String aCommandURL; // URL command to dispatch
long nIndex; // index of the bitmap inside the bitmaplist
};
struct ExternalImageItemDescriptor
{
String aCommandURL; // URL command to dispatch
String aURL; // a URL to an external bitmap
};
typedef ImageItemDescriptor* ImageItemDescriptorPtr;
SV_DECL_PTRARR_DEL( ImageItemListDescriptor, ImageItemDescriptorPtr, 10, 2)
typedef ExternalImageItemDescriptor* ExternalImageItemDescriptorPtr;
SV_DECL_PTRARR_DEL( ExternalImageItemListDescriptor, ExternalImageItemDescriptorPtr, 10, 2)
struct ImageListItemDescriptor
{
ImageListItemDescriptor() : nMaskMode( ImageMaskMode_Color )
, pImageItemList( 0 ) {}
~ImageListItemDescriptor() { delete pImageItemList; }
String aURL; // an URL to a bitmap with several images inside
Color aMaskColor; // a color used as transparent
String aMaskURL; // an URL to an optional bitmap used as a mask
ImageMaskMode nMaskMode; // an enum to describe the current mask mode
ImageItemListDescriptor* pImageItemList; // an array of ImageItemDescriptors that describes every image
String aHighContrastURL; // an URL to an optional high contrast bitmap with serveral images inside
String aHighContrastMaskURL; // an URL to an optional high contrast bitmap as a mask
};
typedef ImageListItemDescriptor* ImageListItemDescriptorPtr;
SV_DECL_PTRARR_DEL( ImageListDescriptor, ImageListItemDescriptorPtr, 10, 2)
struct ImageListsDescriptor
{
ImageListsDescriptor() : pImageList( 0 ),
pExternalImageList( 0 ) {}
~ImageListsDescriptor() { delete pImageList; delete pExternalImageList; }
ImageListDescriptor* pImageList;
ExternalImageItemListDescriptor* pExternalImageList;
};
class ImagesConfiguration
{
public:
// #110897#
static sal_Bool LoadImages(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rInStream, ImageListsDescriptor& aItems );
// #110897#
static sal_Bool StoreImages(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rOutStream, const ImageListsDescriptor& aItems );
};
} // namespace framework
#endif // __FRAMEWORK_CLASSES_IMAGES

View File

@@ -1,215 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: imagesdocumenthandler.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_IMAGEDOCUMENTHANDLER_HXX_
#define __FRAMEWORK_CLASSES_IMAGEDOCUMENTHANDLER_HXX_
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <classes/imagesconfiguration.hxx>
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#ifndef __SGI_STL_HASH_MAP
#include <hash_map>
#endif
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadImagesDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
enum Image_XML_Entry
{
IMG_ELEMENT_IMAGECONTAINER,
IMG_ELEMENT_IMAGES,
IMG_ELEMENT_ENTRY,
IMG_ELEMENT_EXTERNALIMAGES,
IMG_ELEMENT_EXTERNALENTRY,
IMG_ATTRIBUTE_HREF,
IMG_ATTRIBUTE_MASKCOLOR,
IMG_ATTRIBUTE_COMMAND,
IMG_ATTRIBUTE_BITMAPINDEX,
IMG_ATTRIBUTE_MASKURL,
IMG_ATTRIBUTE_MASKMODE,
IMG_ATTRIBUTE_HIGHCONTRASTURL,
IMG_ATTRIBUTE_HIGHCONTRASTMASKURL,
IMG_XML_ENTRY_COUNT
};
enum Image_XML_Namespace
{
IMG_NS_IMAGE,
IMG_NS_XLINK,
TBL_XML_NAMESPACES_COUNT
};
OReadImagesDocumentHandler( ImageListsDescriptor& aItems );
virtual ~OReadImagesDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL ignorableWhitespace(const rtl::OUString& aWhitespaces)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL processingInstruction(const rtl::OUString& aTarget,
const rtl::OUString& aData)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDocumentLocator(
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > &xLocator)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
::rtl::OUString getErrorLineString();
class ImageHashMap : public ::std::hash_map< ::rtl::OUString ,
Image_XML_Entry ,
OUStringHashCode ,
::std::equal_to< ::rtl::OUString > >
{
public:
inline void free()
{
ImageHashMap().swap( *this );
}
};
sal_Bool m_bImageContainerStartFound;
sal_Bool m_bImageContainerEndFound;
sal_Bool m_bImagesStartFound;
sal_Bool m_bImagesEndFound;
sal_Bool m_bImageStartFound;
sal_Bool m_bExternalImagesStartFound;
sal_Bool m_bExternalImagesEndFound;
sal_Bool m_bExternalImageStartFound;
sal_Int32 m_nHashMaskModeBitmap;
sal_Int32 m_nHashMaskModeColor;
ImageHashMap m_aImageMap;
ImageListsDescriptor& m_aImageList;
ImageListItemDescriptor* m_pImages;
ExternalImageItemListDescriptor* m_pExternalImages;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator;
};
class OWriteImagesDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses.
{
public:
OWriteImagesDocumentHandler(
const ImageListsDescriptor& aItems,
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > );
virtual ~OWriteImagesDocumentHandler();
void WriteImagesDocument() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
virtual void WriteImageList( const ImageListItemDescriptor* ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void WriteExternalImageList( const ExternalImageItemListDescriptor* ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void WriteImage( const ImageItemDescriptor* ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void WriteExternalImage( const ExternalImageItemDescriptor* ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
const ImageListsDescriptor& m_aImageListsItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > m_xEmptyList;
::rtl::OUString m_aXMLXlinkNS;
::rtl::OUString m_aXMLImageNS;
::rtl::OUString m_aAttributeType;
::rtl::OUString m_aAttributeXlinkType;
::rtl::OUString m_aAttributeValueSimple;
};
} // namespace framework
#endif

View File

@@ -35,17 +35,15 @@
#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <vcl/image.hxx>
namespace framework
{
class ImageWrapper : public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::com::sun::star::awt::XBitmap ,
public ::com::sun::star::lang::XUnoTunnel ,
public ::com::sun::star::lang::XTypeProvider ,
public ::cppu::OWeakObject
public ::cppu::WeakImplHelper2< ::com::sun::star::awt::XBitmap,
::com::sun::star::lang::XUnoTunnel >
{
public:
ImageWrapper( const Image& aImage );
@@ -58,12 +56,6 @@ class ImageWrapper : public ThreadHelpBase , // Struc
static ::com::sun::star::uno::Sequence< sal_Int8 > GetUnoTunnelId();
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType )
throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL acquire() throw ();
virtual void SAL_CALL release() throw ();
// XBitmap
virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getDIB() throw (::com::sun::star::uno::RuntimeException);
@@ -72,10 +64,6 @@ class ImageWrapper : public ThreadHelpBase , // Struc
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException);
// XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
private:
Image m_aImage;
};

View File

@@ -1,126 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: menuconfiguration.hxx,v $
* $Revision: 1.13 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_MENUCONFIGURATION_HXX_
#define __FRAMEWORK_CLASSES_MENUCONFIGURATION_HXX_
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/WrappedTargetException.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
#include <vcl/menu.hxx>
#include <vcl/toolbox.hxx>
#include <cppuhelper/weak.hxx>
#define BOOKMARK_NEWMENU ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:menu_bookmark_new" ))
#define BOOKMARK_WIZARDMENU ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:menu_bookmark_wizard" ))
#define ADDONS_POPUPMENU ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:menu_addons_popup" ))
// Prepare for inclusion by framework and sfx
// Please consider that there is a corresponding define also in sfxsids.hrc!! (SID_SFX_START)/(SID_ADDONS)
#define FWK_SID_SFX_START 5000
#define FWK_SID_ADDONS (FWK_SID_SFX_START+1678)
#define FWK_SID_ADDONHELP (FWK_SID_SFX_START+1684)
const USHORT START_ITEMID_PICKLIST = 4500;
const USHORT END_ITEMID_PICKLIST = 4599;
const USHORT MAX_ITEMCOUNT_PICKLIST = 99; // difference between START_... & END_... for picklist / must be changed too, if these values are changed!
const USHORT START_ITEMID_WINDOWLIST = 4600;
const USHORT END_ITEMID_WINDOWLIST = 4699;
const USHORT ITEMID_ADDONLIST = FWK_SID_ADDONS;
const USHORT ITEMID_ADDONHELP = FWK_SID_ADDONHELP;
namespace framework
{
class MenuConfiguration
{
public:
struct Attributes
{
Attributes() {}
Attributes( const ::rtl::OUString& aFrame, const ::rtl::OUString& aImageIdStr ) :
aTargetFrame( aFrame ), aImageId( aImageIdStr ) {}
::rtl::OUString aTargetFrame;
::rtl::OUString aImageId;
::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XDispatchProvider > xDispatchProvider;
};
MenuConfiguration(
// #110897#-1 use const when giving a uno reference by reference
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
virtual ~MenuConfiguration();
MenuBar* CreateMenuBarFromConfiguration(
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream )
throw ( ::com::sun::star::lang::WrappedTargetException );
PopupMenu* CreateBookmarkMenu(
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const ::rtl::OUString& aURL )
throw ( ::com::sun::star::lang::WrappedTargetException );
ToolBox* CreateToolBoxFromConfiguration(
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream )
throw ( ::com::sun::star::lang::WrappedTargetException );
void StoreMenuBar( MenuBar* pMenuBar,
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream )
throw ( ::com::sun::star::lang::WrappedTargetException );
void StoreToolBox( ToolBox* pToolBox,
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream )
throw ( ::com::sun::star::lang::WrappedTargetException );
static BOOL IsPickListItemId( USHORT nId );
static BOOL IsWindowListItemId( USHORT nId );
private:
// #110897#-1 do not hold the uno reference by reference
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& m_rxServiceManager;
};
}
#endif // __FRAMEWORK_CLASSES_MENUCONFIGURATION_HXX_

View File

@@ -43,6 +43,7 @@
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/FeatureStateEvent.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
//_________________________________________________________________________________________________________________
// other includes
@@ -50,7 +51,7 @@
#include <rtl/ustring.hxx>
#include <vcl/menu.hxx>
#include <vcl/accel.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <threadhelp/threadhelpbase.hxx>
#include <macros/debug.hxx>
@@ -73,9 +74,8 @@ namespace framework
class BmkMenu;
class AddonMenu;
class AddonPopupMenu;
class MenuManager : public XSTATUSLISTENER ,
public ThreadHelpBase ,
public ::cppu::OWeakObject
class MenuManager : public ThreadHelpBase ,
public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XStatusListener >
{
public:
// #110897#
@@ -86,13 +86,6 @@ class MenuManager : public XSTATUSLISTENER ,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame,
BmkMenu* pBmkMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame,
@@ -100,23 +93,8 @@ class MenuManager : public XSTATUSLISTENER ,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame,
AddonPopupMenu* pAddonMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
virtual ~MenuManager();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( RUNTIMEEXCEPTION );
// XStatusListener
virtual void SAL_CALL statusChanged( const FEATURSTATEEVENT& Event ) throw ( RUNTIMEEXCEPTION );
@@ -132,6 +110,9 @@ class MenuManager : public XSTATUSLISTENER ,
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getServiceFactory();
static void UpdateSpecialWindowMenu( Menu* pMenu ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,IMutex& _rMutex);
static void FillMenuImages(::com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame,Menu* _pMenu,sal_Bool bIsHiContrast,sal_Bool bShowMenuImages);
protected:
DECL_LINK( Highlight, Menu * );
DECL_LINK( Activate, Menu * );
@@ -140,6 +121,10 @@ class MenuManager : public XSTATUSLISTENER ,
private:
void UpdateSpecialFileMenu( Menu* pMenu );
void UpdateSpecialWindowMenu( Menu* pMenu );
void ClearMenuDispatch(const EVENTOBJECT& Source = EVENTOBJECT(),bool _bRemoveOnly = true);
void SetHdl();
void AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,USHORT _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren);
USHORT FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const;
struct MenuItemHandler
@@ -177,6 +162,7 @@ class MenuManager : public XSTATUSLISTENER ,
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& mxServiceFactory;
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
};
} // namespace

View File

@@ -1,48 +0,0 @@
#ifndef __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
#define __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
#include <svtools/svarray.hxx>
#include <tools/string.hxx>
#include <tools/stream.hxx>
#include <vcl/status.hxx>
// #110897#
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
namespace framework
{
struct StatusBarItemDescriptor
{
String aURL; // URL command to dispatch
long nItemBits; // properties for this statusbar item (WinBits)
long nWidth; // width of a statusbar item
long nOffset; // offset
public:
StatusBarItemDescriptor() : nItemBits( SIB_CENTER | SIB_IN )
,nWidth( 0 )
,nOffset( STATUSBAR_OFFSET ) {}
};
typedef StatusBarItemDescriptor* StatusBarItemDescriptorPtr;
SV_DECL_PTRARR_DEL( StatusBarDescriptor, StatusBarItemDescriptorPtr, 10, 2)
class StatusBarConfiguration
{
public:
// #110897#
static sal_Bool LoadStatusBar(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rInStream, StatusBarDescriptor& aItems );
// #110897#
static sal_Bool StoreStatusBar(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rOutStream, const StatusBarDescriptor& aItems );
};
} // namespace framework
#endif // __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_

View File

@@ -1,190 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: statusbardocumenthandler.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_STATUSBARDOCUMENTHANDLER_HXX_
#define __FRAMEWORK_CLASSES_STATUSBARDOCUMENTHANDLER_HXX_
#include <classes/statusbarconfiguration.hxx>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#ifndef __SGI_STL_HASH_MAP
#include <hash_map>
#endif
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadStatusBarDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
enum StatusBar_XML_Entry
{
SB_ELEMENT_STATUSBAR,
SB_ELEMENT_STATUSBARITEM,
SB_ATTRIBUTE_URL,
SB_ATTRIBUTE_ALIGN,
SB_ATTRIBUTE_STYLE,
SB_ATTRIBUTE_AUTOSIZE,
SB_ATTRIBUTE_OWNERDRAW,
SB_ATTRIBUTE_WIDTH,
SB_ATTRIBUTE_OFFSET,
SB_XML_ENTRY_COUNT
};
enum StatusBar_XML_Namespace
{
SB_NS_STATUSBAR,
SB_NS_XLINK,
SB_XML_NAMESPACES_COUNT
};
OReadStatusBarDocumentHandler( StatusBarDescriptor& aStatusBarItems );
virtual ~OReadStatusBarDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL ignorableWhitespace(const rtl::OUString& aWhitespaces)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL processingInstruction(const rtl::OUString& aTarget,
const rtl::OUString& aData)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDocumentLocator(
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > &xLocator)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
::rtl::OUString getErrorLineString();
class StatusBarHashMap : public ::std::hash_map< ::rtl::OUString ,
StatusBar_XML_Entry ,
OUStringHashCode ,
::std::equal_to< ::rtl::OUString > >
{
public:
inline void free()
{
StatusBarHashMap().swap( *this );
}
};
sal_Bool m_bStatusBarStartFound;
sal_Bool m_bStatusBarEndFound;
sal_Bool m_bStatusBarItemStartFound;
StatusBarHashMap m_aStatusBarMap;
StatusBarDescriptor& m_aStatusBarItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator;
};
class OWriteStatusBarDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses.
{
public:
OWriteStatusBarDocumentHandler(
const StatusBarDescriptor& aStatusBarItems,
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > );
virtual ~OWriteStatusBarDocumentHandler();
void WriteStatusBarDocument() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
virtual void WriteStatusBarItem( const StatusBarItemDescriptor* ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
const StatusBarDescriptor& m_aStatusBarItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > m_xEmptyList;
::rtl::OUString m_aXMLStatusBarNS;
::rtl::OUString m_aXMLXlinkNS;
::rtl::OUString m_aAttributeType;
::rtl::OUString m_aAttributeURL;
};
} // namespace framework
#endif

View File

@@ -1,96 +0,0 @@
#ifndef __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
#define __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
#include <svtools/svarray.hxx>
#ifndef _SV_BITMAP_HXX
#include <vcl/bitmapex.hxx>
#endif
#include <tools/string.hxx>
#include <tools/stream.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/toolbox.hxx>
// #110897#
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
namespace framework
{
struct ToolBoxItemDescriptor
{
BitmapEx* pBmpEx; // Bitmap ptr not used by xml configuration
String aBitmapName; // bitmap name => use to find correct bmp file
String aItemText; // label for this toolbox item
String aURL; // URL command to dispatch
USHORT nId; // internal id not used by xml configuration
USHORT nItemBits; // properties for this toolbox item (WinBits)
USHORT nItemType; // toolbox item type (BUTTON, SPACE, BREAK, SEPARATOR)
USHORT nVisible; // toolbox item visible?
USHORT nWidth; // width of a toolbox window (edit field, etc.)
USHORT nUserDef; // user defined toolbox item (1=yes/0=no)
String aHelpId; // A help id associated with this toolbox item
public:
ToolBoxItemDescriptor() : pBmpEx( 0 )
,nId( 0 )
,nItemBits( 0 )
,nItemType( (USHORT)TOOLBOXITEM_SPACE )
,nVisible( sal_True )
,nWidth( 0 )
,nUserDef( sal_False ) {}
};
typedef ToolBoxItemDescriptor* ToolBoxItemDescriptorPtr;
SV_DECL_PTRARR_DEL( ToolBoxDescriptor, ToolBoxItemDescriptorPtr, 10, 2)
struct ToolBoxLayoutItemDescriptor
{
String aName; // Unique name of the toolbox ( Objectbar, Toolbar etc. )
String aUserName; // Userspecified name for this toolbar
Point aFloatingPos; // Position in floating mode
USHORT nFloatingLines; // Number of lines in floating mode
USHORT nLines; // Number of lines in docking mode
WindowAlign eAlign; // Aligned position in docking mode
BOOL bVisible; // Visible or not
BOOL bFloating; // Floating mode on/off
ButtonType eType; // text, symbol or text+symbol
ToolBoxLayoutItemDescriptor() : nFloatingLines( 0 )
,nLines( 1 )
,eAlign( WINDOWALIGN_LEFT )
,bVisible( sal_False )
,bFloating( sal_False )
,eType( BUTTON_SYMBOL ) {}
};
typedef ToolBoxLayoutItemDescriptor* ToolBoxLayoutItemDescriptorPtr;
SV_DECL_PTRARR_DEL( ToolBoxLayoutDescriptor, ToolBoxLayoutItemDescriptorPtr, 10, 2)
class ToolBoxConfiguration
{
public:
// #110897#
static sal_Bool LoadToolBox(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rInStream, ToolBoxDescriptor& aItems );
// #110897#
static sal_Bool StoreToolBox(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rOutStream, const ToolBoxDescriptor& aItems );
// #110897#
static sal_Bool LoadToolBoxLayout(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rInStream, ToolBoxLayoutDescriptor& aItems );
// #110897#
static sal_Bool StoreToolBoxLayout(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
SvStream& rOutStream, ToolBoxLayoutDescriptor& aItems );
};
} // namespace framework
#endif // __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_

View File

@@ -1,80 +0,0 @@
#ifndef __FRAMEWORK_TOOLBOXCONFIGURATIONDEFINES_HXX_
#define __FRAMEWORK_TOOLBOXCONFIGURATIONDEFINES_HXX_
#define XMLNS_TOOLBAR "http://openoffice.org/2001/toolbar"
#define XMLNS_XLINK "http://www.w3.org/1999/xlink"
#define XMLNS_TOOLBAR_PREFIX "toolbar:"
#define XMLNS_XLINK_PREFIX "xlink:"
#define XMLNS_FILTER_SEPARATOR "^"
#define ELEMENT_TOOLBAR "toolbar"
#define ELEMENT_TOOLBARITEM "toolbaritem"
#define ELEMENT_TOOLBARSPACE "toolbarspace"
#define ELEMENT_TOOLBARBREAK "toolbarbreak"
#define ELEMENT_TOOLBARSEPARATOR "toolbarseparator"
#define ELEMENT_TOOLBARLAYOUTS "toolbarlayouts"
#define ELEMENT_TOOLBARLAYOUT "toolbarlayout"
#define ELEMENT_TOOLBARCONFIGITEMS "toolbarconfigitems"
#define ELEMENT_TOOLBARCONFIGITEM "toolbarconfigitem"
#define ATTRIBUTE_BITMAP "bitmap"
#define ATTRIBUTE_TEXT "text"
#define ATTRIBUTE_URL "href"
#define ATTRIBUTE_ITEMBITS "property"
#define ATTRIBUTE_VISIBLE "visible"
#define ATTRIBUTE_WIDTH "width"
#define ATTRIBUTE_USER "userdefined"
#define ATTRIBUTE_HELPID "helpid"
#define ATTRIBUTE_ITEMSTYLE "style"
#define ATTRIBUTE_ID "id"
#define ATTRIBUTE_FLOATINGPOSLEFT "floatingposleft"
#define ATTRIBUTE_FLOATINGPOSTOP "floatingpostop"
#define ATTRIBUTE_TOOLBARNAME "toolbarname"
#define ATTRIBUTE_CONTEXT "context"
#define ATTRIBUTE_FLOATINGLINES "floatinglines"
#define ATTRIBUTE_DOCKINGLINES "dockinglines"
#define ATTRIBUTE_ALIGN "align"
#define ATTRIBUTE_FLOATING "floating"
#define ATTRIBUTE_BUTTONTYPE "style"
#define ATTRIBUTE_USERDEFNAME "userdefname"
#define ELEMENT_NS_TOOLBAR "toolbar:toolbar"
#define ELEMENT_NS_TOOLBARITEM "toolbar:toolbaritem"
#define ELEMENT_NS_TOOLBARSPACE "toolbar:toolbarspace"
#define ELEMENT_NS_TOOLBARBREAK "toolbar:toolbarbreak"
#define ELEMENT_NS_TOOLBARSEPARATOR "toolbar:toolbarseparator"
#define ELEMENT_NS_TOOLBARLAYOUTS "toolbar:toolbarlayouts"
#define ELEMENT_NS_TOOLBARLAYOUT "toolbar:toolbarlayout"
#define ELEMENT_NS_TOOLBARCONFIGITEMS "toolbar:toolbarconfigitems"
#define ELEMENT_NS_TOOLBARCONFIGITEM "toolbar:toolbarconfigitem"
#define ATTRIBUTE_XMLNS_TOOLBAR "xmlns:toolbar"
#define ATTRIBUTE_XMLNS_XLINK "xmlns:xlink"
#define ATTRIBUTE_TYPE_CDATA "CDATA"
#define ATTRIBUTE_BOOLEAN_TRUE "true"
#define ATTRIBUTE_BOOLEAN_FALSE "false"
#define ATTRIBUTE_ALIGN_LEFT "left"
#define ATTRIBUTE_ALIGN_RIGHT "right"
#define ATTRIBUTE_ALIGN_TOP "top"
#define ATTRIBUTE_ALIGN_BOTTOM "bottom"
#define ATTRIBUTE_STYLE_TEXT "text"
#define ATTRIBUTE_STYLE_SYMBOL "symbol"
#define ATTRIBUTE_STYLE_SYMBOLTEXT "symboltext"
#define ATTRIBUTE_STYLE_SYMBOLPLUSTEXT "symbol+text"
#define ATTRIBUTE_ITEMSTYLE_RADIO "radio"
#define ATTRIBUTE_ITEMSTYLE_AUTO "auto"
#define ATTRIBUTE_ITEMSTYLE_LEFT "left"
#define ATTRIBUTE_ITEMSTYLE_AUTOSIZE "autosize"
#define ATTRIBUTE_ITEMSTYLE_DROPDOWN "dropdown"
#define ATTRIBUTE_ITEMSTYLE_REPEAT "repeat"
#endif

View File

@@ -1,217 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: toolboxdocumenthandler.hxx,v $
* $Revision: 1.6 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_TOOLBOXDOCUMENTHANDLER_HXX_
#define __FRAMEWORK_CLASSES_TOOLBOXDOCUMENTHANDLER_HXX_
#include <classes/toolboxconfiguration.hxx>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#ifndef __SGI_STL_HASH_MAP
#include <hash_map>
#endif
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadToolBoxDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
enum ToolBox_XML_Entry
{
TB_ELEMENT_TOOLBAR,
TB_ELEMENT_TOOLBARITEM,
TB_ELEMENT_TOOLBARSPACE,
TB_ELEMENT_TOOLBARBREAK,
TB_ELEMENT_TOOLBARSEPARATOR,
TB_ATTRIBUTE_TEXT,
TB_ATTRIBUTE_BITMAP,
TB_ATTRIBUTE_URL,
TB_ATTRIBUTE_ITEMBITS,
TB_ATTRIBUTE_VISIBLE,
TB_ATTRIBUTE_WIDTH,
TB_ATTRIBUTE_USER,
TB_ATTRIBUTE_HELPID,
TB_ATTRIBUTE_STYLE,
TB_XML_ENTRY_COUNT
};
enum ToolBox_XML_Namespace
{
TB_NS_TOOLBAR,
TB_NS_XLINK,
TB_XML_NAMESPACES_COUNT
};
OReadToolBoxDocumentHandler( ToolBoxDescriptor& aToolBoxItems );
virtual ~OReadToolBoxDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL ignorableWhitespace(const rtl::OUString& aWhitespaces)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL processingInstruction(const rtl::OUString& aTarget,
const rtl::OUString& aData)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDocumentLocator(
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > &xLocator)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
::rtl::OUString getErrorLineString();
class ToolBoxHashMap : public ::std::hash_map< ::rtl::OUString ,
ToolBox_XML_Entry ,
OUStringHashCode ,
::std::equal_to< ::rtl::OUString > >
{
public:
inline void free()
{
ToolBoxHashMap().swap( *this );
}
};
sal_Bool m_bToolBarStartFound;
sal_Bool m_bToolBarEndFound;
sal_Bool m_bToolBarItemStartFound;
sal_Bool m_bToolBarSpaceStartFound;
sal_Bool m_bToolBarBreakStartFound;
sal_Bool m_bToolBarSeparatorStartFound;
ToolBoxHashMap m_aToolBoxMap;
ToolBoxDescriptor& m_aToolBoxItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator;
sal_Int32 m_nHashCode_Style_Radio;
sal_Int32 m_nHashCode_Style_Auto;
sal_Int32 m_nHashCode_Style_Left;
sal_Int32 m_nHashCode_Style_AutoSize;
sal_Int32 m_nHashCode_Style_DropDown;
sal_Int32 m_nHashCode_Style_Repeat;
};
class OWriteToolBoxDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses.
{
public:
OWriteToolBoxDocumentHandler(
const ToolBoxDescriptor& aToolBoxItems,
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > );
virtual ~OWriteToolBoxDocumentHandler();
void WriteToolBoxDocument() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
virtual void WriteToolBoxItem( const ToolBoxItemDescriptor* ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void WriteToolBoxSpace() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void WriteToolBoxBreak() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void WriteToolBoxSeparator() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
const ToolBoxDescriptor& m_aToolBoxItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > m_xEmptyList;
::rtl::OUString m_aXMLToolbarNS;
::rtl::OUString m_aXMLXlinkNS;
::rtl::OUString m_aAttributeType;
::rtl::OUString m_aAttributeURL;
};
} // namespace framework
#endif

View File

@@ -1,198 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: toolboxlayoutdocumenthandler.hxx,v $
* $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_CLASSES_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_
#define __FRAMEWORK_CLASSES_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_
#include <classes/toolboxconfiguration.hxx>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#ifndef __SGI_STL_HASH_MAP
#include <hash_map>
#endif
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadToolBoxLayoutDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
enum ToolBoxLayout_XML_Entry
{
TBL_ELEMENT_TOOLBARLAYOUTS,
TBL_ELEMENT_TOOLBARLAYOUT,
TBL_ELEMENT_TOOLBARCONFIGITEMS,
TBL_ELEMENT_TOOLBARCONFIGITEM,
TBL_ATTRIBUTE_ID,
TBL_ATTRIBUTE_TOOLBARNAME,
TBL_ATTRIBUTE_CONTEXT,
TBL_ATTRIBUTE_FLOATINGLINES,
TBL_ATTRIBUTE_DOCKINGLINES,
TBL_ATTRIBUTE_ALIGN,
TBL_ATTRIBUTE_FLOATING,
TBL_ATTRIBUTE_FLOATINGPOSLEFT,
TBL_ATTRIBUTE_FLOATINGPOSTOP,
TBL_ATTRIBUTE_VISIBLE,
TBL_ATTRIBUTE_STYLE,
TBL_ATTRIBUTE_USERDEFNAME,
TBL_XML_ENTRY_COUNT
};
enum ToolBox_XML_Namespace
{
TBL_NS_TOOLBAR,
TBL_XML_NAMESPACES_COUNT
};
OReadToolBoxLayoutDocumentHandler( ToolBoxLayoutDescriptor& aToolBoxLayoutItems );
virtual ~OReadToolBoxLayoutDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL ignorableWhitespace(const rtl::OUString& aWhitespaces)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL processingInstruction(const rtl::OUString& aTarget,
const rtl::OUString& aData)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDocumentLocator(
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > &xLocator)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
::rtl::OUString getErrorLineString();
class ToolBoxLayoutHashMap : public ::std::hash_map< ::rtl::OUString ,
ToolBoxLayout_XML_Entry ,
OUStringHashCode ,
::std::equal_to< ::rtl::OUString > >
{
public:
inline void free()
{
ToolBoxLayoutHashMap().swap( *this );
}
};
sal_Bool m_bToolBarLayoutsStartFound;
sal_Bool m_bToolBarLayoutsEndFound;
sal_Bool m_bToolBarLayoutStartFound;
sal_Bool m_bToolBarConfigListStartFound;
sal_Bool m_bToolBarConfigItemStartFound;
ToolBoxLayoutHashMap m_aToolBoxMap;
ToolBoxLayoutDescriptor& m_aToolBoxItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator;
};
class OWriteToolBoxLayoutDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses.
{
public:
OWriteToolBoxLayoutDocumentHandler(
const ToolBoxLayoutDescriptor& aToolBoxLayoutItems,
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > );
virtual ~OWriteToolBoxLayoutDocumentHandler();
void WriteToolBoxLayoutDocument() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
virtual void WriteToolBoxLayoutItem( const ToolBoxLayoutItemDescriptor* ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
const ToolBoxLayoutDescriptor& m_aToolBoxLayoutItems;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > m_xEmptyList;
::rtl::OUString m_aXMLToolbarNS;
::rtl::OUString m_aAttributeType;
::rtl::OUString m_aTrueValue;
::rtl::OUString m_aFalseValue;
};
} // namespace framework
#endif

View File

@@ -51,7 +51,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weakref.hxx>
//_________________________________________________________________________________________________________________
@@ -63,10 +63,8 @@ namespace framework{
//_________________________________________________________________________________________________________________
class DockingAreaDefaultAcceptor : public css::lang::XTypeProvider ,
public ::com::sun::star::ui::XDockingAreaAcceptor ,
private ThreadHelpBase ,
public ::cppu::OWeakObject
class DockingAreaDefaultAcceptor : private ThreadHelpBase ,
public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XDockingAreaAcceptor >
{
public:
@@ -92,13 +90,6 @@ class DockingAreaDefaultAcceptor : public css::lang::XTypeProvider
DockingAreaDefaultAcceptor( const css::uno::Reference< css::frame::XFrame >& xOwner );
virtual ~DockingAreaDefaultAcceptor();
//---------------------------------------------------------------------------------------------------------
// XInterface
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
//---------------------------------------------------------------------------------------------------------
// XDockingAreaAcceptor
//---------------------------------------------------------------------------------------------------------

View File

@@ -32,6 +32,8 @@
#define __MISC_HELPER_HXX_
#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <i18npool/lang.h>
#include <svtools/languageoptions.hxx>
@@ -48,12 +50,21 @@ inline bool IsScriptTypeMatchingToLanguage( sal_Int16 nScriptType, LanguageType
class LanguageGuessingHelper
{
mutable ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > m_xLanguageGuesser;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
public:
LanguageGuessingHelper() {}
LanguageGuessingHelper(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceManager) : m_xServiceManager(_xServiceManager){}
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > GetGuesser() const;
};
};
::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL
,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory
,::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xUICommandLabels
,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame
,::rtl::OUString& _rModuleIdentifier
,sal_Bool& _rIni
,const sal_Char* _pName);
} // namespace framework

View File

@@ -55,7 +55,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weakref.hxx>
//_________________________________________________________________________________________________________________
@@ -90,10 +90,8 @@ namespace framework{
@devstatus ready to use
*//*-*************************************************************************************************************/
class OComponentAccess : public css::lang::XTypeProvider ,
public css::container::XEnumerationAccess , // => XElementAccess
private ThreadHelpBase , // Must be the first of baseclasses - Is neccessary for right initialization of objects!
public ::cppu::OWeakObject
class OComponentAccess : private ThreadHelpBase , // Must be the first of baseclasses - Is neccessary for right initialization of objects!
public ::cppu::WeakImplHelper1< ::com::sun::star::container::XEnumerationAccess >
{
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -122,13 +120,6 @@ class OComponentAccess : public css::lang::XTypeProvider ,
OComponentAccess( const css::uno::Reference< css::frame::XDesktop >& xOwner );
//---------------------------------------------------------------------------------------------------------
// XInterface
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
//---------------------------------------------------------------------------------------------------------
// XEnumerationAccess
//---------------------------------------------------------------------------------------------------------

View File

@@ -54,7 +54,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
//_________________________________________________________________________________________________________________
// namespace
@@ -88,11 +88,8 @@ namespace framework{
@threadsafe yes
*//*-*************************************************************************************************************/
class OComponentEnumeration : public css::lang::XTypeProvider ,
public css::lang::XEventListener ,
public css::container::XEnumeration ,
public ThreadHelpBase ,
public ::cppu::OWeakObject
class OComponentEnumeration : public ThreadHelpBase ,
public ::cppu::WeakImplHelper2< ::com::sun::star::container::XEnumeration,::com::sun::star::lang::XEventListener >
{
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -119,13 +116,6 @@ class OComponentEnumeration : public css::lang::XTypeProvider ,
OComponentEnumeration( const css::uno::Sequence< css::uno::Reference< css::lang::XComponent > >& seqComponents );
//---------------------------------------------------------------------------------------------------------
// XInterface
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
//---------------------------------------------------------------------------------------------------------
// XEventListener
//---------------------------------------------------------------------------------------------------------

View File

@@ -53,7 +53,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weakref.hxx>
//_________________________________________________________________________________________________________________
@@ -90,10 +90,8 @@ namespace framework{
@devstatus deprecated
*//*-*************************************************************************************************************/
class OFrames : public css::lang::XTypeProvider ,
public css::frame::XFrames , //=> XIndexAccess => XElementAccess
private ThreadHelpBase , // Must be the first of baseclasses - Is neccessary for right initialization of objects!
public ::cppu::OWeakObject
class OFrames : private ThreadHelpBase , // Must be the first of baseclasses - Is neccessary for right initialization of objects!
public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XFrames >
{
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -124,13 +122,6 @@ class OFrames : public css::lang::XTypeProvider ,
const css::uno::Reference< css::frame::XFrame >& xOwner ,
FrameContainer* pFrameContainer );
//---------------------------------------------------------------------------------------------------------
// XInterface
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
//---------------------------------------------------------------------------------------------------------
// XFrames
//---------------------------------------------------------------------------------------------------------

View File

@@ -58,7 +58,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -106,11 +106,8 @@ typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< ::rtl::OUString
@devstatus ready to use
*//*-*************************************************************************************************************/
class OPlugInFrameDispatcher : public css::frame::XDispatchProvider ,
public css::frame::XDispatch ,
public css::mozilla::XPluginInstanceNotifySink ,
private ThreadHelpBase ,
public ::cppu::OWeakObject
class OPlugInFrameDispatcher : private ThreadHelpBase ,
public ::cppu::WeakImplHelper3< ::com::sun::star::frame::XDispatchProvider, ::com::sun::star::frame::XDispatch, ::com::sun::star::mozilla::XPluginInstanceNotifySink >
{
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -143,12 +140,6 @@ class OPlugInFrameDispatcher : public css::frame::XDispatchProvider
const css::uno::Reference< css::mozilla::XPluginInstance >& xOwner ,
const css::uno::Reference< css::mozilla::XPluginInstancePeer >& xPlugInDLL );
//---------------------------------------------------------------------------------------------------------
// XInterface
//---------------------------------------------------------------------------------------------------------
DECLARE_XINTERFACE
//---------------------------------------------------------------------------------------------------------
// XDispatchProvider
//---------------------------------------------------------------------------------------------------------

View File

@@ -56,7 +56,7 @@
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <com/sun/star/uri/XUriReference.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
@@ -93,7 +93,7 @@ namespace framework
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0;
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException) = 0;
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
// XInitialization
@@ -127,8 +127,11 @@ namespace framework
protected:
virtual void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
virtual void impl_setPopupMenu();
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL );
bool m_bInitialized;
bool m_bDisposed;
rtl::OUString m_aCommandURL;
@@ -136,6 +139,7 @@ namespace framework
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xDispatch;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > m_xPopupMenu;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener
};

View File

@@ -52,6 +52,7 @@
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
//_________________________________________________________________________________________________________________
// other includes
@@ -80,7 +81,7 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
// public methods
//-------------------------------------------------------------------------------------------------------------
public:
UIConfigElementWrapperBase( sal_Int16 nType );
UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory );
virtual ~UIConfigElementWrapperBase();
//---------------------------------------------------------------------------------------------------------
@@ -99,8 +100,8 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
// XUIElementSettings
virtual void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException) = 0;
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException);
// XUIElement
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0;
@@ -135,6 +136,8 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException);
virtual void impl_fillNewData();
static const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor();
sal_Int16 m_nType;
@@ -145,6 +148,7 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
m_bDisposed : 1,
m_bNoClose : 1;
rtl::OUString m_aResourceURL;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xConfigSource;
com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > m_xConfigData;
com::sun::star::uno::WeakReference< com::sun::star::frame::XFrame > m_xWeakFrame;

View File

@@ -85,8 +85,8 @@ struct ThreadHelpBase2
mutable ::osl::Mutex m_aLock;
};
class PreventDuplicateInteraction : public ::cppu::WeakImplHelper1< css::task::XInteractionHandler >
, private ThreadHelpBase2
class PreventDuplicateInteraction : private ThreadHelpBase2
,public ::cppu::WeakImplHelper1< css::task::XInteractionHandler >
{
//_____________________________________
// structs, types etcp.

View File

@@ -41,7 +41,7 @@
//_______________________________________________
// other includes
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
//_______________________________________________
// uno includes
@@ -66,12 +66,8 @@ namespace framework{
@author as96863
*/
class HelpOnStartup : public css::lang::XTypeProvider
, public css::lang::XServiceInfo
, public css::task::XJob
, public css::lang::XEventListener
, private ThreadHelpBase
, public ::cppu::OWeakObject
class HelpOnStartup : private ThreadHelpBase
,public ::cppu::WeakImplHelper3< ::com::sun::star::lang::XServiceInfo,::com::sun::star::lang::XEventListener,::com::sun::star::task::XJob >
{
//-------------------------------------------
// member
@@ -132,11 +128,7 @@ class HelpOnStartup : public css::lang::XTypeProvider
public:
//---------------------------------------
// css.uno.XInterface
// css.lang.XTypeProvider
// css.lang.XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// css.task.XJob

View File

@@ -41,7 +41,7 @@
//_______________________________________________
// other includes
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
//_______________________________________________
// uno includes
@@ -71,11 +71,8 @@ namespace framework{
@author as96863
*/
class ShellJob : public css::lang::XTypeProvider
, public css::lang::XServiceInfo
, public css::task::XJob
, private ThreadHelpBase
, public ::cppu::OWeakObject
class ShellJob : private ThreadHelpBase
,public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo,::com::sun::star::task::XJob >
{
//-------------------------------------------
// member
@@ -112,11 +109,7 @@ class ShellJob : public css::lang::XTypeProvider
public:
//---------------------------------------
// css.uno.XInterface
// css.lang.XTypeProvider
// css.lang.XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// css.task.XJob

View File

@@ -111,7 +111,7 @@
{
::rtl::OStringBuffer sBuffer( 10000 );
if( m_lSnapshots.size() > 0 )
if( !m_lSnapshots.empty() )
{
// Write informations to return buffer
::std::vector< _MemoryInfo >::const_iterator pItem1;

View File

@@ -55,7 +55,9 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/factory.hxx>
#include <comphelper/sequence.hxx>
#include <rtl/ustring.hxx>
#include <rtl/logfile.hxx>
//_________________________________________________________________________________________________________________
// namespace
@@ -93,29 +95,7 @@ ________________________________________________________________________________
/*===========================================================================================================*/ \
sal_Bool SAL_CALL CLASS::supportsService( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException ) \
{ \
/* Set default return value. */ \
sal_Bool bReturn = sal_False ; \
/* Get names of all supported servicenames. */ \
css::uno::Sequence< ::rtl::OUString > seqServiceNames = getSupportedServiceNames(); \
const ::rtl::OUString* pArray = seqServiceNames.getConstArray(); \
sal_Int32 nCounter = 0; \
sal_Int32 nLength = seqServiceNames.getLength(); \
/* Search for right name in list. */ \
while ( \
( nCounter < nLength ) && \
( bReturn == sal_False ) \
) \
{ \
/* Is name was found, say "YES, SERVICE IS SUPPORTED." and break loop. */ \
if ( pArray[nCounter] == sServiceName ) \
{ \
bReturn = sal_True ; \
} \
/* Else step to next element in list. */ \
++nCounter; \
} \
/* Return state of search. */ \
return bReturn; \
return ::comphelper::findValue(getSupportedServiceNames(), sServiceName, sal_True).getLength() != 0; \
} \
\
/*===========================================================================================================*/ \
@@ -155,6 +135,7 @@ ________________________________________________________________________________
/*===========================================================================================================*/ \
css::uno::Reference< css::uno::XInterface > SAL_CALL CLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ) \
{ \
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework","Ocke.Janssen@sun.com",U2B(IMPLEMENTATIONNAME).getStr()); \
/* create new instance of service */ \
CLASS* pClass = new CLASS( xServiceManager ); \
/* hold it alive by increasing his ref count!!! */ \

View File

@@ -36,44 +36,44 @@
namespace framework{
static const ::rtl::OUString MEDIADESCRIPTOR_ASTEMPLATE = ::rtl::OUString::createFromAscii("AsTemplate" );
static const ::rtl::OUString MEDIADESCRIPTOR_CHARACTERSET = ::rtl::OUString::createFromAscii("CharacterSet" );
static const ::rtl::OUString MEDIADESCRIPTOR_DEEPDETECTION = ::rtl::OUString::createFromAscii("DeepDetection" );
static const ::rtl::OUString MEDIADESCRIPTOR_DETECTSERVICE = ::rtl::OUString::createFromAscii("DetectService" );
static const ::rtl::OUString MEDIADESCRIPTOR_EXTENSION = ::rtl::OUString::createFromAscii("Extension" );
static const ::rtl::OUString MEDIADESCRIPTOR_FILENAME = ::rtl::OUString::createFromAscii("FileName" ); // deprecated!
static const ::rtl::OUString MEDIADESCRIPTOR_FILTERNAME = ::rtl::OUString::createFromAscii("FilterName" );
static const ::rtl::OUString MEDIADESCRIPTOR_FILTEROPTIONS = ::rtl::OUString::createFromAscii("FilterOptions" );
static const ::rtl::OUString MEDIADESCRIPTOR_FORMAT = ::rtl::OUString::createFromAscii("Format" );
static const ::rtl::OUString MEDIADESCRIPTOR_FRAMENAME = ::rtl::OUString::createFromAscii("FrameName" );
static const ::rtl::OUString MEDIADESCRIPTOR_HIDDEN = ::rtl::OUString::createFromAscii("Hidden" );
static const ::rtl::OUString MEDIADESCRIPTOR_INPUTSTREAM = ::rtl::OUString::createFromAscii("InputStream" );
static const ::rtl::OUString MEDIADESCRIPTOR_INTERACTIONHANDLER = ::rtl::OUString::createFromAscii("InteractionHandler");
static const ::rtl::OUString MEDIADESCRIPTOR_JUMPMARK = ::rtl::OUString::createFromAscii("JumpMark" );
static const ::rtl::OUString MEDIADESCRIPTOR_MACROEXECUTIONMODE = ::rtl::OUString::createFromAscii("MacroExecutionMode");
static const ::rtl::OUString MEDIADESCRIPTOR_MEDIATYPE = ::rtl::OUString::createFromAscii("MediaType" );
static const ::rtl::OUString MEDIADESCRIPTOR_MINIMIZED = ::rtl::OUString::createFromAscii("Minimized" );
static const ::rtl::OUString MEDIADESCRIPTOR_OPENNEWVIEW = ::rtl::OUString::createFromAscii("OpenNewView" );
static const ::rtl::OUString MEDIADESCRIPTOR_OUTPUTSTREAM = ::rtl::OUString::createFromAscii("OutputStream" );
static const ::rtl::OUString MEDIADESCRIPTOR_PATTERN = ::rtl::OUString::createFromAscii("Pattern" );
static const ::rtl::OUString MEDIADESCRIPTOR_POSSIZE = ::rtl::OUString::createFromAscii("PosSize" );
static const ::rtl::OUString MEDIADESCRIPTOR_POSTDATA = ::rtl::OUString::createFromAscii("PostData" );
static const ::rtl::OUString MEDIADESCRIPTOR_POSTSTRING = ::rtl::OUString::createFromAscii("PostString" );
static const ::rtl::OUString MEDIADESCRIPTOR_PREVIEW = ::rtl::OUString::createFromAscii("Preview" );
static const ::rtl::OUString MEDIADESCRIPTOR_READONLY = ::rtl::OUString::createFromAscii("ReadOnly" );
static const ::rtl::OUString MEDIADESCRIPTOR_REFERRER = ::rtl::OUString::createFromAscii("Referer" );
static const ::rtl::OUString MEDIADESCRIPTOR_SILENT = ::rtl::OUString::createFromAscii("Silent" );
static const ::rtl::OUString MEDIADESCRIPTOR_STATUSINDICATOR = ::rtl::OUString::createFromAscii("StatusIndicator" );
static const ::rtl::OUString MEDIADESCRIPTOR_TEMPLATENAME = ::rtl::OUString::createFromAscii("TemplateName" );
static const ::rtl::OUString MEDIADESCRIPTOR_TEMPLATEREGIONNAME = ::rtl::OUString::createFromAscii("TemplateRegionName");
static const ::rtl::OUString MEDIADESCRIPTOR_TYPENAME = ::rtl::OUString::createFromAscii("TypeName" );
static const ::rtl::OUString MEDIADESCRIPTOR_UPDATEDOCMODE = ::rtl::OUString::createFromAscii("UpdateDocMode" );
static const ::rtl::OUString MEDIADESCRIPTOR_URL = ::rtl::OUString::createFromAscii("URL" );
static const ::rtl::OUString MEDIADESCRIPTOR_VERSION = ::rtl::OUString::createFromAscii("Version" );
static const ::rtl::OUString MEDIADESCRIPTOR_VIEWID = ::rtl::OUString::createFromAscii("ViewId" );
static const ::rtl::OUString MEDIADESCRIPTOR_REPAIRPACKAGE = ::rtl::OUString::createFromAscii("RepairPackage" );
static const ::rtl::OUString MEDIADESCRIPTOR_DOCUMENTTITLE = ::rtl::OUString::createFromAscii("DocumentTitle" );
static const ::rtl::OUString MEDIADESCRIPTOR_MODEL = ::rtl::OUString::createFromAscii("Model" );
//static const ::rtl::OUString MEDIADESCRIPTOR_ASTEMPLATE = ::rtl::OUString::createFromAscii("AsTemplate" );
//static const ::rtl::OUString MEDIADESCRIPTOR_CHARACTERSET = ::rtl::OUString::createFromAscii("CharacterSet" );
//static const ::rtl::OUString MEDIADESCRIPTOR_DEEPDETECTION = ::rtl::OUString::createFromAscii("DeepDetection" );
//static const ::rtl::OUString MEDIADESCRIPTOR_DETECTSERVICE = ::rtl::OUString::createFromAscii("DetectService" );
//static const ::rtl::OUString MEDIADESCRIPTOR_EXTENSION = ::rtl::OUString::createFromAscii("Extension" );
//static const ::rtl::OUString MEDIADESCRIPTOR_FILENAME = ::rtl::OUString::createFromAscii("FileName" ); // deprecated!
//static const ::rtl::OUString MEDIADESCRIPTOR_FILTERNAME = ::rtl::OUString::createFromAscii("FilterName" );
//static const ::rtl::OUString MEDIADESCRIPTOR_FILTEROPTIONS = ::rtl::OUString::createFromAscii("FilterOptions" );
//static const ::rtl::OUString MEDIADESCRIPTOR_FORMAT = ::rtl::OUString::createFromAscii("Format" );
//static const ::rtl::OUString MEDIADESCRIPTOR_FRAMENAME = ::rtl::OUString::createFromAscii("FrameName" );
//static const ::rtl::OUString MEDIADESCRIPTOR_HIDDEN = ::rtl::OUString::createFromAscii("Hidden" );
//static const ::rtl::OUString MEDIADESCRIPTOR_INPUTSTREAM = ::rtl::OUString::createFromAscii("InputStream" );
//static const ::rtl::OUString MEDIADESCRIPTOR_INTERACTIONHANDLER = ::rtl::OUString::createFromAscii("InteractionHandler");
//static const ::rtl::OUString MEDIADESCRIPTOR_JUMPMARK = ::rtl::OUString::createFromAscii("JumpMark" );
//static const ::rtl::OUString MEDIADESCRIPTOR_MACROEXECUTIONMODE = ::rtl::OUString::createFromAscii("MacroExecutionMode");
//static const ::rtl::OUString MEDIADESCRIPTOR_MEDIATYPE = ::rtl::OUString::createFromAscii("MediaType" );
//static const ::rtl::OUString MEDIADESCRIPTOR_MINIMIZED = ::rtl::OUString::createFromAscii("Minimized" );
//static const ::rtl::OUString MEDIADESCRIPTOR_OPENNEWVIEW = ::rtl::OUString::createFromAscii("OpenNewView" );
//static const ::rtl::OUString MEDIADESCRIPTOR_OUTPUTSTREAM = ::rtl::OUString::createFromAscii("OutputStream" );
//static const ::rtl::OUString MEDIADESCRIPTOR_PATTERN = ::rtl::OUString::createFromAscii("Pattern" );
//static const ::rtl::OUString MEDIADESCRIPTOR_POSSIZE = ::rtl::OUString::createFromAscii("PosSize" );
//static const ::rtl::OUString MEDIADESCRIPTOR_POSTDATA = ::rtl::OUString::createFromAscii("PostData" );
//static const ::rtl::OUString MEDIADESCRIPTOR_POSTSTRING = ::rtl::OUString::createFromAscii("PostString" );
//static const ::rtl::OUString MEDIADESCRIPTOR_PREVIEW = ::rtl::OUString::createFromAscii("Preview" );
//static const ::rtl::OUString MEDIADESCRIPTOR_READONLY = ::rtl::OUString::createFromAscii("ReadOnly" );
//static const ::rtl::OUString MEDIADESCRIPTOR_REFERRER = ::rtl::OUString::createFromAscii("Referer" );
//static const ::rtl::OUString MEDIADESCRIPTOR_SILENT = ::rtl::OUString::createFromAscii("Silent" );
//static const ::rtl::OUString MEDIADESCRIPTOR_STATUSINDICATOR = ::rtl::OUString::createFromAscii("StatusIndicator" );
//static const ::rtl::OUString MEDIADESCRIPTOR_TEMPLATENAME = ::rtl::OUString::createFromAscii("TemplateName" );
//static const ::rtl::OUString MEDIADESCRIPTOR_TEMPLATEREGIONNAME = ::rtl::OUString::createFromAscii("TemplateRegionName");
//static const ::rtl::OUString MEDIADESCRIPTOR_TYPENAME = ::rtl::OUString::createFromAscii("TypeName" );
//static const ::rtl::OUString MEDIADESCRIPTOR_UPDATEDOCMODE = ::rtl::OUString::createFromAscii("UpdateDocMode" );
//static const ::rtl::OUString MEDIADESCRIPTOR_URL = ::rtl::OUString::createFromAscii("URL" );
//static const ::rtl::OUString MEDIADESCRIPTOR_VERSION = ::rtl::OUString::createFromAscii("Version" );
//static const ::rtl::OUString MEDIADESCRIPTOR_VIEWID = ::rtl::OUString::createFromAscii("ViewId" );
//static const ::rtl::OUString MEDIADESCRIPTOR_REPAIRPACKAGE = ::rtl::OUString::createFromAscii("RepairPackage" );
//static const ::rtl::OUString MEDIADESCRIPTOR_DOCUMENTTITLE = ::rtl::OUString::createFromAscii("DocumentTitle" );
//static const ::rtl::OUString MEDIADESCRIPTOR_MODEL = ::rtl::OUString::createFromAscii("Model" );
} // namespace framework

View File

@@ -135,17 +135,17 @@ namespace framework{
#define IMPLEMENTATIONNAME_FRAME DECLARE_ASCII("com.sun.star.comp.framework.Frame" )
#define IMPLEMENTATIONNAME_DESKTOP DECLARE_ASCII("com.sun.star.comp.framework.Desktop" )
#define IMPLEMENTATIONNAME_TASK DECLARE_ASCII("com.sun.star.comp.framework.Task" )
#define IMPLEMENTATIONNAME_FRAMELOADERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.FrameLoaderFactory" )
#define IMPLEMENTATIONNAME_FILTERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.FilterFactory" )
//#define IMPLEMENTATIONNAME_FRAMELOADERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.FrameLoaderFactory" )
//#define IMPLEMENTATIONNAME_FILTERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.FilterFactory" )
#define IMPLEMENTATIONNAME_URLTRANSFORMER DECLARE_ASCII("com.sun.star.comp.framework.URLTransformer" )
#define IMPLEMENTATIONNAME_PLUGINFRAME DECLARE_ASCII("com.sun.star.comp.framework.PluginFrame" )
// #define IMPLEMENTATIONNAME_PLUGINFRAME DECLARE_ASCII("com.sun.star.comp.framework.PluginFrame" )
#define IMPLEMENTATIONNAME_GENERICFRAMELOADER DECLARE_ASCII("com.sun.star.comp.office.FrameLoader" )
#define IMPLEMENTATIONNAME_MEDIATYPEDETECTIONHELPER DECLARE_ASCII("com.sun.star.comp.framework.MediaTypeDetectionHelper")
#define IMPLEMENTATIONNAME_LOGINDIALOG DECLARE_ASCII("com.sun.star.comp.framework.LoginDialog" )
#define IMPLEMENTATIONNAME_TYPEDETECTION DECLARE_ASCII("com.sun.star.comp.framework.TypeDetection" )
#define IMPLEMENTATIONNAME_DOCUMENTPROPERTIES DECLARE_ASCII("com.sun.star.comp.framework.DocumentProperties" )
//#define IMPLEMENTATIONNAME_LOGINDIALOG DECLARE_ASCII("com.sun.star.comp.framework.LoginDialog" )
//#define IMPLEMENTATIONNAME_TYPEDETECTION DECLARE_ASCII("com.sun.star.comp.framework.TypeDetection" )
//#define IMPLEMENTATIONNAME_DOCUMENTPROPERTIES DECLARE_ASCII("com.sun.star.comp.framework.DocumentProperties" )
#define IMPLEMENTATIONNAME_OXT_HANDLER DECLARE_ASCII("com.sun.star.comp.framework.OXTFileHandler" )
#define IMPLEMENTATIONNAME_CONTENTHANDLERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.ContentHandlerFactory" )
//#define IMPLEMENTATIONNAME_CONTENTHANDLERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.ContentHandlerFactory" )
#define IMPLEMENTATIONNAME_SFXTERMINATOR DECLARE_ASCII("com.sun.star.comp.sfx2.SfxTerminateListener" )
#define IMPLEMENTATIONNAME_PIPETERMINATOR DECLARE_ASCII("com.sun.star.comp.OfficeIPCThreadController" )
#define IMPLEMENTATIONNAME_QUICKLAUNCHER DECLARE_ASCII("com.sun.star.comp.desktop.QuickstartWrapper" )
@@ -160,13 +160,13 @@ namespace framework{
#define IMPLEMENTATIONNAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.comp.framework.PathSettings" )
#define IMPLEMENTATIONNAME_JOBDISPATCH DECLARE_ASCII("com.sun.star.comp.framework.jobs.JobDispatch" )
#define IMPLEMENTATIONNAME_DISPATCHHELPER DECLARE_ASCII("com.sun.star.comp.framework.services.DispatchHelper" )
#define IMPLEMENTATIONNAME_DETECTORFACTORY DECLARE_ASCII("com.sun.star.comp.framework.DetectorFactory" )
//#define IMPLEMENTATIONNAME_DETECTORFACTORY DECLARE_ASCII("com.sun.star.comp.framework.DetectorFactory" )
#define IMPLEMENTATIONNAME_LAYOUTMANAGER DECLARE_ASCII("com.sun.star.comp.framework.LayoutManager" )
#define IMPLEMENTATIONNAME_POPUPMENUCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.PopupMenuControllerFactory" )
#define IMPLEMENTATIONNAME_MACROSMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.MacrosMenuController" )
#define IMPLEMENTATIONNAME_FONTMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.FontMenuController" )
#define IMPLEMENTATIONNAME_FONTSIZEMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.FontSizeMenuController" )
#define IMPLEMENTATIONNAME_FORMATMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.FormatMenuController" )
// #define IMPLEMENTATIONNAME_FORMATMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.FormatMenuController" )
#define IMPLEMENTATIONNAME_OBJECTMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.ObjectMenuController" )
#define IMPLEMENTATIONNAME_HEADERMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.HeaderMenuController" )
#define IMPLEMENTATIONNAME_FOOTERMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.FooterMenuController" )

View File

@@ -51,7 +51,7 @@
//_______________________________________________
// other includes
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
#include <osl/conditn.hxx>
//_______________________________________________
@@ -74,12 +74,8 @@ namespace framework{
All these steps are done inside one method call here.
*/
class DispatchHelper : public css::lang::XTypeProvider
, public css::lang::XServiceInfo
, public css::frame::XDispatchHelper
, public css::frame::XDispatchResultListener // => XEventListener
, public ThreadHelpBase // must be the first base class!
, public ::cppu::OWeakObject // => XInterface, XWeak
class DispatchHelper : public ThreadHelpBase // must be the first base class!
,public ::cppu::WeakImplHelper3< ::com::sun::star::lang::XServiceInfo,::com::sun::star::frame::XDispatchHelper,::com::sun::star::frame::XDispatchResultListener >
{
//-------------------------------------------
@@ -112,8 +108,6 @@ class DispatchHelper : public css::lang::XTypeProvider
//---------------------------------------
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
//---------------------------------------

View File

@@ -57,7 +57,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
//_________________________________________________________________________________________________________________
// namespace
@@ -107,12 +107,8 @@ struct tIMPLExtractedArguments
@devstatus deprecated
*//*-*************************************************************************************************************/
class FrameLoaderFactory : public css::lang::XTypeProvider ,
public css::lang::XServiceInfo ,
public css::lang::XMultiServiceFactory ,
public css::container::XNameAccess , // => XElementAccess
public ThreadHelpBase , // Struct for right initalization of mutex member! Mst first of baseclasses
public ::cppu::OWeakObject
class FrameLoaderFactory : public ThreadHelpBase , // Struct for right initalization of mutex member! Mst first of baseclasses
public ::cppu::WeakImplHelper3< ::com::sun::star::lang::XServiceInfo,::com::sun::star::lang::XMultiServiceFactory,::com::sun::star::container::XNameAccess >
{
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -158,8 +154,6 @@ class FrameLoaderFactory : public css::lang::XTypeProvider ,
// XInterface, XTypeProvider, XServiceInfo
//---------------------------------------------------------------------------------------------------------
DECLARE_XINTERFACE
DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
//---------------------------------------------------------------------------------------------------------

View File

@@ -50,8 +50,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
//_________________________________________________________________________________________________________________
// namespaces
//_________________________________________________________________________________________________________________
@@ -75,10 +74,7 @@ namespace framework{
@devstatus deprecated
*//*-*************************************************************************************************************/
class MediaTypeDetectionHelper : public css::lang::XTypeProvider
, public css::lang::XServiceInfo
, public css::util::XStringMapping
, public ::cppu::OWeakObject
class MediaTypeDetectionHelper : public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringMapping, css::lang::XServiceInfo>
{
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -122,8 +118,6 @@ class MediaTypeDetectionHelper : public css::lang::XTypeProvider
// XInterface, XTypeProvider, XServiceInfo
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
//---------------------------------------------------------------------------------------------------------

View File

@@ -1,317 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: menudocumenthandler.hxx,v $
* $Revision: 1.8 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_SERVICES_MENUDOCUMENTHANDLER_HXX_
#define __FRAMEWORK_SERVICES_MENUDOCUMENTHANDLER_HXX_
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <vcl/menu.hxx>
#include <cppuhelper/weak.hxx>
// #110897#
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace framework{
class ReadMenuDocumentHandlerBase : public ::com::sun::star::xml::sax::XDocumentHandler,
public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
ReadMenuDocumentHandlerBase();
virtual ~ReadMenuDocumentHandlerBase();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException ) = 0;
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException ) = 0;
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException ) = 0;
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException ) = 0;
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException ) = 0;
virtual void SAL_CALL ignorableWhitespace(const rtl::OUString& aWhitespaces)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL processingInstruction(const rtl::OUString& aTarget,
const rtl::OUString& aData)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDocumentLocator(
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > &xLocator)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
::rtl::OUString getErrorLineString();
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler> m_xReader;
};
class OReadMenuDocumentHandler : public ReadMenuDocumentHandlerBase
{
public:
// #110897#
OReadMenuDocumentHandler(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
MenuBar* pMenuBar );
virtual ~OReadMenuDocumentHandler();
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getServiceFactory();
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
USHORT m_nItemId;
int m_nElementDepth;
sal_Bool m_bMenuBarMode;
MenuBar* m_pMenuBar;
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& mxServiceFactory;
}; // OReadMenuDocumentHandler
class OReadMenuBarHandler : public ReadMenuDocumentHandlerBase
{
public:
// #110897#
OReadMenuBarHandler(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
MenuBar* pMenuBar, USHORT* pItemId );
virtual ~OReadMenuBarHandler();
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getServiceFactory();
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
USHORT* m_pItemId;
int m_nElementDepth;
sal_Bool m_bMenuMode;
MenuBar* m_pMenuBar;
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& mxServiceFactory;
}; // OReadMenuBarHandler
class OReadMenuHandler : public ReadMenuDocumentHandlerBase
{
public:
OReadMenuHandler( Menu* pMenu, USHORT* pItemId );
virtual ~OReadMenuHandler();
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
USHORT* m_pItemId;
int m_nElementDepth;
sal_Bool m_bMenuPopupMode;
Menu* m_pMenu;
}; // OReadMenuHandler
class OReadMenuPopupHandler : public ReadMenuDocumentHandlerBase
{
public:
OReadMenuPopupHandler( Menu* pMenu, USHORT* pItemId );
virtual ~OReadMenuPopupHandler();
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
private:
enum NextElementClose { ELEM_CLOSE_NONE, ELEM_CLOSE_MENUITEM, ELEM_CLOSE_MENUSEPARATOR };
int m_nElementDepth;
USHORT* m_pItemId;
sal_Bool m_bMenuMode;
Menu* m_pMenu;
NextElementClose m_nNextElementExpected;
}; // OReadMenuPopupHandler
class OWriteMenuDocumentHandler
{
public:
OWriteMenuDocumentHandler(
MenuBar* pMenu,
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > );
virtual ~OWriteMenuDocumentHandler();
void WriteMenuDocument() throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
virtual void WriteMenu( Menu* pMenu ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void WriteMenuItem( Menu* pMenu, USHORT nItemId );
virtual void WriteMenuSeparator();
MenuBar* m_pMenuBar;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > m_xEmptyList;
::rtl::OUString m_aAttributeType;
};
} // namespace framework
#endif // #ifndef __FRAMEWORK_SERVICES_MENUDOCUMENTHANDLER_HXX_

View File

@@ -1,97 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: popupmenucontrollerfactory.hxx,v $
* $Revision: 1.6 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_SERVICES_POPUPMENUCONTROLLERFACTORY_HXX_
#define __FRAMEWORK_SERVICES_POPUPMENUCONTROLLERFACTORY_HXX_
//_________________________________________________________________________________________________________________
// my own includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_PopupMenuControllerFactory;
class PopupMenuControllerFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XMultiComponentFactory ,
public ::com::sun::star::frame::XUIControllerRegistration ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~PopupMenuControllerFactory();
// XInterface, XTypeProvider, XServiceInfo
DECLARE_XINTERFACE
DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XMultiComponentFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::rtl::OUString& aServiceSpecifier, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames() throw (::com::sun::star::uno::RuntimeException);
// XUIControllerRegistration
virtual sal_Bool SAL_CALL hasController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModelName ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL registerController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModelName, const ::rtl::OUString& aControllerImplementationName ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deregisterController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModelName ) throw (::com::sun::star::uno::RuntimeException);
private:
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
ConfigurationAccess_PopupMenuControllerFactory* m_pConfigAccess;
};
} // namespace framework
#endif // __FRAMEWORK_SERVICES_POPUPMENUCONTROLLERFACTORY_HXX_

View File

@@ -1,119 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: saxnamespacefilter.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_SERVICES_SAXNAMESPACEFILTER_HXX_
#define __FRAMEWORK_SERVICES_SAXNAMESPACEFILTER_HXX_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <threadhelp/threadhelpbase.hxx>
#include <classes/xmlnamespaces.hxx>
#ifndef _RTL_USTRING_
#include <rtl/ustring>
#endif
#include <vcl/menu.hxx>
#include <cppuhelper/weak.hxx>
#include <stack>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace framework
{
class SaxNamespaceFilter : public ::com::sun::star::xml::sax::XDocumentHandler,
public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
SaxNamespaceFilter( ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >& rSax1DocumentHandler );
virtual ~SaxNamespaceFilter();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL startElement(
const rtl::OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &xAttribs)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endElement(const rtl::OUString& aName)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL characters(const rtl::OUString& aChars)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL ignorableWhitespace(const rtl::OUString& aWhitespaces)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL processingInstruction(const rtl::OUString& aTarget,
const rtl::OUString& aData)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDocumentLocator(
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > &xLocator)
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
typedef ::std::stack< XMLNamespaces > NamespaceStack;
::rtl::OUString getErrorLineString();
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler> xDocumentHandler;
NamespaceStack m_aNamespaceStack;
sal_Int32 m_nDepth;
};
}
#endif // __FRAMEWORK_SERVICES_SAXNAMESPACEFILTER_HXX_

View File

@@ -59,7 +59,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
#include <unotools/configitem.hxx>
#include <tools/link.hxx>
@@ -236,11 +236,8 @@ struct ReSubstUserVarOrder
typedef std::list< ReSubstFixedVarOrder > ReSubstFixedVarOrderVector;
typedef std::list< ReSubstUserVarOrder > ReSubstUserVarOrderVector;
class SubstitutePathVariables : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::util::XStringSubstitution,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class SubstitutePathVariables : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo>
{
friend class SubstitutePathVariables_Impl;
@@ -249,8 +246,6 @@ class SubstitutePathVariables : public com::sun::star::lang::XTypeProvider
virtual ~SubstitutePathVariables();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XStringSubstitution

View File

@@ -40,22 +40,16 @@
#include <com/sun/star/util/XStringAbbreviation.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
namespace framework
{
class UriAbbreviation:
public ::com::sun::star::lang::XTypeProvider,
public ::com::sun::star::lang::XServiceInfo,
public ::com::sun::star::util::XStringAbbreviation,
public ::cppu::OWeakObject // helper implements XInterface, XWeak
class UriAbbreviation: public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringAbbreviation, css::lang::XServiceInfo>
{
public:
explicit UriAbbreviation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// ::com::sun::star::util::XStringAbbreviation:

View File

@@ -54,7 +54,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
//_________________________________________________________________________________________________________________
// namespace
@@ -84,11 +84,7 @@ namespace framework{
OWeakObject
*//*-*************************************************************************************************************/
class URLTransformer : public css::lang::XTypeProvider ,
public css::lang::XServiceInfo ,
public css::util::XURLTransformer ,
public ThreadHelpBase ,
public ::cppu::OWeakObject
class URLTransformer : public ::cppu::WeakImplHelper2< ::com::sun::star::util::XURLTransformer, css::lang::XServiceInfo>
{
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -132,8 +128,6 @@ class URLTransformer : public css::lang::XTypeProvider ,
// XInterface, XTypeProvider, XServiceInfo
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
//---------------------------------------------------------------------------------------------------------

View File

@@ -56,26 +56,21 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class TabWinFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XSingleComponentFactory ,
protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class TabWinFactory : protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleComponentFactory, com::sun::star::lang::XServiceInfo>
{
public:
TabWinFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~TabWinFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
DECLARE_XSERVICEINFO
FWK_DECLARE_XTYPEPROVIDER
// XSingleComponentFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);

View File

@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -68,7 +69,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <rtl/ustring.hxx>
@@ -80,16 +81,12 @@
namespace framework
{
class ImageManager : public com::sun::star::lang::XTypeProvider ,
public css::lang::XServiceInfo ,
public ::com::sun::star::ui::XImageManager ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ImageManagerImpl;
class ImageManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< ::com::sun::star::ui::XImageManager, css::lang::XServiceInfo>
{
public:
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
ImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
@@ -127,54 +124,7 @@ namespace framework
void setStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException);
private:
typedef std::hash_map< rtl::OUString,
sal_Bool,
OUStringHashCode,
::std::equal_to< ::rtl::OUString > > ImageNameMap;
// private data types
enum Layer
{
LAYER_DEFAULT,
LAYER_USERDEFINED,
LAYER_COUNT
};
enum NotifyOp
{
NotifyOp_Remove,
NotifyOp_Insert,
NotifyOp_Replace
};
typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
// private methods
void implts_initialize();
void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
ImageList* implts_getUserImageList( ImageType nImageType );
sal_Bool implts_loadUserImages( ImageType nImageType,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
sal_Bool implts_storeUserImages( ImageType nImageType,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserImageStorage;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserBitmapsStorage;
bool m_bReadOnly;
bool m_bInitialized;
bool m_bModified;
bool m_bConfigRead;
bool m_bDisposed;
rtl::OUString m_aXMLPostfix;
rtl::OUString m_aModuleIdentifier;
rtl::OUString m_aResourceString;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
ImageList* m_pUserImageList[ImageType_COUNT];
bool m_bUserImageListModified[ImageType_COUNT];
::std::auto_ptr<ImageManagerImpl> m_pImpl;
};
}

View File

@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -68,7 +69,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <rtl/ustring.hxx>
@@ -80,64 +81,12 @@
namespace framework
{
class CmdImageList
class ImageManagerImpl;
class ModuleImageManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XImageManager>
{
public:
CmdImageList( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
const ::rtl::OUString& aModuleIdentifier );
virtual ~CmdImageList();
virtual Image getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
virtual bool hasImage( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
virtual ::std::vector< rtl::OUString >& getImageNames();
virtual ::std::vector< rtl::OUString >& getImageCommandNames();
protected:
void impl_fillCommandToImageNameMap();
ImageList* impl_getImageList( sal_Int16 nImageType );
std::vector< ::rtl::OUString >& impl_getImageNameVector();
std::vector< ::rtl::OUString >& impl_getImageCommandNameVector();
private:
sal_Bool m_bVectorInit;
rtl::OUString m_aModuleIdentifier;
ImageList* m_pImageList[ImageType_COUNT];
CommandToImageNameMap m_aCommandToImageNameMap;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::std::vector< rtl::OUString > m_aImageNameVector;
::std::vector< rtl::OUString > m_aImageCommandNameVector;
sal_Int16 m_nSymbolsStyle;
};
class GlobalImageList : public CmdImageList, public rtl::IReference
{
public:
GlobalImageList( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
virtual ~GlobalImageList();
virtual Image getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
virtual bool hasImage( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
virtual ::std::vector< rtl::OUString >& getImageNames();
virtual ::std::vector< rtl::OUString >& getImageCommandNames();
// <20>Reference
virtual oslInterlockedCount SAL_CALL acquire();
virtual oslInterlockedCount SAL_CALL release();
private:
oslInterlockedCount m_nRefCount;
};
class ModuleImageManager : public com::sun::star::lang::XTypeProvider ,
public ::com::sun::star::ui::XImageManager ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
ModuleImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
virtual ~ModuleImageManager();
@@ -170,59 +119,7 @@ namespace framework
virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
private:
typedef std::hash_map< rtl::OUString,
sal_Bool,
OUStringHashCode,
::std::equal_to< ::rtl::OUString > > ImageNameMap;
// private data types
enum Layer
{
LAYER_DEFAULT,
LAYER_USERDEFINED,
LAYER_COUNT
};
enum NotifyOp
{
NotifyOp_Remove,
NotifyOp_Insert,
NotifyOp_Replace
};
typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
// private methods
void implts_initialize();
void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
const rtl::Reference< GlobalImageList >& implts_getGlobalImageList();
CmdImageList* implts_getDefaultImageList();
ImageList* implts_getUserImageList( ImageType nImageType );
sal_Bool implts_loadUserImages( ImageType nImageType,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
sal_Bool implts_storeUserImages( ImageType nImageType,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserImageStorage;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserBitmapsStorage;
bool m_bReadOnly;
bool m_bInitialized;
bool m_bModified;
bool m_bConfigRead;
bool m_bDisposed;
rtl::OUString m_aXMLPostfix;
rtl::OUString m_aModuleIdentifier;
rtl::OUString m_aResourceString;
com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
rtl::Reference< GlobalImageList > m_pGlobalImageList;
CmdImageList* m_pDefaultImageList;
ImageList* m_pUserImageList[ImageType_COUNT];
bool m_bUserImageListModified[ImageType_COUNT];
::std::auto_ptr<ImageManagerImpl> m_pImpl;
};
}

View File

@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -77,6 +78,7 @@
namespace framework
{
class UIConfigurationManagerImpl;
class ModuleUIConfigurationManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XComponent ,
@@ -85,7 +87,6 @@ namespace framework
public ::com::sun::star::ui::XUIConfigurationManager ,
public ::com::sun::star::ui::XModuleUIConfigurationManager ,
public ::com::sun::star::ui::XUIConfigurationPersistence ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
@@ -134,94 +135,7 @@ namespace framework
virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
private:
// private data types
enum Layer
{
LAYER_DEFAULT,
LAYER_USERDEFINED,
LAYER_COUNT
};
enum NotifyOp
{
NotifyOp_Remove,
NotifyOp_Insert,
NotifyOp_Replace
};
struct UIElementInfo
{
UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) :
aResourceURL( rResourceURL), aUIName( rUIName ) {}
rtl::OUString aResourceURL;
rtl::OUString aUIName;
};
struct UIElementData
{
UIElementData() : bModified( false ), bDefault( true ), bDefaultNode( true ) {};
rtl::OUString aResourceURL;
rtl::OUString aName;
bool bModified; // has been changed since last storing
bool bDefault; // default settings
bool bDefaultNode; // this is a default layer element data
com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings;
};
struct UIElementType;
friend struct UIElementType;
typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap;
struct UIElementType
{
UIElementType() : bModified( false ),
bLoaded( false ),
bDefaultLayer( false ),
nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {}
bool bModified;
bool bLoaded;
bool bDefaultLayer;
sal_Int16 nElementType;
UIElementDataHashMap aElementsHashMap;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
};
typedef ::std::vector< UIElementType > UIElementTypesVector;
typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap;
// private methods
void impl_Initialize();
void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType );
void impl_preloadUIElementTypeList( Layer eLayer, sal_Int16 nElementType );
UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true );
void impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData );
void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage, UIElementType& rElementType, bool bResetModifyState = true );
void impl_resetElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
void impl_reloadElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
UIElementTypesVector m_aUIElements[LAYER_COUNT];
PresetHandler* m_pStorageHandler[::com::sun::star::ui::UIElementType::COUNT];
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDefaultConfigStorage;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage;
bool m_bReadOnly;
bool m_bInitialized;
bool m_bModified;
bool m_bConfigRead;
bool m_bDisposed;
rtl::OUString m_aXMLPostfix;
rtl::OUString m_aPropUIName;
rtl::OUString m_aPropResourceURL;
rtl::OUString m_aModuleIdentifier;
rtl::OUString m_aModuleShortName;
com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xModuleImageManager;
::std::auto_ptr<UIConfigurationManagerImpl> m_pImpl;
};
}

View File

@@ -43,9 +43,8 @@
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <uielement/uicommanddescription.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -59,61 +58,18 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_UICategory;
class UICategoryDescription : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::container::XNameAccess ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class UICategoryDescription : public UICommandDescription
{
public:
UICategoryDescription( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~UICategoryDescription();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XNameAccess
virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
throw (::com::sun::star::uno::RuntimeException);
// XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasElements()
throw (::com::sun::star::uno::RuntimeException);
typedef ::std::hash_map< ::rtl::OUString,
::rtl::OUString,
OUStringHashCode,
::std::equal_to< ::rtl::OUString > > ModuleToCategoryFileMap;
typedef ::std::hash_map< ::rtl::OUString,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >,
OUStringHashCode,
::std::equal_to< ::rtl::OUString > > CategoryHashMap;
private:
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
ModuleToCategoryFileMap m_aModuleToCategoryFileMap;
CategoryHashMap m_aCategoryHashMap;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xGenericCategories;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > impl_createConfigAccess(const ::rtl::OUString& _sName);
};
} // namespace framework

View File

@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -77,6 +78,7 @@
namespace framework
{
class UIConfigurationManagerImpl;
class UIConfigurationManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XComponent ,
@@ -84,7 +86,6 @@ namespace framework
public ::com::sun::star::ui::XUIConfigurationManager ,
public ::com::sun::star::ui::XUIConfigurationPersistence ,
public ::com::sun::star::ui::XUIConfigurationStorage ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
@@ -130,83 +131,7 @@ namespace framework
virtual sal_Bool SAL_CALL hasStorage() throw (::com::sun::star::uno::RuntimeException);
private:
// private data types
enum NotifyOp
{
NotifyOp_Remove,
NotifyOp_Insert,
NotifyOp_Replace
};
struct UIElementInfo
{
UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) :
aResourceURL( rResourceURL), aUIName( rUIName ) {}
rtl::OUString aResourceURL;
rtl::OUString aUIName;
};
struct UIElementData
{
UIElementData() : bModified( false ), bDefault( true ) {};
rtl::OUString aResourceURL;
rtl::OUString aName;
bool bModified; // has been changed since last storing
bool bDefault; // default settings
com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings;
};
struct UIElementType;
friend struct UIElementType;
typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap;
struct UIElementType
{
UIElementType() : bModified( false ),
bLoaded( false ),
bDefaultLayer( false ),
nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {}
bool bModified;
bool bLoaded;
bool bDefaultLayer;
sal_Int16 nElementType;
UIElementDataHashMap aElementsHashMap;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
};
typedef ::std::vector< UIElementType > UIElementTypesVector;
typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap;
// private methods
void impl_Initialize();
void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType );
void impl_preloadUIElementTypeList( sal_Int16 nElementType );
UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true );
void impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData );
void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState = true );
void impl_resetElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer );
void impl_reloadElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
UIElementTypesVector m_aUIElements;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDocConfigStorage;
bool m_bReadOnly;
bool m_bInitialized;
bool m_bModified;
bool m_bConfigRead;
bool m_bDisposed;
rtl::OUString m_aXMLPostfix;
rtl::OUString m_aPropUIName;
rtl::OUString m_aPropResourceURL;
rtl::OUString m_aModuleIdentifier;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xImageManager;
com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xAccConfig;
::std::auto_ptr<UIConfigurationManagerImpl> m_pImpl;
};
}

View File

@@ -59,7 +59,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
namespace framework
@@ -83,11 +83,8 @@ namespace framework
#define WINDOWSTATE_PROPERTY_CONTEXTACTIVE "ContextActive"
class ConfigurationAccess_Windows;
class WindowStateConfiguration : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::container::XNameAccess ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class WindowStateConfiguration : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameAccess, css::lang::XServiceInfo>
{
public:
WindowStateConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );

View File

@@ -77,9 +77,6 @@ class ComboboxToolbarController : public IComboBoxListener,
// XComponent
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
// XToolbarController
virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
// IComboBoxListener
virtual void Select();
virtual void DoubleClick();
@@ -91,6 +88,7 @@ class ComboboxToolbarController : public IComboBoxListener,
protected:
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const;
private:
ComboBoxControl* m_pComboBox;

View File

@@ -95,6 +95,7 @@ class ComplexToolbarController : public svt::ToolboxController
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rInfo );
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ) = 0;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const;
const ::com::sun::star::util::URL& getInitializedURL();
void notifyFocusGet();
void notifyFocusLost();

View File

@@ -72,7 +72,6 @@ namespace framework
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
// XInitialization
@@ -82,15 +81,15 @@ namespace framework
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
virtual void impl_setPopupMenu();
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
class UrlToDispatchMap : public ::std::hash_map< ::rtl::OUString,
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >,
OUStringHashCode,

View File

@@ -75,9 +75,6 @@ class DropdownToolbarController : public IListBoxListener,
// XComponent
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
// XToolbarController
virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
// IComboBoxListener
virtual void Select();
virtual void DoubleClick();
@@ -87,6 +84,7 @@ class DropdownToolbarController : public IListBoxListener,
protected:
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const;
private:
ListBoxControl* m_pListBoxControl;

View File

@@ -75,9 +75,6 @@ class EditToolbarController : public IEditListener,
// XComponent
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
// XToolbarController
virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
// IEditListener
virtual void Modify();
virtual void KeyInput( const KeyEvent& rKEvt );
@@ -87,6 +84,7 @@ class EditToolbarController : public IEditListener,
protected:
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const;
private:
EditControl* m_pEditControl;

View File

@@ -69,25 +69,20 @@ namespace framework
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
virtual void impl_setPopupMenu();
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
void fillPopupMenu( const com::sun::star::uno::Sequence< ::rtl::OUString >& rFontNameSeq, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
rtl::OUString m_aFontFamilyName;

View File

@@ -70,25 +70,17 @@ namespace framework
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
virtual void impl_setPopupMenu();
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
void setCurHeight( long nHeight, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
rtl::OUString retrievePrinterName( com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame );

View File

@@ -34,65 +34,26 @@
//_________________________________________________________________________________________________________________
// my own includes
//_________________________________________________________________________________________________________________
#include <helper/popupmenucontrollerbase.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/frame/status/Verb.hpp>
#include <com/sun/star/frame/XModel.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
#include <uielement/headermenucontroller.hxx>
namespace framework
{
class FooterMenuController : public PopupMenuControllerBase
class FooterMenuController : public HeaderMenuController
{
public:
FooterMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~FooterMenuController();
// XServiceInfo
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
void fillPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
virtual ::rtl::OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService ( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames ( ) throw( css::uno::RuntimeException );
/* Helper for XServiceInfo */
static css::uno::Sequence< ::rtl::OUString > SAL_CALL impl_getStaticSupportedServiceNames( );
static ::rtl::OUString SAL_CALL impl_getStaticImplementationName ( );
/* Helper for registry */
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception );
static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager );
};
}

View File

@@ -64,35 +64,27 @@ namespace framework
class HeaderMenuController : public PopupMenuControllerBase
{
public:
HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter = sal_False );
virtual ~HeaderMenuController();
// XServiceInfo
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
void fillPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
bool m_bFooter;
};
}

View File

@@ -61,9 +61,6 @@ class ImageButtonToolbarController : public ComplexToolbarController
// XComponent
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
// XToolbarController
virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
protected:
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand );

View File

@@ -52,7 +52,7 @@
// other includes
//_________________________________________________________________________________________________________________
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <vector>
@@ -60,10 +60,7 @@ namespace framework
{
class ConstItemContainer;
class ItemContainer : public ::com::sun::star::lang::XTypeProvider ,
public ::com::sun::star::container::XIndexContainer ,
public ::com::sun::star::lang::XUnoTunnel ,
public ::cppu::OWeakObject
class ItemContainer : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XIndexContainer>
{
friend class ConstItemContainer;
@@ -76,9 +73,6 @@ class ItemContainer : public ::com::sun::star::lang::XTypeProvider ,
//---------------------------------------------------------------------------------------------------------
// XInterface, XTypeProvider
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
// XUnoTunnel
static const ::com::sun::star::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
static ItemContainer* GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw();

View File

@@ -72,7 +72,6 @@ namespace framework
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
// XInitialization
@@ -81,16 +80,12 @@ namespace framework
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
virtual void impl_setPopupMenu();
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
enum Mode
{
MODE_SetLanguageSelectionMenu,

View File

@@ -88,6 +88,7 @@ class LangSelectionStatusbarController : public svt::StatusbarController
LangSelectionStatusbarController(LangSelectionStatusbarController &); // not defined
void operator =(LangSelectionStatusbarController &); // not defined
sal_Bool m_bShowMenu;
sal_Int16 m_nScriptType;
::rtl::OUString m_aCurrentLanguage;

View File

@@ -71,25 +71,14 @@ namespace framework
// XServiceInfo
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
String RetrieveLabelFromCommand( const String& aCmdURL );
void addScriptItems( PopupMenu* pPopupMenu, USHORT startItemId );

View File

@@ -103,6 +103,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
MenuBarManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
const ::com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& _xURLTransformer,
AddonMenu* pAddonMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
@@ -111,6 +112,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
MenuBarManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
const ::com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& _xURLTransformer,
AddonPopupMenu* pAddonMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
@@ -120,6 +122,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
MenuBarManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& _xURLTransformer,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
const rtl::OUString& aModuleIdentifier,
Menu* pMenu,
@@ -192,11 +195,12 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
void RequestImages();
void RetrieveImageManagers();
static sal_Bool MustBeHidden( PopupMenu* pPopupMenu, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& rTransformer );
String RetrieveLabelFromCommand( const String& aCmdURL );
private:
String RetrieveLabelFromCommand( const String& aCmdURL );
void UpdateSpecialFileMenu( Menu* pMenu );
void UpdateSpecialWindowMenu( Menu* pMenu );
void Destroy();
struct MenuItemHandler
@@ -235,6 +239,10 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
MenuItemHandler* GetMenuItemHandler( USHORT nItemId );
sal_Bool CreatePopupMenuController( MenuItemHandler* pMenuItemHandler );
void AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,USHORT _nItemId);
USHORT FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const;
void Init(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,AddonMenu* pAddonMenu,sal_Bool bDelete,sal_Bool bDeleteChildren,bool _bHandlePopUp = false);
void SetHdl();
sal_Bool m_bDisposed : 1,
m_bInitialized : 1,
@@ -244,9 +252,9 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
m_bIsBookmarkMenu : 1,
m_bWasHiContrast : 1,
m_bShowMenuImages : 1;
sal_Bool m_bModuleIdentified : 1,
m_bRetrieveImages : 1,
sal_Bool m_bRetrieveImages : 1,
m_bAcceleratorCfg : 1;
sal_Bool m_bModuleIdentified;
::rtl::OUString m_aMenuItemCommand;
::rtl::OUString m_aModuleIdentifier;
Menu* m_pVCLMenu;
@@ -262,6 +270,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory;
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xDeferedItemContainer;
sal_Int16 m_nSymbolsStyle;
Timer m_aAsyncSettingsTimer;

View File

@@ -74,9 +74,6 @@ class MenuBarWrapper : public UIConfigElementWrapperBase,
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getServiceFactory();
MenuBarManager* GetMenuBarManager() const { return static_cast< MenuBarManager* >( m_xMenuBarManager.get() ); }
void InvalidatePopupControllerCache() { m_bRefreshPopupControllerCache = sal_True; }
@@ -91,8 +88,6 @@ class MenuBarWrapper : public UIConfigElementWrapperBase,
// XUIElementSettings
virtual void SAL_CALL updateSettings( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException);
// XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException);
@@ -104,11 +99,11 @@ class MenuBarWrapper : public UIConfigElementWrapperBase,
virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
private:
virtual void impl_fillNewData();
void fillPopupControllerCache();
sal_Bool m_bRefreshPopupControllerCache : 1;
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xMenuBarManager;
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& mxServiceFactory;
PopupControllerCache m_aPopupControllerCache;
};

View File

@@ -51,7 +51,6 @@
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
//_________________________________________________________________________________________________________________
@@ -84,10 +83,6 @@ namespace framework
// XServiceInfo
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
@@ -95,10 +90,8 @@ namespace framework
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
@@ -106,6 +99,7 @@ namespace framework
DECL_STATIC_LINK( NewMenuController, ExecuteHdl_Impl, NewDocument* );
private:
virtual void impl_setPopupMenu();
struct AddInfo
{
rtl::OUString aTargetFrame;
@@ -133,7 +127,6 @@ namespace framework
rtl::OUString m_aTargetFrame;
rtl::OUString m_aModuleIdentifier;
rtl::OUString m_aEmptyDocURL;
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xDocAcceleratorManager;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager;

View File

@@ -69,26 +69,15 @@ namespace framework
// XServiceInfo
DECLARE_XSERVICEINFO
// XPopupMenuController
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
private:
void fillPopupMenu( const com::sun::star::uno::Sequence< com::sun::star::embed::VerbDescriptor >& rVerbCommandSeq, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > m_xObjectUpdateDispatch;
};

View File

@@ -79,23 +79,16 @@ namespace framework
// XPopupMenuController
virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XDispatchProvider
virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException );
// XDispatch
virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException );
@@ -108,6 +101,7 @@ namespace framework
DECL_STATIC_LINK( RecentFilesMenuController, ExecuteHdl_Impl, LoadRecentFile* );
private:
virtual void impl_setPopupMenu();
struct RecentFile
{
rtl::OUString aURL;

View File

@@ -81,9 +81,6 @@ class SpinfieldToolbarController : public ISpinfieldListener,
// XComponent
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
// XToolbarController
virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
// ISpinfieldListener
virtual void Up();
virtual void Down();
@@ -99,6 +96,7 @@ class SpinfieldToolbarController : public ISpinfieldListener,
protected:
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const;
private:
bool impl_getValue( const ::com::sun::star::uno::Any& rAny, sal_Int32& nValue, double& fValue, bool& bFloat );

View File

@@ -46,6 +46,7 @@
//_________________________________________________________________________________________________________________
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XStatusbarController.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
@@ -120,14 +121,15 @@ class StatusBarManager : public ::com::sun::star::frame::XFrameActionListener
void CreateControllers();
void UpdateControllers();
void AddFrameActionListener();
void MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL ::com::sun::star::frame::XStatusbarController::*_pMethod )(const ::com::sun::star::awt::MouseEvent&));
protected:
typedef std::vector< ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > StatusBarControllerVector;
sal_Bool m_bDisposed : 1,
m_bModuleIdentified : 1,
m_bFrameActionRegistered : 1,
m_bUpdateControllers : 1;
sal_Bool m_bModuleIdentified;
StatusBar* m_pStatusBar;
rtl::OUString m_aModuleIdentifier;
rtl::OUString m_aResourceName;

View File

@@ -70,12 +70,9 @@ class StatusBarWrapper : public UIConfigElementWrapperBase
// XUIElementSettings
virtual void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException);
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xStatusBarManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
};
} // namespace framework

View File

@@ -51,27 +51,19 @@
// other includes
//_________________________________________________________________________________________________________________
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <vector>
namespace framework
{
class StatusIndicatorInterfaceWrapper : public ::com::sun::star::lang::XTypeProvider ,
public ::com::sun::star::task::XStatusIndicator ,
public ::cppu::OWeakObject
class StatusIndicatorInterfaceWrapper : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XStatusIndicator>
{
public:
StatusIndicatorInterfaceWrapper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rStatusIndicatorImpl );
virtual ~StatusIndicatorInterfaceWrapper();
//---------------------------------------------------------------------------------------------------------
// XInterface, XTypeProvider
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
//---------------------------------------------------------------------------------------------------------
// XStatusIndicator
//---------------------------------------------------------------------------------------------------------

View File

@@ -70,11 +70,11 @@ class ToggleButtonToolbarController : public ComplexToolbarController
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
// XToolbarController
virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
protected:
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const;
private:
DECL_LINK( MenuSelectHdl, Menu *);

View File

@@ -56,7 +56,9 @@
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XSubToolbarController.hpp>
#include <com/sun/star/frame/XToolbarController.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
//_________________________________________________________________________________________________________________
// other includes
@@ -189,6 +191,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModelFromFrame() const;
sal_Bool IsPluginMode() const;
Image QueryAddonsImage( const ::rtl::OUString& aCommandURL, bool bBigImages, bool bHiContrast );
long HandleClick(void ( SAL_CALL ::com::sun::star::frame::XToolbarController::*_pClick )( ));
void setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter);
void impl_elementChanged(bool _bRemove,const ::com::sun::star::ui::ConfigurationEvent& Event );
protected:
typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerMap;
@@ -210,6 +215,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
ToolBar* m_pToolBar;
rtl::OUString m_aModuleIdentifier;
rtl::OUString m_aResourceName;
com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > m_xFrame;
com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > m_xUICommandLabels;
ToolBarControllerMap m_aControllerMap;

View File

@@ -52,7 +52,6 @@
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
//_________________________________________________________________________________________________________________
@@ -86,10 +85,8 @@ namespace framework
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
// XMenuListener
virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
@@ -112,7 +109,6 @@ namespace framework
sal_Bool isContextSensitiveToolbarNonVisible();
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState;
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUICommandDescription;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr;

View File

@@ -79,13 +79,6 @@ class ToolBarWrapper : public ::com::sun::star::ui::XUIFunctionListener,
// XUIElementSettings
virtual void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException);
// XUIConfigurationListener
virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
// XUIFunctionListener
virtual void SAL_CALL functionExecute( const ::rtl::OUString& aUIElementName, const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException);
@@ -99,9 +92,9 @@ class ToolBarWrapper : public ::com::sun::star::ui::XUIFunctionListener,
//-------------------------------------------------------------------------------------------------------------
protected:
virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception );
virtual void impl_fillNewData();
private:
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xToolBarManager;
com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xToolBarWindow;
};

View File

@@ -59,28 +59,22 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_UICommand;
class UICommandDescription : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::container::XNameAccess ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class UICommandDescription : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo ,
com::sun::star::container::XNameAccess >
{
public:
UICommandDescription( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~UICommandDescription();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
private:
// XNameAccess
virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
@@ -97,6 +91,7 @@ class UICommandDescription : public com::sun::star::lang::XTypeProvider ,
virtual sal_Bool SAL_CALL hasElements()
throw (::com::sun::star::uno::RuntimeException);
public:
typedef ::std::hash_map< ::rtl::OUString,
::rtl::OUString,
OUStringHashCode,
@@ -107,7 +102,10 @@ class UICommandDescription : public com::sun::star::lang::XTypeProvider ,
OUStringHashCode,
::std::equal_to< ::rtl::OUString > > UICommandsHashMap;
private:
protected:
UICommandDescription( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > impl_createConfigAccess(const ::rtl::OUString& _sName);
void impl_fillElements(const sal_Char* _pName);
sal_Bool m_bConfigRead;
rtl::OUString m_aPrivateResourceURL;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;

View File

@@ -58,26 +58,22 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class AddonsToolBoxFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public ::com::sun::star::ui::XUIElementFactory ,
protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class AddonsToolBoxFactory : protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo ,
com::sun::star::ui::XUIElementFactory >
{
public:
AddonsToolBoxFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~AddonsToolBoxFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
DECLARE_XSERVICEINFO
FWK_DECLARE_XTYPEPROVIDER
// XUIElementFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& ResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Args ) throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );

View File

@@ -0,0 +1,127 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: toolbarcontrollerfactory.hxx,v $
* $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_UIFACTORY_FACTORYCONFIGURATION_HXX_
#define __FRAMEWORK_UIFACTORY_FACTORYCONFIGURATION_HXX_
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/implbase1.hxx>
#include <rtl/ustring.hxx>
//_________________________________________________________________________________________________________________
// Namespace
//_________________________________________________________________________________________________________________
//
namespace framework
{
//*****************************************************************************************************************
// Configuration access class for PopupMenuControllerFactory implementation
//*****************************************************************************************************************
class ConfigurationAccess_ControllerFactory : // interfaces
private ThreadHelpBase,
public ::cppu::WeakImplHelper1< ::com::sun::star::container::XContainerListener>
{
public:
ConfigurationAccess_ControllerFactory( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,const ::rtl::OUString& _sRoot,bool _bAskValue = false );
virtual ~ConfigurationAccess_ControllerFactory();
void readConfigurationData();
void updateConfigurationData();
rtl::OUString getServiceFromCommandModule( const rtl::OUString& rCommandURL, const rtl::OUString& rModule ) const;
rtl::OUString getValueFromCommandModule( const rtl::OUString& rCommandURL, const rtl::OUString& rModule ) const;
void addServiceToCommandModule( const rtl::OUString& rCommandURL, const rtl::OUString& rModule, const rtl::OUString& rServiceSpecifier );
void removeServiceFromCommandModule( const rtl::OUString& rCommandURL, const rtl::OUString& rModule );
inline bool hasValue() const { return m_bAskValue; }
// container.XContainerListener
virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
// lang.XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
private:
struct ControllerInfo
{
rtl::OUString m_aImplementationName;
rtl::OUString m_aValue;
ControllerInfo(const ::rtl::OUString& _aImplementationName,const ::rtl::OUString& _aValue) : m_aImplementationName(_aImplementationName),m_aValue(_aValue){}
ControllerInfo(){}
};
class MenuControllerMap : public std::hash_map< rtl::OUString,
ControllerInfo,
OUStringHashCode,
::std::equal_to< ::rtl::OUString > >
{
inline void free()
{
MenuControllerMap().swap( *this );
}
};
sal_Bool impl_getElementProps( const ::com::sun::star::uno::Any& aElement, rtl::OUString& aCommand, rtl::OUString& aModule, rtl::OUString& aServiceSpecifier,rtl::OUString& aValue ) const;
rtl::OUString m_aPropCommand;
rtl::OUString m_aPropModule;
rtl::OUString m_aPropController;
rtl::OUString m_aPropValue;
rtl::OUString m_sRoot;
MenuControllerMap m_aMenuControllerMap;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xConfigProvider;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xConfigAccess;
sal_Bool m_bConfigAccessInitialized;
bool m_bAskValue;
};
} // namespace framework
#endif // __FRAMEWORK_UIFACTORY_FACTORYCONFIGURATION_HXX_

View File

@@ -56,30 +56,36 @@
// includes of other projects
//_________________________________________________________________________________________________________________
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class MenuBarFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public ::com::sun::star::ui::XUIElementFactory ,
protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class MenuBarFactory : protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo,
::com::sun::star::ui::XUIElementFactory>
{
public:
MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~MenuBarFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
DECLARE_XSERVICEINFO
FWK_DECLARE_XTYPEPROVIDER
// XUIElementFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& ResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Args ) throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
private:
static void CreateUIElement(const ::rtl::OUString& ResourceURL
, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Args
,const char* _pExtraMode
,const char* _pAsciiName
,const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& _xMenuBar
,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager >& _xModuleManager
,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceManager);
protected:
MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool );
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
};

View File

@@ -40,61 +40,29 @@
//_________________________________________________________________________________________________________________
// my own includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
#include <uifactory/toolbarcontrollerfactory.hxx>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_PopupMenuControllerFactory;
class PopupMenuControllerFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XMultiComponentFactory ,
public ::com::sun::star::frame::XUIControllerRegistration ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ConfigurationAccess_ControllerFactory;
class PopupMenuControllerFactory : public ToolbarControllerFactory
{
public:
PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~PopupMenuControllerFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XMultiComponentFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::rtl::OUString& aServiceSpecifier, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames() throw (::com::sun::star::uno::RuntimeException);
// XUIControllerRegistration
virtual sal_Bool SAL_CALL hasController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL registerController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName, const ::rtl::OUString& aControllerImplementationName ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deregisterController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
private:
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
ConfigurationAccess_PopupMenuControllerFactory* m_pConfigAccess;
};
} // namespace framework

View File

@@ -34,62 +34,30 @@
//_________________________________________________________________________________________________________________
// my own includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <uifactory/toolbarcontrollerfactory.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_StatusbarControllerFactory;
class StatusbarControllerFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XMultiComponentFactory ,
public ::com::sun::star::frame::XUIControllerRegistration ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ConfigurationAccess_ControllerFactory;
class StatusbarControllerFactory : public ToolbarControllerFactory
{
public:
StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~StatusbarControllerFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XMultiComponentFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::rtl::OUString& aServiceSpecifier, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames() throw (::com::sun::star::uno::RuntimeException);
// XUIControllerRegistration
virtual sal_Bool SAL_CALL hasController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL registerController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName, const ::rtl::OUString& aControllerImplementationName ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deregisterController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
private:
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
ConfigurationAccess_StatusbarControllerFactory* m_pConfigAccess;
};
} // namespace framework

View File

@@ -36,53 +36,33 @@
//_________________________________________________________________________________________________________________
#include <stdtypes.h>
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <services.h>
#include <uifactory/menubarfactory.hxx>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class StatusBarFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public ::com::sun::star::ui::XUIElementFactory ,
protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class StatusBarFactory : public MenuBarFactory
{
public:
StatusBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~StatusBarFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
DECLARE_XSERVICEINFO
FWK_DECLARE_XTYPEPROVIDER
// XUIElementFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& ResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Args ) throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
};
}

View File

@@ -53,27 +53,23 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_ToolbarControllerFactory;
class ToolbarControllerFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XMultiComponentFactory ,
public ::com::sun::star::frame::XUIControllerRegistration ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ConfigurationAccess_ControllerFactory;
class ToolbarControllerFactory : protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo,
com::sun::star::lang::XMultiComponentFactory,
com::sun::star::frame::XUIControllerRegistration>
{
public:
ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ToolbarControllerFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XMultiComponentFactory
@@ -86,10 +82,11 @@ class ToolbarControllerFactory : public com::sun::star::lang::XTypeProvider
virtual void SAL_CALL registerController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName, const ::rtl::OUString& aControllerImplementationName ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deregisterController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
private:
protected:
ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool );
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
ConfigurationAccess_ToolbarControllerFactory* m_pConfigAccess;
ConfigurationAccess_ControllerFactory* m_pConfigAccess;
};
} // namespace framework

View File

@@ -36,23 +36,13 @@
//_________________________________________________________________________________________________________________
#include <stdtypes.h>
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <services.h>
#include <uifactory/menubarfactory.hxx>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
@@ -62,27 +52,16 @@
namespace framework
{
class ToolBoxFactory : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public ::com::sun::star::ui::XUIElementFactory ,
protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ToolBoxFactory : public MenuBarFactory
{
public:
ToolBoxFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ToolBoxFactory();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
DECLARE_XSERVICEINFO
FWK_DECLARE_XTYPEPROVIDER
// XUIElementFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& ResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Args ) throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
};
}

View File

@@ -51,35 +51,85 @@
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <com/sun/star/ui/XUIElementFactoryRegistration.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include "com/sun/star/frame/XModuleManager.hpp"
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase3.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_UIElementFactoryManager;
class UIElementFactoryManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public ::com::sun::star::ui::XUIElementFactory ,
public ::com::sun::star::ui::XUIElementFactoryRegistration ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ConfigurationAccess_FactoryManager : // interfaces
// baseclasses
// Order is neccessary for right initialization!
private ThreadHelpBase ,
public ::cppu::WeakImplHelper1< ::com::sun::star::container::XContainerListener>
{
public:
ConfigurationAccess_FactoryManager( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,const ::rtl::OUString& _sRoot );
virtual ~ConfigurationAccess_FactoryManager();
void readConfigurationData();
rtl::OUString getFactorySpecifierFromTypeNameModule( const rtl::OUString& rType, const rtl::OUString& rName, const rtl::OUString& rModule ) const;
void addFactorySpecifierToTypeNameModule( const rtl::OUString& rType, const rtl::OUString& rName, const rtl::OUString& rModule, const rtl::OUString& aServiceSpecifier );
void removeFactorySpecifierFromTypeNameModule( const rtl::OUString& rType, const rtl::OUString& rName, const rtl::OUString& rModule );
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > getFactoriesDescription() const;
// container.XContainerListener
virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
// lang.XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
private:
class FactoryManagerMap : public std::hash_map< rtl::OUString,
rtl::OUString,
OUStringHashCode,
::std::equal_to< ::rtl::OUString > >
{
inline void free()
{
FactoryManagerMap().swap( *this );
}
};
sal_Bool impl_getElementProps( const ::com::sun::star::uno::Any& rElement, rtl::OUString& rType, rtl::OUString& rName, rtl::OUString& rModule, rtl::OUString& rServiceSpecifier ) const;
rtl::OUString m_aPropType;
rtl::OUString m_aPropName;
rtl::OUString m_aPropModule;
rtl::OUString m_aPropFactory;
::rtl::OUString m_sRoot;
FactoryManagerMap m_aFactoryManagerMap;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xConfigProvider;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xConfigAccess;
sal_Bool m_bConfigAccessInitialized;
bool m_bConfigDirty;
};
class UIElementFactoryManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper3< ::com::sun::star::lang::XServiceInfo,
::com::sun::star::ui::XUIElementFactory,
::com::sun::star::ui::XUIElementFactoryRegistration>
{
public:
UIElementFactoryManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~UIElementFactoryManager();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XUIElementFactory
@@ -92,12 +142,11 @@ class UIElementFactoryManager : public com::sun::star::lang::XTypeProvider
virtual void SAL_CALL deregisterFactory( const ::rtl::OUString& aType, const ::rtl::OUString& aName, const ::rtl::OUString& aModuleIdentifier ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
private:
void RetrieveTypeNameFromResourceURL( const ::rtl::OUString& aResourceURL, rtl::OUString& aType, rtl::OUString& aName );
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
ConfigurationAccess_UIElementFactoryManager* m_pConfigAccess;
ConfigurationAccess_FactoryManager* m_pConfigAccess;
};
} // namespace framework

View File

@@ -51,46 +51,41 @@
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include "com/sun/star/frame/XModuleManager.hpp"
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
class ConfigurationAccess_WindowContentFactoryManager;
class WindowContentFactoryManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XSingleComponentFactory ,
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ConfigurationAccess_FactoryManager;
class WindowContentFactoryManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo ,
com::sun::star::lang::XSingleComponentFactory>
{
public:
WindowContentFactoryManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~WindowContentFactoryManager();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XSingleComponentFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
static void RetrieveTypeNameFromResourceURL( const ::rtl::OUString& aResourceURL, rtl::OUString& aType, rtl::OUString& aName );
private:
void RetrieveTypeNameFromResourceURL( const ::rtl::OUString& aResourceURL, rtl::OUString& aType, rtl::OUString& aName );
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
ConfigurationAccess_WindowContentFactoryManager* m_pConfigAccess;
ConfigurationAccess_FactoryManager* m_pConfigAccess;
};
} // namespace framework

View File

@@ -48,7 +48,7 @@
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <hash_map>
#include <stdtypes.h>
@@ -62,9 +62,8 @@ namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadEventsDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
class OReadEventsDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler >
{
public:
enum Events_XML_Entry
@@ -88,15 +87,7 @@ class OReadEventsDocumentHandler : public ::com::sun::star::xml::sax::XDocument
};
OReadEventsDocumentHandler( EventsConfig& aItems );
virtual ~OReadEventsDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
@@ -135,6 +126,9 @@ class OReadEventsDocumentHandler : public ::com::sun::star::xml::sax::XDocument
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
protected:
virtual ~OReadEventsDocumentHandler();
private:
::rtl::OUString getErrorLineString();

View File

@@ -45,7 +45,7 @@
#include <xml/imagesconfiguration.hxx>
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <hash_map>
#include <stdtypes.h>
@@ -59,9 +59,8 @@ namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadImagesDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
class OReadImagesDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler >
{
public:
enum Image_XML_Entry
@@ -92,14 +91,6 @@ class OReadImagesDocumentHandler : public ::com::sun::star::xml::sax::XDocumentH
OReadImagesDocumentHandler( ImageListsDescriptor& aItems );
virtual ~OReadImagesDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,

View File

@@ -42,13 +42,14 @@
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/XComponentContext.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
//_________________________________________________________________________________________________________________
@@ -57,22 +58,13 @@
namespace framework{
class ReadMenuDocumentHandlerBase : public ::com::sun::star::xml::sax::XDocumentHandler,
public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class ReadMenuDocumentHandlerBase : public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler >
{
public:
ReadMenuDocumentHandlerBase();
virtual ~ReadMenuDocumentHandlerBase();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,
@@ -295,6 +287,7 @@ class OReadMenuPopupHandler : public ReadMenuDocumentHandlerBase
sal_Bool m_bMenuMode;
com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > m_xMenuContainer;
com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > m_xContainerFactory;
com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xComponentContext;
NextElementClose m_nNextElementExpected;
}; // OReadMenuPopupHandler

View File

@@ -36,7 +36,7 @@
#include <xml/xmlnamespaces.hxx>
#include <rtl/ustring.hxx>
#include <vcl/menu.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <stack>
@@ -47,22 +47,13 @@
namespace framework
{
class SaxNamespaceFilter : public ::com::sun::star::xml::sax::XDocumentHandler,
public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
class SaxNamespaceFilter : public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler >
{
public:
SaxNamespaceFilter( ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >& rSax1DocumentHandler );
virtual ~SaxNamespaceFilter();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,

View File

@@ -48,7 +48,7 @@
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <hash_map>
#include <stdtypes.h>
@@ -62,9 +62,8 @@ namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadStatusBarDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
class OReadStatusBarDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler >
{
public:
enum StatusBar_XML_Entry
@@ -92,14 +91,6 @@ class OReadStatusBarDocumentHandler : public ::com::sun::star::xml::sax::XDocu
OReadStatusBarDocumentHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& aStatusBarItems );
virtual ~OReadStatusBarDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,

View File

@@ -44,7 +44,7 @@
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -56,9 +56,8 @@ namespace framework{
//*****************************************************************************************************************
// Hash code function for using in all hash maps of follow implementation.
class OReadToolBoxDocumentHandler : public ::com::sun::star::xml::sax::XDocumentHandler,
private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::OWeakObject
class OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler >
{
public:
enum ToolBox_XML_Entry
@@ -91,14 +90,6 @@ class OReadToolBoxDocumentHandler : public ::com::sun::star::xml::sax::XDocument
OReadToolBoxDocumentHandler( const ::com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& rItemContainer );
virtual ~OReadToolBoxDocumentHandler();
// XInterface
virtual void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
virtual void SAL_CALL release() throw()
{ OWeakObject::release(); }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw ( ::com::sun::star::xml::sax::SAXException,

View File

@@ -30,15 +30,14 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar
..\inc\helper\imageproducer.hxx %_DEST%\inc%_EXT%\framework\imageproducer.hxx
..\inc\helper\acceleratorinfo.hxx %_DEST%\inc%_EXT%\framework\acceleratorinfo.hxx
..\inc\helper\actiontriggerhelper.hxx %_DEST%\inc%_EXT%\framework\actiontriggerhelper.hxx
..\inc\classes\menuconfiguration.hxx %_DEST%\inc%_EXT%\framework\menuconfiguration.hxx
..\inc\xml\menuconfiguration.hxx %_DEST%\inc%_EXT%\framework\menuconfiguration.hxx
..\inc\classes\bmkmenu.hxx %_DEST%\inc%_EXT%\framework\bmkmenu.hxx
..\inc\classes\toolboxconfiguration.hxx %_DEST%\inc%_EXT%\framework\toolboxconfiguration.hxx
..\inc\classes\statusbarconfiguration.hxx %_DEST%\inc%_EXT%\framework\statusbarconfiguration.hxx
..\inc\classes\eventsconfiguration.hxx %_DEST%\inc%_EXT%\framework\eventsconfiguration.hxx
..\inc\classes\imagesconfiguration.hxx %_DEST%\inc%_EXT%\framework\imagesconfiguration.hxx
..\inc\xml\toolboxconfiguration.hxx %_DEST%\inc%_EXT%\framework\toolboxconfiguration.hxx
..\inc\xml\statusbarconfiguration.hxx %_DEST%\inc%_EXT%\framework\statusbarconfiguration.hxx
..\inc\xml\eventsconfiguration.hxx %_DEST%\inc%_EXT%\framework\eventsconfiguration.hxx
..\inc\xml\imagesconfiguration.hxx %_DEST%\inc%_EXT%\framework\imagesconfiguration.hxx
..\inc\classes\addonsoptions.hxx %_DEST%\inc%_EXT%\framework\addonsoptions.hxx
..\inc\dispatch\interaction.hxx %_DEST%\inc%_EXT%\framework\interaction.hxx
..\inc\classes\addonsoptions.hxx %_DEST%\inc%_EXT%\framework\addonsoptions.hxx
..\inc\classes\addonmenu.hxx %_DEST%\inc%_EXT%\framework\addonmenu.hxx
..\inc\classes\sfxhelperfunctions.hxx %_DEST%\inc%_EXT%\framework\sfxhelperfunctions.hxx
..\inc\helper\configimporter.hxx %_DEST%\inc%_EXT%\framework\configimporter.hxx

View File

@@ -127,10 +127,12 @@ AcceleratorCache::TKeyList AcceleratorCache::getAllKeys() const
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
lKeys.reserve(m_lKey2Commands.size());
TKey2Commands::const_iterator pIt;
TKey2Commands::const_iterator pEnd = m_lKey2Commands.end();
for ( pIt = m_lKey2Commands.begin();
pIt != m_lKey2Commands.end() ;
pIt != pEnd ;
++pIt )
{
lKeys.push_back(pIt->first);

View File

@@ -115,6 +115,24 @@ namespace framework
namespace fpc = ::framework::pattern::configuration;
#endif
::rtl::OUString lcl_getKeyString(const css::awt::KeyEvent& aKeyEvent)
{
KeyMapping aKeyMapping;
const sal_Int32 nBeginIndex = 4; // "KEY_" is the prefix of a identifier...
::rtl::OUStringBuffer sKeyBuffer((aKeyMapping.mapCodeToIdentifier(aKeyEvent.KeyCode)).copy(nBeginIndex));
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT )
sKeyBuffer.appendAscii("_SHIFT");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 )
sKeyBuffer.appendAscii("_MOD1");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 )
sKeyBuffer.appendAscii("_MOD2");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 )
sKeyBuffer.appendAscii("_MOD3");
return sKeyBuffer.makeStringAndClear();
}
//-----------------------------------------------
// XInterface, XTypeProvider
DEFINE_XINTERFACE_6(XMLBasedAcceleratorConfiguration ,
@@ -285,7 +303,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XMLBasedAcceleratorConfiguration::g
continue;
AcceleratorCache::TKeyList lKeys = rCache.getKeysByCommand(rCommand);
if (lKeys.size()<1)
if ( lKeys.empty() )
continue;
css::uno::Any& rAny = lPreferredOnes[i];
@@ -694,6 +712,8 @@ XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(const css::un
, m_pPrimaryWriteCache(0 )
, m_pSecondaryWriteCache(0 )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration" );
static const ::rtl::OUString CFG_ENTRY_ACCELERATORS(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Accelerators"));
m_xCfg = css::uno::Reference< css::container::XNameAccess > (
::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
css::uno::UNO_QUERY );
@@ -708,14 +728,17 @@ XCUBasedAcceleratorConfiguration::~XCUBasedAcceleratorConfiguration()
css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfiguration::getAllKeyEvents()
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::getAllKeyEvents" );
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
AcceleratorCache::TKeyList lKeys = impl_getCFG(sal_True).getAllKeys(); //get keys from PrimaryKeys set
AcceleratorCache::TKeyList lSecondaryKeys = impl_getCFG(sal_False).getAllKeys(); //get keys from SecondaryKeys set
lKeys.reserve(lKeys.size()+lSecondaryKeys.size());
AcceleratorCache::TKeyList::const_iterator pIt;
for ( pIt = lSecondaryKeys.begin(); pIt != lSecondaryKeys.end(); ++pIt )
AcceleratorCache::TKeyList::const_iterator pEnd = lSecondaryKeys.end();
for ( pIt = lSecondaryKeys.begin(); pIt != pEnd; ++pIt )
lKeys.push_back(*pIt);
return lKeys.getAsConstList();
@@ -728,6 +751,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfigurati
throw(css::container::NoSuchElementException,
css::uno::RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::getCommandByKeyEvent" );
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
@@ -753,6 +777,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE
throw(css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::setKeyEvent" );
RTL_LOGFILE_PRODUCT_CONTEXT( aLog1, " start XCUBasedAcceleratorConfiguration::setKeyEvent" );
if (
@@ -841,6 +866,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeKeyEvent(const css::awt::K
throw(css::container::NoSuchElementException,
css::uno::RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::removeKeyEvent" );
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
@@ -885,6 +911,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfigurati
css::container::NoSuchElementException,
css::uno::RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::getKeyEventsByCommand" );
if (!sCommand.getLength())
throw css::lang::IllegalArgumentException(
::rtl::OUString::createFromAscii("Empty command strings are not allowed here."),
@@ -938,6 +965,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g
throw(css::lang::IllegalArgumentException ,
css::uno::RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::getPreferredKeyEventsForCommandList" );
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
@@ -959,7 +987,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g
continue;
AcceleratorCache::TKeyList lKeys = rCache.getKeysByCommand(rCommand);
if (lKeys.size()<1)
if ( lKeys.empty() )
continue;
AcceleratorCache::TKeyList::const_iterator pPreferredKey = lcl_getPreferredKey(lKeys);
@@ -982,6 +1010,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
css::container::NoSuchElementException,
css::uno::RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents" );
if (!sCommand.getLength())
throw css::lang::IllegalArgumentException(
::rtl::OUString::createFromAscii("Empty command strings are not allowed here."),
@@ -1013,6 +1042,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reload()
throw(css::uno::Exception ,
css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::reload" );
RTL_LOGFILE_PRODUCT_CONTEXT( aLog1, " start XCUBasedAcceleratorConfiguration::reload()" );
// SAFE -> ----------------------------------
@@ -1056,6 +1086,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::store()
throw(css::uno::Exception ,
css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::reload" );
RTL_LOGFILE_PRODUCT_CONTEXT( aLog1, " start XCUBasedAcceleratorConfiguration::store()" );
// SAFE -> ----------------------------------
@@ -1087,6 +1118,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
throw(css::uno::Exception ,
css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::storeToStorage" );
// todo implement me
// use m_aCache + old AcceleratorXMLWriter to store data directly on storage given as parameter ...
}
@@ -1095,6 +1127,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
::sal_Bool SAL_CALL XCUBasedAcceleratorConfiguration::isModified()
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::isModified" );
return sal_False;
}
@@ -1102,6 +1135,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
::sal_Bool SAL_CALL XCUBasedAcceleratorConfiguration::isReadOnly()
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::isReadOnly" );
return sal_False;
}
@@ -1109,6 +1143,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
void SAL_CALL XCUBasedAcceleratorConfiguration::setStorage(const css::uno::Reference< css::embed::XStorage >& /*xStorage*/)
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::setStorage" );
LOG_WARNING("XCUBasedAcceleratorConfiguration::setStorage()", "TODO implement this HACK .-)")
}
@@ -1116,6 +1151,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setStorage(const css::uno::Refer
::sal_Bool SAL_CALL XCUBasedAcceleratorConfiguration::hasStorage()
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::hasStorage" );
LOG_WARNING("XCUBasedAcceleratorConfiguration::hasStorage()", "TODO implement this HACK .-)")
return sal_False;
}
@@ -1124,6 +1160,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setStorage(const css::uno::Refer
void SAL_CALL XCUBasedAcceleratorConfiguration::addConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener >& /*xListener*/)
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::addConfigurationListener" );
LOG_WARNING("XCUBasedAcceleratorConfiguration::addConfigurationListener()", "TODO implement me")
}
@@ -1131,6 +1168,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::addConfigurationListener(const c
void SAL_CALL XCUBasedAcceleratorConfiguration::removeConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener >& /*xListener*/)
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::removeConfigurationListener" );
LOG_WARNING("XCUBasedAcceleratorConfiguration::removeConfigurationListener()", "TODO implement me")
}
@@ -1138,6 +1176,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeConfigurationListener(cons
void SAL_CALL XCUBasedAcceleratorConfiguration::reset()
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::reset" );
css::uno::Reference< css::container::XNamed > xNamed(m_xCfg, css::uno::UNO_QUERY);
::rtl::OUString sConfig = xNamed->getName();
if ( sConfig.equalsAscii("Global") )
@@ -1160,6 +1199,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reset()
void SAL_CALL XCUBasedAcceleratorConfiguration::addResetListener(const css::uno::Reference< css::form::XResetListener >& /*xListener*/)
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::reload" );
LOG_WARNING("XCUBasedAcceleratorConfiguration::addResetListener()", "TODO implement me")
}
@@ -1167,6 +1207,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::addResetListener(const css::uno:
void SAL_CALL XCUBasedAcceleratorConfiguration::removeResetListener(const css::uno::Reference< css::form::XResetListener >& /*xListener*/)
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::removeResetListener" );
LOG_WARNING("XCUBasedAcceleratorConfiguration::removeResetListener()", "TODO implement me")
}
@@ -1174,6 +1215,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeResetListener(const css::u
void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util::ChangesEvent& aEvent)
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::changesOccurred" );
RTL_LOGFILE_PRODUCT_CONTEXT( aLog1, " start XCUBasedAcceleratorConfiguration::changesOccurred()" );
css::uno::Reference< css::container::XHierarchicalNameAccess > xHAccess;
@@ -1230,11 +1272,13 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
void SAL_CALL XCUBasedAcceleratorConfiguration::disposing(const css::lang::EventObject& /*aSource*/)
throw(css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::changesOccurred" );
}
//-----------------------------------------------
void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const css::uno::Reference< css::container::XNameAccess >& xCfg )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::impl_ts_load" );
AcceleratorCache aReadCache = AcceleratorCache();
css::uno::Reference< css::container::XNameAccess > xAccess;
if (m_sGlobalOrModules.equalsAscii("Global"))
@@ -1346,6 +1390,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const
//-----------------------------------------------
void XCUBasedAcceleratorConfiguration::impl_ts_save(sal_Bool bPreferred, const css::uno::Reference< css::container::XNameAccess >& /*xCfg*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::impl_ts_save" );
if (bPreferred)
{
AcceleratorCache::TKeyList::const_iterator pIt;
@@ -1439,6 +1484,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_save(sal_Bool bPreferred, const c
//-----------------------------------------------
void XCUBasedAcceleratorConfiguration::insertKeyToConfiguration( const css::awt::KeyEvent& aKeyEvent, const ::rtl::OUString& sCommand, const sal_Bool bPreferred )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::insertKeyToConfiguration" );
css::uno::Reference< css::container::XNameAccess > xAccess;
css::uno::Reference< css::container::XNameContainer > xContainer;
css::uno::Reference< css::lang::XSingleServiceFactory > xFac;
@@ -1464,18 +1510,7 @@ void XCUBasedAcceleratorConfiguration::insertKeyToConfiguration( const css::awt:
xModules->getByName(m_sModuleCFG) >>= xContainer;
}
KeyMapping aKeyMapping;
const sal_Int32 nBeginIndex = 4; // "KEY_" is the prefix of a identifier...
::rtl::OUString sKey = (aKeyMapping.mapCodeToIdentifier(aKeyEvent.KeyCode)).copy(nBeginIndex);
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT )
sKey += ::rtl::OUString::createFromAscii("_SHIFT");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 )
sKey += ::rtl::OUString::createFromAscii("_MOD1");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 )
sKey += ::rtl::OUString::createFromAscii("_MOD2");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 )
sKey += ::rtl::OUString::createFromAscii("_MOD3");
const ::rtl::OUString sKey = lcl_getKeyString(aKeyEvent);
css::uno::Reference< css::container::XNameAccess > xKey;
css::uno::Reference< css::container::XNameContainer > xCommand;
if ( !xContainer->hasByName(sKey) )
@@ -1497,6 +1532,7 @@ void XCUBasedAcceleratorConfiguration::insertKeyToConfiguration( const css::awt:
//-----------------------------------------------
void XCUBasedAcceleratorConfiguration::removeKeyFromConfiguration( const css::awt::KeyEvent& aKeyEvent, const sal_Bool bPreferred )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::removeKeyFromConfiguration" );
css::uno::Reference< css::container::XNameAccess > xAccess;
css::uno::Reference< css::container::XNameContainer > xContainer;
@@ -1516,25 +1552,14 @@ void XCUBasedAcceleratorConfiguration::removeKeyFromConfiguration( const css::aw
xModules->getByName(m_sModuleCFG) >>= xContainer;
}
KeyMapping aKeyMapping;
const sal_Int32 nBeginIndex = 4; // "KEY_" is the prefix of a identifier...
::rtl::OUString sKey = (aKeyMapping.mapCodeToIdentifier(aKeyEvent.KeyCode)).copy(nBeginIndex);
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT )
sKey += ::rtl::OUString::createFromAscii("_SHIFT");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 )
sKey += ::rtl::OUString::createFromAscii("_MOD1");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 )
sKey += ::rtl::OUString::createFromAscii("_MOD2");
if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 )
sKey += ::rtl::OUString::createFromAscii("_MOD3");
const ::rtl::OUString sKey = lcl_getKeyString(aKeyEvent);
xContainer->removeByName(sKey);
}
//-----------------------------------------------
void XCUBasedAcceleratorConfiguration::reloadChanged( const ::rtl::OUString& sPrimarySecondary, const ::rtl::OUString& sGlobalModules, const ::rtl::OUString& sModule, const ::rtl::OUString& sKey )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::reloadChanged" );
css::uno::Reference< css::container::XNameAccess > xAccess;
css::uno::Reference< css::container::XNameContainer > xContainer;
@@ -1607,6 +1632,7 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const ::rtl::OUString& sPr
//-----------------------------------------------
AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bPreferred, sal_Bool bWriteAccessRequested)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::impl_getCFG" );
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
@@ -1656,6 +1682,7 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bPrefer
//-----------------------------------------------
::comphelper::Locale XCUBasedAcceleratorConfiguration::impl_ts_getLocale() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "XCUBasedAcceleratorConfiguration::impl_ts_getLocale" );
static ::rtl::OUString LOCALE_PACKAGE = ::rtl::OUString::createFromAscii("/org.openoffice.Setup");
static ::rtl::OUString LOCALE_PATH = ::rtl::OUString::createFromAscii("L10N" );
static ::rtl::OUString LOCALE_KEY = ::rtl::OUString::createFromAscii("ooLocale" );

View File

@@ -123,7 +123,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::lang::XMultiServic
// <- SAFE ------------------------------
css::uno::Reference< css::frame::XDispatchProvider > xDispatcher(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")),
xSMGR->createInstance(SERVICENAME_DESKTOP),
css::uno::UNO_QUERY_THROW);
// SAFE -> ------------------------------
@@ -276,7 +276,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::impl_st_openGlobalConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
{
css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.ui.GlobalAcceleratorConfiguration")),
xSMGR->createInstance(SERVICENAME_GLOBALACCELERATORCONFIGURATION),
css::uno::UNO_QUERY_THROW);
return xAccCfg;
}
@@ -286,7 +286,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::im
const css::uno::Reference< css::frame::XFrame >& xFrame)
{
css::uno::Reference< css::frame::XModuleManager > xModuleDetection(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager")),
xSMGR->createInstance(SERVICENAME_MODULEMANAGER),
css::uno::UNO_QUERY_THROW);
::rtl::OUString sModule;
@@ -300,7 +300,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::im
{ return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); }
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")),
xSMGR->createInstance(SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER),
css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::ui::XUIConfigurationManager > xUIManager = xUISupplier->getUIConfigurationManager(sModule);
@@ -331,7 +331,7 @@ css::uno::Reference< css::util::XURLTransformer > AcceleratorExecute::impl_ts_ge
// <- SAFE ----------------------------------
css::uno::Reference< css::util::XURLTransformer > xParser(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")),
xSMGR->createInstance(SERVICENAME_URLTRANSFORMER),
css::uno::UNO_QUERY_THROW);
// SAFE -> ----------------------------------

View File

@@ -109,6 +109,7 @@ DEFINE_INIT_SERVICE(ModuleAcceleratorConfiguration,
ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR)
: XCUBasedAcceleratorConfiguration(xSMGR)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration" );
}
//-----------------------------------------------
@@ -122,6 +123,7 @@ void SAL_CALL ModuleAcceleratorConfiguration::initialize(const css::uno::Sequenc
throw(css::uno::Exception ,
css::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleAcceleratorConfiguration::initialize" );
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
@@ -143,6 +145,7 @@ void SAL_CALL ModuleAcceleratorConfiguration::initialize(const css::uno::Sequenc
//-----------------------------------------------
void ModuleAcceleratorConfiguration::impl_ts_fillCache()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleAcceleratorConfiguration::impl_ts_fillCache" );
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
::rtl::OUString sModule = m_sModule;

Some files were not shown because too many files have changed in this diff Show More