summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/app/app.cxx5
-rw-r--r--desktop/source/app/checkinstall.cxx86
-rw-r--r--framework/collector/cmduicollector.cxx40
-rw-r--r--framework/collector/uicmdstohtml.cxx4
-rw-r--r--framework/inc/classes/addonmenu.hxx7
-rw-r--r--framework/inc/classes/bmkmenu.hxx4
-rw-r--r--framework/inc/classes/eventsconfiguration.hxx39
-rw-r--r--framework/inc/classes/eventsdocumenthandler.hxx198
-rwxr-xr-xframework/inc/classes/fwlresid.hxx49
-rw-r--r--framework/inc/classes/imagesconfiguration.hxx115
-rw-r--r--framework/inc/classes/imagesdocumenthandler.hxx215
-rw-r--r--framework/inc/classes/imagewrapper.hxx18
-rw-r--r--framework/inc/classes/menuconfiguration.hxx126
-rw-r--r--framework/inc/classes/menumanager.hxx38
-rw-r--r--framework/inc/classes/statusbarconfiguration.hxx48
-rw-r--r--framework/inc/classes/statusbardocumenthandler.hxx190
-rwxr-xr-xframework/inc/classes/toolboxconfiguration.hxx96
-rw-r--r--framework/inc/classes/toolboxconfigurationdefines.hxx80
-rwxr-xr-xframework/inc/classes/toolboxdocumenthandler.hxx217
-rw-r--r--framework/inc/classes/toolboxlayoutdocumenthandler.hxx198
-rw-r--r--framework/inc/helper/dockingareadefaultacceptor.hxx15
-rw-r--r--framework/inc/helper/mischelper.hxx15
-rw-r--r--framework/inc/helper/ocomponentaccess.hxx15
-rw-r--r--framework/inc/helper/ocomponentenumeration.hxx16
-rw-r--r--framework/inc/helper/oframes.hxx15
-rw-r--r--framework/inc/helper/opluginframedispatcher.hxx15
-rw-r--r--framework/inc/helper/popupmenucontrollerbase.hxx8
-rw-r--r--framework/inc/helper/uiconfigelementwrapperbase.hxx10
-rw-r--r--framework/inc/interaction/preventduplicateinteraction.hxx4
-rw-r--r--framework/inc/jobs/helponstartup.hxx14
-rw-r--r--framework/inc/jobs/shelljob.hxx13
-rw-r--r--framework/inc/macros/debug/memorymeasure.hxx2
-rw-r--r--framework/inc/macros/xserviceinfo.hxx27
-rw-r--r--framework/inc/mediadescriptor.h76
-rw-r--r--framework/inc/services.h18
-rw-r--r--framework/inc/services/dispatchhelper.hxx12
-rw-r--r--framework/inc/services/frameloaderfactory.hxx12
-rw-r--r--framework/inc/services/mediatypedetectionhelper.hxx10
-rw-r--r--framework/inc/services/menudocumenthandler.hxx317
-rw-r--r--framework/inc/services/popupmenucontrollerfactory.hxx97
-rw-r--r--framework/inc/services/saxnamespacefilter.hxx119
-rw-r--r--framework/inc/services/substitutepathvars.hxx11
-rw-r--r--framework/inc/services/uriabbreviation.hxx10
-rw-r--r--framework/inc/services/urltransformer.hxx10
-rw-r--r--framework/inc/tabwin/tabwinfactory.hxx11
-rw-r--r--framework/inc/uiconfiguration/imagemanager.hxx62
-rw-r--r--framework/inc/uiconfiguration/moduleimagemanager.hxx115
-rw-r--r--framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx92
-rw-r--r--framework/inc/uiconfiguration/uicategorydescription.hxx50
-rw-r--r--framework/inc/uiconfiguration/uiconfigurationmanager.hxx81
-rw-r--r--framework/inc/uiconfiguration/windowstateconfiguration.hxx9
-rw-r--r--framework/inc/uielement/comboboxtoolbarcontroller.hxx4
-rw-r--r--framework/inc/uielement/complextoolbarcontroller.hxx1
-rw-r--r--framework/inc/uielement/controlmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/dropdownboxtoolbarcontroller.hxx4
-rw-r--r--framework/inc/uielement/edittoolbarcontroller.hxx4
-rw-r--r--framework/inc/uielement/fontmenucontroller.hxx11
-rw-r--r--framework/inc/uielement/fontsizemenucontroller.hxx12
-rw-r--r--framework/inc/uielement/footermenucontroller.hxx61
-rw-r--r--framework/inc/uielement/headermenucontroller.hxx14
-rw-r--r--framework/inc/uielement/imagebuttontoolbarcontroller.hxx3
-rw-r--r--framework/inc/uielement/itemcontainer.hxx10
-rw-r--r--framework/inc/uielement/langselectionmenucontroller.hxx9
-rw-r--r--framework/inc/uielement/langselectionstatusbarcontroller.hxx3
-rw-r--r--framework/inc/uielement/macrosmenucontroller.hxx13
-rw-r--r--framework/inc/uielement/menubarmanager.hxx21
-rw-r--r--framework/inc/uielement/menubarwrapper.hxx7
-rw-r--r--framework/inc/uielement/newmenucontroller.hxx11
-rw-r--r--framework/inc/uielement/objectmenucontroller.hxx13
-rw-r--r--framework/inc/uielement/recentfilesmenucontroller.hxx8
-rw-r--r--framework/inc/uielement/spinfieldtoolbarcontroller.hxx4
-rw-r--r--framework/inc/uielement/statusbarmanager.hxx4
-rw-r--r--framework/inc/uielement/statusbarwrapper.hxx3
-rw-r--r--framework/inc/uielement/statusindicatorinterfacewrapper.hxx12
-rw-r--r--framework/inc/uielement/togglebuttontoolbarcontroller.hxx2
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx6
-rw-r--r--framework/inc/uielement/toolbarsmenucontroller.hxx4
-rw-r--r--framework/inc/uielement/toolbarwrapper.hxx9
-rw-r--r--framework/inc/uielement/uicommanddescription.hxx22
-rw-r--r--framework/inc/uifactory/addonstoolboxfactory.hxx12
-rwxr-xr-xframework/inc/uifactory/factoryconfiguration.hxx127
-rw-r--r--framework/inc/uifactory/menubarfactory.hxx24
-rw-r--r--framework/inc/uifactory/popupmenucontrollerfactory.hxx38
-rw-r--r--framework/inc/uifactory/statusbarcontrollerfactory.hxx40
-rw-r--r--framework/inc/uifactory/statusbarfactory.hxx26
-rw-r--r--framework/inc/uifactory/toolbarcontrollerfactory.hxx21
-rw-r--r--framework/inc/uifactory/toolboxfactory.hxx25
-rw-r--r--framework/inc/uifactory/uielementfactorymanager.hxx75
-rw-r--r--framework/inc/uifactory/windowcontentfactorymanager.hxx21
-rw-r--r--framework/inc/xml/eventsdocumenthandler.hxx20
-rw-r--r--framework/inc/xml/imagesdocumenthandler.hxx15
-rw-r--r--framework/inc/xml/menudocumenthandler.hxx17
-rw-r--r--framework/inc/xml/saxnamespacefilter.hxx15
-rw-r--r--framework/inc/xml/statusbardocumenthandler.hxx15
-rw-r--r--framework/inc/xml/toolboxdocumenthandler.hxx15
-rw-r--r--framework/prj/d.lst11
-rw-r--r--framework/source/accelerators/acceleratorcache.cxx4
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx83
-rw-r--r--framework/source/accelerators/acceleratorexecute.cxx10
-rw-r--r--framework/source/accelerators/moduleacceleratorconfiguration.cxx3
-rw-r--r--framework/source/classes/addonmenu.cxx15
-rw-r--r--framework/source/classes/addonsoptions.cxx2
-rw-r--r--framework/source/classes/bmkmenu.cxx23
-rw-r--r--framework/source/classes/framelistanalyzer.cxx6
-rw-r--r--framework/source/classes/fwktabwindow.cxx19
-rwxr-xr-xframework/source/classes/fwlresid.cxx68
-rw-r--r--framework/source/classes/imagewrapper.cxx86
-rw-r--r--framework/source/classes/makefile.mk1
-rw-r--r--framework/source/classes/menumanager.cxx553
-rw-r--r--framework/source/classes/propertysethelper.cxx3
-rw-r--r--framework/source/classes/protocolhandlercache.cxx15
-rw-r--r--framework/source/classes/taskcreator.cxx3
-rw-r--r--framework/source/dispatch/closedispatcher.cxx5
-rw-r--r--framework/source/dispatch/interceptionhelper.cxx4
-rw-r--r--framework/source/dispatch/menudispatcher.cxx6
-rw-r--r--framework/source/dispatch/popupmenudispatcher.cxx8
-rwxr-xr-xframework/source/dispatch/windowcommanddispatch.cxx1
-rw-r--r--framework/source/helper/actiontriggerhelper.cxx4
-rw-r--r--framework/source/helper/dockingareadefaultacceptor.cxx13
-rw-r--r--framework/source/helper/mischelper.cxx90
-rw-r--r--framework/source/helper/ocomponentaccess.cxx15
-rw-r--r--framework/source/helper/ocomponentenumeration.cxx17
-rw-r--r--framework/source/helper/oframes.cxx19
-rw-r--r--framework/source/helper/persistentwindowstate.cxx5
-rw-r--r--framework/source/helper/popupmenucontrollerbase.cxx79
-rw-r--r--framework/source/helper/titlebarupdate.cxx3
-rw-r--r--framework/source/helper/titlehelper.cxx44
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx61
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx1
-rw-r--r--framework/source/inc/accelerators/acceleratorconfiguration.hxx2
-rw-r--r--framework/source/inc/dispatch/uieventloghelper.hxx3
-rw-r--r--framework/source/inc/pattern/frame.hxx1
-rw-r--r--framework/source/jobs/helponstartup.cxx13
-rw-r--r--framework/source/jobs/job.cxx3
-rw-r--r--framework/source/jobs/jobdata.cxx9
-rw-r--r--framework/source/jobs/jobresult.cxx2
-rw-r--r--framework/source/jobs/shelljob.cxx11
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx582
-rw-r--r--framework/source/loadenv/loadenv.cxx4
-rw-r--r--framework/source/recording/dispatchrecorder.cxx2
-rw-r--r--framework/source/register/registerservices.cxx134
-rw-r--r--framework/source/register/registertemp.cxx71
-rw-r--r--framework/source/services/autorecovery.cxx8
-rw-r--r--framework/source/services/backingwindow.cxx13
-rw-r--r--framework/source/services/desktop.cxx1
-rw-r--r--framework/source/services/dispatchhelper.cxx14
-rw-r--r--framework/source/services/frame.cxx10
-rw-r--r--framework/source/services/license.cxx7
-rw-r--r--framework/source/services/mediatypedetectionhelper.cxx18
-rw-r--r--framework/source/services/modulemanager.cxx7
-rw-r--r--framework/source/services/pathsettings.cxx10
-rw-r--r--framework/source/services/substitutepathvars.cxx53
-rw-r--r--framework/source/services/uriabbreviation.cxx13
-rw-r--r--framework/source/services/urltransformer.cxx178
-rw-r--r--framework/source/tabwin/tabwindow.cxx2
-rw-r--r--framework/source/tabwin/tabwinfactory.cxx13
-rw-r--r--framework/source/threadhelp/transactionmanager.cxx2
-rw-r--r--framework/source/uiconfiguration/graphicnameaccess.cxx2
-rw-r--r--framework/source/uiconfiguration/imagemanager.cxx926
-rwxr-xr-xframework/source/uiconfiguration/imagemanagerimpl.cxx1466
-rwxr-xr-xframework/source/uiconfiguration/imagemanagerimpl.hxx225
-rw-r--r--framework/source/uiconfiguration/makefile.mk2
-rw-r--r--framework/source/uiconfiguration/moduleimagemanager.cxx1346
-rw-r--r--framework/source/uiconfiguration/moduleuicfgsupplier.cxx76
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx1428
-rw-r--r--framework/source/uiconfiguration/uicategorydescription.cxx219
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx1157
-rwxr-xr-xframework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx1713
-rwxr-xr-xframework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx221
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx19
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx30
-rw-r--r--framework/source/uielement/addonstoolbarwrapper.cxx1
-rw-r--r--framework/source/uielement/buttontoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx55
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx19
-rw-r--r--framework/source/uielement/constitemcontainer.cxx12
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx146
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx55
-rw-r--r--framework/source/uielement/edittoolbarcontroller.cxx55
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx111
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx107
-rw-r--r--framework/source/uielement/footermenucontroller.cxx250
-rw-r--r--framework/source/uielement/headermenucontroller.cxx124
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx8
-rw-r--r--framework/source/uielement/itemcontainer.cxx37
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx210
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx20
-rw-r--r--framework/source/uielement/logoimagestatusbarcontroller.cxx4
-rw-r--r--framework/source/uielement/logotextstatusbarcontroller.cxx4
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx169
-rw-r--r--framework/source/uielement/menubarmanager.cxx698
-rw-r--r--framework/source/uielement/menubarmerger.cxx8
-rw-r--r--framework/source/uielement/menubarwrapper.cxx91
-rw-r--r--framework/source/uielement/newmenucontroller.cxx126
-rw-r--r--framework/source/uielement/objectmenucontroller.cxx89
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx83
-rw-r--r--framework/source/uielement/rootitemcontainer.cxx9
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx63
-rw-r--r--framework/source/uielement/statusbarmanager.cxx175
-rw-r--r--framework/source/uielement/statusbarwrapper.cxx50
-rw-r--r--framework/source/uielement/statusindicatorinterfacewrapper.cxx16
-rw-r--r--framework/source/uielement/togglebuttontoolbarcontroller.cxx58
-rw-r--r--framework/source/uielement/toolbar.cxx1
-rw-r--r--framework/source/uielement/toolbarmanager.cxx262
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx74
-rw-r--r--framework/source/uielement/toolbarwrapper.cxx74
-rw-r--r--framework/source/uielement/uicommanddescription.cxx236
-rw-r--r--framework/source/uifactory/addonstoolboxfactory.cxx17
-rwxr-xr-xframework/source/uifactory/factoryconfiguration.cxx344
-rw-r--r--framework/source/uifactory/makefile.mk1
-rw-r--r--framework/source/uifactory/menubarfactory.cxx115
-rw-r--r--framework/source/uifactory/popupmenucontrollerfactory.cxx447
-rw-r--r--framework/source/uifactory/statusbarcontrollerfactory.cxx536
-rw-r--r--framework/source/uifactory/statusbarfactory.cxx112
-rw-r--r--framework/source/uifactory/toolbarcontrollerfactory.cxx360
-rw-r--r--framework/source/uifactory/toolboxfactory.cxx116
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx230
-rw-r--r--framework/source/uifactory/windowcontentfactorymanager.cxx292
-rw-r--r--framework/source/xml/eventsconfiguration.cxx9
-rw-r--r--framework/source/xml/eventsdocumenthandler.cxx13
-rw-r--r--framework/source/xml/imagesconfiguration.cxx9
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx13
-rw-r--r--framework/source/xml/menuconfiguration.cxx7
-rw-r--r--framework/source/xml/menudocumenthandler.cxx27
-rw-r--r--framework/source/xml/saxnamespacefilter.cxx16
-rw-r--r--framework/source/xml/statusbarconfiguration.cxx5
-rw-r--r--framework/source/xml/statusbardocumenthandler.cxx23
-rw-r--r--framework/source/xml/toolboxconfiguration.cxx5
-rw-r--r--framework/source/xml/toolboxdocumenthandler.cxx26
-rw-r--r--framework/util/makefile.mk66
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx153
-rw-r--r--sfx2/source/doc/objxtor.cxx55
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx48
-rw-r--r--svx/inc/svx/SmartTagMgr.hxx4
-rwxr-xr-x[-rw-r--r--]svx/inc/svx/dbcharsethelper.hxx (renamed from svx/source/inc/dbcharsethelper.hxx)6
-rwxr-xr-x[-rw-r--r--]svx/inc/svx/dbtoolsclient.hxx (renamed from svx/source/inc/dbtoolsclient.hxx)32
-rw-r--r--svx/inc/svx/svdetc.hxx10
-rw-r--r--svx/inc/svx/tstpitem.hxx12
-rw-r--r--svx/prj/d.lst2
-rw-r--r--svx/source/dialog/txencbox.cxx2
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/form/dbcharsethelper.cxx2
-rw-r--r--svx/source/form/dbtoolsclient.cxx2
-rw-r--r--svx/source/form/fmdocumentclassification.cxx2
-rw-r--r--svx/source/form/fmpgeimp.cxx2
-rw-r--r--svx/source/form/fmtools.cxx2
-rw-r--r--svx/source/form/fmundo.cxx2
-rw-r--r--svx/source/form/formcontrolfactory.cxx2
-rw-r--r--svx/source/form/tabwin.cxx2
-rw-r--r--svx/source/inc/fmshimp.hxx2
-rw-r--r--svx/source/inc/sqlparserclient.hxx2
-rw-r--r--svx/source/inc/tabwin.hxx2
-rw-r--r--svx/source/inc/typeconversionclient.hxx2
-rw-r--r--svx/source/items/numitem.cxx22
-rw-r--r--svx/source/items/paraitem.cxx13
-rw-r--r--svx/source/smarttags/SmartTagMgr.cxx18
-rw-r--r--svx/source/svdraw/svdetc.cxx28
257 files changed, 7221 insertions, 14639 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index f893ed07c8..75533bcd0f 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -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& )
diff --git a/desktop/source/app/checkinstall.cxx b/desktop/source/app/checkinstall.cxx
index 9826754b6c..acdd15a0c8 100644
--- a/desktop/source/app/checkinstall.cxx
+++ b/desktop/source/app/checkinstall.cxx
@@ -51,63 +51,69 @@ 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;
+ }
+ else
+ {
+ InfoBox aInfoBox( NULL, rTitle );
+ aInfoBox.Execute();
+ return sal_False;
}
-
- return sal_True;
}
- else
+ catch ( RuntimeException& )
{
- InfoBox aInfoBox( NULL, rTitle );
- aInfoBox.Execute();
+ // Evaluation version expired!
return sal_False;
}
}
- catch ( RuntimeException& )
- {
- // Evaluation version expired!
- return sal_False;
- }
- }
- else
- {
- Reference< com::sun::star::container::XContentEnumerationAccess > rContent( xSMgr , UNO_QUERY );
- if( rContent.is() )
+ else
{
- OUString sEvalService = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Evaluation" ) );
- Reference < com::sun::star::container::XEnumeration > rEnum = rContent->createContentEnumeration( sEvalService );
- if ( rEnum.is() )
+ Reference< com::sun::star::container::XContentEnumerationAccess > rContent( xSMgr , UNO_QUERY );
+ if( rContent.is() )
{
- InfoBox aInfoBox( NULL, rTitle );
- aInfoBox.Execute();
- return sal_False;
+ 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;
+ }
}
}
}
+ catch(Exception)
+ {
+ }
return sal_True;
}
diff --git a/framework/collector/cmduicollector.cxx b/framework/collector/cmduicollector.cxx
index 9e30602487..94cbf563c6 100644
--- a/framework/collector/cmduicollector.cxx
+++ b/framework/collector/cmduicollector.cxx
@@ -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 );
}
diff --git a/framework/collector/uicmdstohtml.cxx b/framework/collector/uicmdstohtml.cxx
index 0194114556..8b685b3e3d 100644
--- a/framework/collector/uicmdstohtml.cxx
+++ b/framework/collector/uicmdstohtml.cxx
@@ -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] ));
diff --git a/framework/inc/classes/addonmenu.hxx b/framework/inc/classes/addonmenu.hxx
index 679d8d283b..37e5e05933 100644
--- a/framework/inc/classes/addonmenu.hxx
+++ b/framework/inc/classes/addonmenu.hxx
@@ -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;
};
diff --git a/framework/inc/classes/bmkmenu.hxx b/framework/inc/classes/bmkmenu.hxx
index 5b17b1f014..4155140114 100644
--- a/framework/inc/classes/bmkmenu.hxx
+++ b/framework/inc/classes/bmkmenu.hxx
@@ -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
diff --git a/framework/inc/classes/eventsconfiguration.hxx b/framework/inc/classes/eventsconfiguration.hxx
deleted file mode 100644
index 402330a14d..0000000000
--- a/framework/inc/classes/eventsconfiguration.hxx
+++ /dev/null
@@ -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_
diff --git a/framework/inc/classes/eventsdocumenthandler.hxx b/framework/inc/classes/eventsdocumenthandler.hxx
deleted file mode 100644
index 758c34043d..0000000000
--- a/framework/inc/classes/eventsdocumenthandler.hxx
+++ /dev/null
@@ -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
diff --git a/framework/inc/classes/fwlresid.hxx b/framework/inc/classes/fwlresid.hxx
new file mode 100755
index 0000000000..f81e093ed8
--- /dev/null
+++ b/framework/inc/classes/fwlresid.hxx
@@ -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
diff --git a/framework/inc/classes/imagesconfiguration.hxx b/framework/inc/classes/imagesconfiguration.hxx
deleted file mode 100644
index e902b148a6..0000000000
--- a/framework/inc/classes/imagesconfiguration.hxx
+++ /dev/null
@@ -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
diff --git a/framework/inc/classes/imagesdocumenthandler.hxx b/framework/inc/classes/imagesdocumenthandler.hxx
deleted file mode 100644
index c98cf3c162..0000000000
--- a/framework/inc/classes/imagesdocumenthandler.hxx
+++ /dev/null
@@ -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
diff --git a/framework/inc/classes/imagewrapper.hxx b/framework/inc/classes/imagewrapper.hxx
index 428474fd14..2ac4f42b8f 100644
--- a/framework/inc/classes/imagewrapper.hxx
+++ b/framework/inc/classes/imagewrapper.hxx
@@ -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 , // Struct for right initaliza
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 , // Struct for right initaliza
// 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;
};
diff --git a/framework/inc/classes/menuconfiguration.hxx b/framework/inc/classes/menuconfiguration.hxx
deleted file mode 100644
index a8f7f3976f..0000000000
--- a/framework/inc/classes/menuconfiguration.hxx
+++ /dev/null
@@ -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_
-
diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx
index a379d70eac..50a7457f0f 100644
--- a/framework/inc/classes/menumanager.hxx
+++ b/framework/inc/classes/menumanager.hxx
@@ -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#
@@ -89,34 +89,12 @@ class MenuManager : public XSTATUSLISTENER ,
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,
AddonMenu* pAddonMenu,
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
diff --git a/framework/inc/classes/statusbarconfiguration.hxx b/framework/inc/classes/statusbarconfiguration.hxx
deleted file mode 100644
index 72555dfcd9..0000000000
--- a/framework/inc/classes/statusbarconfiguration.hxx
+++ /dev/null
@@ -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_
diff --git a/framework/inc/classes/statusbardocumenthandler.hxx b/framework/inc/classes/statusbardocumenthandler.hxx
deleted file mode 100644
index 5dce26dec2..0000000000
--- a/framework/inc/classes/statusbardocumenthandler.hxx
+++ /dev/null
@@ -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
diff --git a/framework/inc/classes/toolboxconfiguration.hxx b/framework/inc/classes/toolboxconfiguration.hxx
deleted file mode 100755
index 0c0e1949be..0000000000
--- a/framework/inc/classes/toolboxconfiguration.hxx
+++ /dev/null
@@ -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_
diff --git a/framework/inc/classes/toolboxconfigurationdefines.hxx b/framework/inc/classes/toolboxconfigurationdefines.hxx
deleted file mode 100644
index 842c59be16..0000000000
--- a/framework/inc/classes/toolboxconfigurationdefines.hxx
+++ /dev/null
@@ -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
diff --git a/framework/inc/classes/toolboxdocumenthandler.hxx b/framework/inc/classes/toolboxdocumenthandler.hxx
deleted file mode 100755
index 3db49370e5..0000000000
--- a/framework/inc/classes/toolboxdocumenthandler.hxx
+++ /dev/null
@@ -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
diff --git a/framework/inc/classes/toolboxlayoutdocumenthandler.hxx b/framework/inc/classes/toolboxlayoutdocumenthandler.hxx
deleted file mode 100644
index 2c02e806da..0000000000
--- a/framework/inc/classes/toolboxlayoutdocumenthandler.hxx
+++ /dev/null
@@ -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
diff --git a/framework/inc/helper/dockingareadefaultacceptor.hxx b/framework/inc/helper/dockingareadefaultacceptor.hxx
index 9ca23ce518..13133a408d 100644
--- a/framework/inc/helper/dockingareadefaultacceptor.hxx
+++ b/framework/inc/helper/dockingareadefaultacceptor.hxx
@@ -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:
@@ -93,13 +91,6 @@ class DockingAreaDefaultAcceptor : public css::lang::XTypeProvider
virtual ~DockingAreaDefaultAcceptor();
//---------------------------------------------------------------------------------------------------------
- // XInterface
- //---------------------------------------------------------------------------------------------------------
-
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
-
- //---------------------------------------------------------------------------------------------------------
// XDockingAreaAcceptor
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx
index 1d9df9caa4..435b87a4f2 100644
--- a/framework/inc/helper/mischelper.hxx
+++ b/framework/inc/helper/mischelper.hxx
@@ -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
diff --git a/framework/inc/helper/ocomponentaccess.hxx b/framework/inc/helper/ocomponentaccess.hxx
index 12c10f38b8..5d7ee6e1be 100644
--- a/framework/inc/helper/ocomponentaccess.hxx
+++ b/framework/inc/helper/ocomponentaccess.hxx
@@ -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
@@ -123,13 +121,6 @@ class OComponentAccess : public css::lang::XTypeProvider ,
OComponentAccess( const css::uno::Reference< css::frame::XDesktop >& xOwner );
//---------------------------------------------------------------------------------------------------------
- // XInterface
- //---------------------------------------------------------------------------------------------------------
-
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
-
- //---------------------------------------------------------------------------------------------------------
// XEnumerationAccess
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/helper/ocomponentenumeration.hxx b/framework/inc/helper/ocomponentenumeration.hxx
index 78cb1be408..bdb031413b 100644
--- a/framework/inc/helper/ocomponentenumeration.hxx
+++ b/framework/inc/helper/ocomponentenumeration.hxx
@@ -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
@@ -120,13 +117,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
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/helper/oframes.hxx b/framework/inc/helper/oframes.hxx
index eaf35a3df2..2e16c8f716 100644
--- a/framework/inc/helper/oframes.hxx
+++ b/framework/inc/helper/oframes.hxx
@@ -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
@@ -125,13 +123,6 @@ class OFrames : public css::lang::XTypeProvider ,
FrameContainer* pFrameContainer );
//---------------------------------------------------------------------------------------------------------
- // XInterface
- //---------------------------------------------------------------------------------------------------------
-
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
-
- //---------------------------------------------------------------------------------------------------------
// XFrames
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/helper/opluginframedispatcher.hxx b/framework/inc/helper/opluginframedispatcher.hxx
index 226a8cc4aa..c3000e67a4 100644
--- a/framework/inc/helper/opluginframedispatcher.hxx
+++ b/framework/inc/helper/opluginframedispatcher.hxx
@@ -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
@@ -144,12 +141,6 @@ class OPlugInFrameDispatcher : public css::frame::XDispatchProvider ,
const css::uno::Reference< css::mozilla::XPluginInstancePeer >& xPlugInDLL );
//---------------------------------------------------------------------------------------------------------
- // XInterface
- //---------------------------------------------------------------------------------------------------------
-
- DECLARE_XINTERFACE
-
- //---------------------------------------------------------------------------------------------------------
// XDispatchProvider
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/helper/popupmenucontrollerbase.hxx b/framework/inc/helper/popupmenucontrollerbase.hxx
index 0c7c04e3dd..18bc9c29d9 100644
--- a/framework/inc/helper/popupmenucontrollerbase.hxx
+++ b/framework/inc/helper/popupmenucontrollerbase.hxx
@@ -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
};
diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx
index 7159af4970..cffe6f6777 100644
--- a/framework/inc/helper/uiconfigelementwrapperbase.hxx
+++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx
@@ -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;
diff --git a/framework/inc/interaction/preventduplicateinteraction.hxx b/framework/inc/interaction/preventduplicateinteraction.hxx
index 2443ec3eec..5ba991bf32 100644
--- a/framework/inc/interaction/preventduplicateinteraction.hxx
+++ b/framework/inc/interaction/preventduplicateinteraction.hxx
@@ -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.
diff --git a/framework/inc/jobs/helponstartup.hxx b/framework/inc/jobs/helponstartup.hxx
index e954964a69..c8df521a65 100644
--- a/framework/inc/jobs/helponstartup.hxx
+++ b/framework/inc/jobs/helponstartup.hxx
@@ -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
diff --git a/framework/inc/jobs/shelljob.hxx b/framework/inc/jobs/shelljob.hxx
index 956290cd7d..68d5136da3 100644
--- a/framework/inc/jobs/shelljob.hxx
+++ b/framework/inc/jobs/shelljob.hxx
@@ -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
diff --git a/framework/inc/macros/debug/memorymeasure.hxx b/framework/inc/macros/debug/memorymeasure.hxx
index 0de0204285..19d510fae9 100644
--- a/framework/inc/macros/debug/memorymeasure.hxx
+++ b/framework/inc/macros/debug/memorymeasure.hxx
@@ -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;
diff --git a/framework/inc/macros/xserviceinfo.hxx b/framework/inc/macros/xserviceinfo.hxx
index 5f71fb01d7..ee2880a554 100644
--- a/framework/inc/macros/xserviceinfo.hxx
+++ b/framework/inc/macros/xserviceinfo.hxx
@@ -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!!! */ \
diff --git a/framework/inc/mediadescriptor.h b/framework/inc/mediadescriptor.h
index 356e320e65..8daf743e76 100644
--- a/framework/inc/mediadescriptor.h
+++ b/framework/inc/mediadescriptor.h
@@ -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
diff --git a/framework/inc/services.h b/framework/inc/services.h
index ac9dde220e..5d3d248b3c 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -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" )
diff --git a/framework/inc/services/dispatchhelper.hxx b/framework/inc/services/dispatchhelper.hxx
index d6bae3833a..7708a8944f 100644
--- a/framework/inc/services/dispatchhelper.hxx
+++ b/framework/inc/services/dispatchhelper.hxx
@@ -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
//---------------------------------------
diff --git a/framework/inc/services/frameloaderfactory.hxx b/framework/inc/services/frameloaderfactory.hxx
index 10e026b244..41945500f2 100644
--- a/framework/inc/services/frameloaderfactory.hxx
+++ b/framework/inc/services/frameloaderfactory.hxx
@@ -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
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/services/mediatypedetectionhelper.hxx b/framework/inc/services/mediatypedetectionhelper.hxx
index 6b710e2189..f8f5996f37 100644
--- a/framework/inc/services/mediatypedetectionhelper.hxx
+++ b/framework/inc/services/mediatypedetectionhelper.hxx
@@ -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
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/services/menudocumenthandler.hxx b/framework/inc/services/menudocumenthandler.hxx
deleted file mode 100644
index b59117ff8d..0000000000
--- a/framework/inc/services/menudocumenthandler.hxx
+++ /dev/null
@@ -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_
diff --git a/framework/inc/services/popupmenucontrollerfactory.hxx b/framework/inc/services/popupmenucontrollerfactory.hxx
deleted file mode 100644
index bf1a4ee7c7..0000000000
--- a/framework/inc/services/popupmenucontrollerfactory.hxx
+++ /dev/null
@@ -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_
diff --git a/framework/inc/services/saxnamespacefilter.hxx b/framework/inc/services/saxnamespacefilter.hxx
deleted file mode 100644
index 8aff13ff6f..0000000000
--- a/framework/inc/services/saxnamespacefilter.hxx
+++ /dev/null
@@ -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_
diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx
index 8bd7c9db42..675d16ceb3 100644
--- a/framework/inc/services/substitutepathvars.hxx
+++ b/framework/inc/services/substitutepathvars.hxx
@@ -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
diff --git a/framework/inc/services/uriabbreviation.hxx b/framework/inc/services/uriabbreviation.hxx
index 0b7abc93df..8be2c30dc1 100644
--- a/framework/inc/services/uriabbreviation.hxx
+++ b/framework/inc/services/uriabbreviation.hxx
@@ -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:
diff --git a/framework/inc/services/urltransformer.hxx b/framework/inc/services/urltransformer.hxx
index ce0ce27635..df7b69dc91 100644
--- a/framework/inc/services/urltransformer.hxx
+++ b/framework/inc/services/urltransformer.hxx
@@ -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
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/tabwin/tabwinfactory.hxx b/framework/inc/tabwin/tabwinfactory.hxx
index 46c62d177f..28b2098943 100644
--- a/framework/inc/tabwin/tabwinfactory.hxx
+++ b/framework/inc/tabwin/tabwinfactory.hxx
@@ -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);
diff --git a/framework/inc/uiconfiguration/imagemanager.hxx b/framework/inc/uiconfiguration/imagemanager.hxx
index 997826b10a..b7326f7e11 100644
--- a/framework/inc/uiconfiguration/imagemanager.hxx
+++ b/framework/inc/uiconfiguration/imagemanager.hxx
@@ -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;
};
}
diff --git a/framework/inc/uiconfiguration/moduleimagemanager.hxx b/framework/inc/uiconfiguration/moduleimagemanager.hxx
index b19ff34bb3..5e24d2a377 100644
--- a/framework/inc/uiconfiguration/moduleimagemanager.hxx
+++ b/framework/inc/uiconfiguration/moduleimagemanager.hxx
@@ -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
- {
- 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();
+ class ImageManagerImpl;
- 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
+ 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:
- 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();
-
- // Í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;
};
}
diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
index 05fd57f3d8..37584d5a3b 100644
--- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
@@ -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;
};
}
diff --git a/framework/inc/uiconfiguration/uicategorydescription.hxx b/framework/inc/uiconfiguration/uicategorydescription.hxx
index 825dff1145..0990715390 100644
--- a/framework/inc/uiconfiguration/uicategorydescription.hxx
+++ b/framework/inc/uiconfiguration/uicategorydescription.hxx
@@ -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
diff --git a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
index 66ebbd0f13..d907d64c83 100644
--- a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
@@ -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;
};
}
diff --git a/framework/inc/uiconfiguration/windowstateconfiguration.hxx b/framework/inc/uiconfiguration/windowstateconfiguration.hxx
index a4aba0a402..7d78e981dc 100644
--- a/framework/inc/uiconfiguration/windowstateconfiguration.hxx
+++ b/framework/inc/uiconfiguration/windowstateconfiguration.hxx
@@ -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 );
diff --git a/framework/inc/uielement/comboboxtoolbarcontroller.hxx b/framework/inc/uielement/comboboxtoolbarcontroller.hxx
index 48943f23b9..ffa2d64810 100644
--- a/framework/inc/uielement/comboboxtoolbarcontroller.hxx
+++ b/framework/inc/uielement/comboboxtoolbarcontroller.hxx
@@ -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;
diff --git a/framework/inc/uielement/complextoolbarcontroller.hxx b/framework/inc/uielement/complextoolbarcontroller.hxx
index 97e13c60ab..1c120fe71e 100644
--- a/framework/inc/uielement/complextoolbarcontroller.hxx
+++ b/framework/inc/uielement/complextoolbarcontroller.hxx
@@ -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();
diff --git a/framework/inc/uielement/controlmenucontroller.hxx b/framework/inc/uielement/controlmenucontroller.hxx
index 6f1802fd15..1ab4391ddf 100644
--- a/framework/inc/uielement/controlmenucontroller.hxx
+++ b/framework/inc/uielement/controlmenucontroller.hxx
@@ -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,
diff --git a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx
index 8efa6c2848..a5002ec624 100644
--- a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx
+++ b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx
@@ -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;
diff --git a/framework/inc/uielement/edittoolbarcontroller.hxx b/framework/inc/uielement/edittoolbarcontroller.hxx
index a81c0d82b5..385f5cc6f4 100644
--- a/framework/inc/uielement/edittoolbarcontroller.hxx
+++ b/framework/inc/uielement/edittoolbarcontroller.hxx
@@ -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;
diff --git a/framework/inc/uielement/fontmenucontroller.hxx b/framework/inc/uielement/fontmenucontroller.hxx
index ec315fe6e7..4746d09d97 100644
--- a/framework/inc/uielement/fontmenucontroller.hxx
+++ b/framework/inc/uielement/fontmenucontroller.hxx
@@ -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;
diff --git a/framework/inc/uielement/fontsizemenucontroller.hxx b/framework/inc/uielement/fontsizemenucontroller.hxx
index 2367d7c6ac..b111a02c35 100644
--- a/framework/inc/uielement/fontsizemenucontroller.hxx
+++ b/framework/inc/uielement/fontsizemenucontroller.hxx
@@ -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 );
diff --git a/framework/inc/uielement/footermenucontroller.hxx b/framework/inc/uielement/footermenucontroller.hxx
index 48bef39df0..e4669aa236 100644
--- a/framework/inc/uielement/footermenucontroller.hxx
+++ b/framework/inc/uielement/footermenucontroller.hxx
@@ -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 );
};
}
diff --git a/framework/inc/uielement/headermenucontroller.hxx b/framework/inc/uielement/headermenucontroller.hxx
index f4e1d2c1dc..8440d5f706 100644
--- a/framework/inc/uielement/headermenucontroller.hxx
+++ b/framework/inc/uielement/headermenucontroller.hxx
@@ -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;
};
}
diff --git a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx
index b621822e76..ce92d25d3b 100644
--- a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx
+++ b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx
@@ -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 );
diff --git a/framework/inc/uielement/itemcontainer.hxx b/framework/inc/uielement/itemcontainer.hxx
index a4c48ba95a..e1933851c0 100644
--- a/framework/inc/uielement/itemcontainer.hxx
+++ b/framework/inc/uielement/itemcontainer.hxx
@@ -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();
diff --git a/framework/inc/uielement/langselectionmenucontroller.hxx b/framework/inc/uielement/langselectionmenucontroller.hxx
index 505706d489..fcd250a37f 100644
--- a/framework/inc/uielement/langselectionmenucontroller.hxx
+++ b/framework/inc/uielement/langselectionmenucontroller.hxx
@@ -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,
diff --git a/framework/inc/uielement/langselectionstatusbarcontroller.hxx b/framework/inc/uielement/langselectionstatusbarcontroller.hxx
index 9cba647195..a4862b5b5e 100644
--- a/framework/inc/uielement/langselectionstatusbarcontroller.hxx
+++ b/framework/inc/uielement/langselectionstatusbarcontroller.hxx
@@ -87,7 +87,8 @@ class LangSelectionStatusbarController : public svt::StatusbarController
virtual ~LangSelectionStatusbarController() {}
LangSelectionStatusbarController(LangSelectionStatusbarController &); // not defined
void operator =(LangSelectionStatusbarController &); // not defined
-
+
+
sal_Bool m_bShowMenu;
sal_Int16 m_nScriptType;
::rtl::OUString m_aCurrentLanguage;
diff --git a/framework/inc/uielement/macrosmenucontroller.hxx b/framework/inc/uielement/macrosmenucontroller.hxx
index 8d4c048104..8d5b3e14f1 100644
--- a/framework/inc/uielement/macrosmenucontroller.hxx
+++ b/framework/inc/uielement/macrosmenucontroller.hxx
@@ -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 );
diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx
index 7fba779a5e..0832686000 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -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;
diff --git a/framework/inc/uielement/menubarwrapper.hxx b/framework/inc/uielement/menubarwrapper.hxx
index 48596269aa..f10c66afe5 100644
--- a/framework/inc/uielement/menubarwrapper.hxx
+++ b/framework/inc/uielement/menubarwrapper.hxx
@@ -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;
};
diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx
index 8f8c265b59..bdeb5bc871 100644
--- a/framework/inc/uielement/newmenucontroller.hxx
+++ b/framework/inc/uielement/newmenucontroller.hxx
@@ -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>
//_________________________________________________________________________________________________________________
@@ -83,11 +82,7 @@ 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;
diff --git a/framework/inc/uielement/objectmenucontroller.hxx b/framework/inc/uielement/objectmenucontroller.hxx
index 18f7f3473c..671a9f9a80 100644
--- a/framework/inc/uielement/objectmenucontroller.hxx
+++ b/framework/inc/uielement/objectmenucontroller.hxx
@@ -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;
};
diff --git a/framework/inc/uielement/recentfilesmenucontroller.hxx b/framework/inc/uielement/recentfilesmenucontroller.hxx
index f9a32b3944..8c646c9e6e 100644
--- a/framework/inc/uielement/recentfilesmenucontroller.hxx
+++ b/framework/inc/uielement/recentfilesmenucontroller.hxx
@@ -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;
diff --git a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx
index 96193f88ec..d7b73e1f5c 100644
--- a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx
+++ b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx
@@ -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 );
diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx
index 70772b5476..bcda17c17a 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -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;
diff --git a/framework/inc/uielement/statusbarwrapper.hxx b/framework/inc/uielement/statusbarwrapper.hxx
index 3f07d89271..26663ace26 100644
--- a/framework/inc/uielement/statusbarwrapper.hxx
+++ b/framework/inc/uielement/statusbarwrapper.hxx
@@ -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
diff --git a/framework/inc/uielement/statusindicatorinterfacewrapper.hxx b/framework/inc/uielement/statusindicatorinterfacewrapper.hxx
index 5101f74716..940fe8f1b2 100644
--- a/framework/inc/uielement/statusindicatorinterfacewrapper.hxx
+++ b/framework/inc/uielement/statusindicatorinterfacewrapper.hxx
@@ -51,28 +51,20 @@
// 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
//---------------------------------------------------------------------------------------------------------
virtual void SAL_CALL start ( const ::rtl::OUString& sText ,
diff --git a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx
index 253eb42bdc..218d7d1f17 100644
--- a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx
+++ b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx
@@ -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 *);
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index a6e991d4e8..9f1c2cdaaa 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -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;
diff --git a/framework/inc/uielement/toolbarsmenucontroller.hxx b/framework/inc/uielement/toolbarsmenucontroller.hxx
index 653152a38f..22196995c7 100644
--- a/framework/inc/uielement/toolbarsmenucontroller.hxx
+++ b/framework/inc/uielement/toolbarsmenucontroller.hxx
@@ -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;
diff --git a/framework/inc/uielement/toolbarwrapper.hxx b/framework/inc/uielement/toolbarwrapper.hxx
index 67f43915af..342a19ad9a 100644
--- a/framework/inc/uielement/toolbarwrapper.hxx
+++ b/framework/inc/uielement/toolbarwrapper.hxx
@@ -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;
};
diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx
index d9fdd86149..0e72cec566 100644
--- a/framework/inc/uielement/uicommanddescription.hxx
+++ b/framework/inc/uielement/uicommanddescription.hxx
@@ -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;
diff --git a/framework/inc/uifactory/addonstoolboxfactory.hxx b/framework/inc/uifactory/addonstoolboxfactory.hxx
index 7bcc93d0e0..4953f2076a 100644
--- a/framework/inc/uifactory/addonstoolboxfactory.hxx
+++ b/framework/inc/uifactory/addonstoolboxfactory.hxx
@@ -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 );
diff --git a/framework/inc/uifactory/factoryconfiguration.hxx b/framework/inc/uifactory/factoryconfiguration.hxx
new file mode 100755
index 0000000000..7c5dd1d340
--- /dev/null
+++ b/framework/inc/uifactory/factoryconfiguration.hxx
@@ -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_
diff --git a/framework/inc/uifactory/menubarfactory.hxx b/framework/inc/uifactory/menubarfactory.hxx
index db0177e4a0..2895bbcaba 100644
--- a/framework/inc/uifactory/menubarfactory.hxx
+++ b/framework/inc/uifactory/menubarfactory.hxx
@@ -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;
};
diff --git a/framework/inc/uifactory/popupmenucontrollerfactory.hxx b/framework/inc/uifactory/popupmenucontrollerfactory.hxx
index 98e707e05e..3d9a47641c 100644
--- a/framework/inc/uifactory/popupmenucontrollerfactory.hxx
+++ b/framework/inc/uifactory/popupmenucontrollerfactory.hxx
@@ -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
diff --git a/framework/inc/uifactory/statusbarcontrollerfactory.hxx b/framework/inc/uifactory/statusbarcontrollerfactory.hxx
index f3149d242b..c797771a6d 100644
--- a/framework/inc/uifactory/statusbarcontrollerfactory.hxx
+++ b/framework/inc/uifactory/statusbarcontrollerfactory.hxx
@@ -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
diff --git a/framework/inc/uifactory/statusbarfactory.hxx b/framework/inc/uifactory/statusbarfactory.hxx
index d168801cfd..b586e10a27 100644
--- a/framework/inc/uifactory/statusbarfactory.hxx
+++ b/framework/inc/uifactory/statusbarfactory.hxx
@@ -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;
};
}
diff --git a/framework/inc/uifactory/toolbarcontrollerfactory.hxx b/framework/inc/uifactory/toolbarcontrollerfactory.hxx
index 32830c67c6..f36a6a59f5 100644
--- a/framework/inc/uifactory/toolbarcontrollerfactory.hxx
+++ b/framework/inc/uifactory/toolbarcontrollerfactory.hxx
@@ -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
diff --git a/framework/inc/uifactory/toolboxfactory.hxx b/framework/inc/uifactory/toolboxfactory.hxx
index a917b6535c..59f9f984f6 100644
--- a/framework/inc/uifactory/toolboxfactory.hxx
+++ b/framework/inc/uifactory/toolboxfactory.hxx
@@ -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;
};
}
diff --git a/framework/inc/uifactory/uielementfactorymanager.hxx b/framework/inc/uifactory/uielementfactorymanager.hxx
index d4d1519674..046062c388 100644
--- a/framework/inc/uifactory/uielementfactorymanager.hxx
+++ b/framework/inc/uifactory/uielementfactorymanager.hxx
@@ -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
diff --git a/framework/inc/uifactory/windowcontentfactorymanager.hxx b/framework/inc/uifactory/windowcontentfactorymanager.hxx
index 69dd2d3e8a..225e03e5fc 100644
--- a/framework/inc/uifactory/windowcontentfactorymanager.hxx
+++ b/framework/inc/uifactory/windowcontentfactorymanager.hxx
@@ -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);
- private:
- void RetrieveTypeNameFromResourceURL( const ::rtl::OUString& aResourceURL, rtl::OUString& aType, rtl::OUString& aName );
+ static void RetrieveTypeNameFromResourceURL( const ::rtl::OUString& aResourceURL, rtl::OUString& aType, rtl::OUString& aName );
+ private:
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
diff --git a/framework/inc/xml/eventsdocumenthandler.hxx b/framework/inc/xml/eventsdocumenthandler.hxx
index c34411c8cd..44f87697b6 100644
--- a/framework/inc/xml/eventsdocumenthandler.hxx
+++ b/framework/inc/xml/eventsdocumenthandler.hxx
@@ -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::XDocumentH
};
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::XDocumentH
throw( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
+ protected:
+ virtual ~OReadEventsDocumentHandler();
+
private:
::rtl::OUString getErrorLineString();
diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx
index 7bde7db628..52aa6d8e33 100644
--- a/framework/inc/xml/imagesdocumenthandler.hxx
+++ b/framework/inc/xml/imagesdocumenthandler.hxx
@@ -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,
diff --git a/framework/inc/xml/menudocumenthandler.hxx b/framework/inc/xml/menudocumenthandler.hxx
index 63e109d2df..b6148ca820 100644
--- a/framework/inc/xml/menudocumenthandler.hxx
+++ b/framework/inc/xml/menudocumenthandler.hxx
@@ -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
diff --git a/framework/inc/xml/saxnamespacefilter.hxx b/framework/inc/xml/saxnamespacefilter.hxx
index 4168d52288..1dc04e46fb 100644
--- a/framework/inc/xml/saxnamespacefilter.hxx
+++ b/framework/inc/xml/saxnamespacefilter.hxx
@@ -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,
diff --git a/framework/inc/xml/statusbardocumenthandler.hxx b/framework/inc/xml/statusbardocumenthandler.hxx
index 9e1e2637aa..c27c4e6c4b 100644
--- a/framework/inc/xml/statusbardocumenthandler.hxx
+++ b/framework/inc/xml/statusbardocumenthandler.hxx
@@ -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::XDocume
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,
diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx
index abd14938b7..e903135420 100644
--- a/framework/inc/xml/toolboxdocumenthandler.hxx
+++ b/framework/inc/xml/toolboxdocumenthandler.hxx
@@ -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,
diff --git a/framework/prj/d.lst b/framework/prj/d.lst
index bf7a67d091..a8640138ba 100644
--- a/framework/prj/d.lst
+++ b/framework/prj/d.lst
@@ -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
diff --git a/framework/source/accelerators/acceleratorcache.cxx b/framework/source/accelerators/acceleratorcache.cxx
index c438592153..db62188f83 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -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);
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 20488d8145..7fc92feca1 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -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" );
diff --git a/framework/source/accelerators/acceleratorexecute.cxx b/framework/source/accelerators/acceleratorexecute.cxx
index 91591ed533..a6b0bd7bce 100644
--- a/framework/source/accelerators/acceleratorexecute.cxx
+++ b/framework/source/accelerators/acceleratorexecute.cxx
@@ -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 -> ----------------------------------
diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
index 340ffa56d1..36599063ce 100644
--- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
@@ -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;
diff --git a/framework/source/classes/addonmenu.cxx b/framework/source/classes/addonmenu.cxx
index aac8ba9489..35b61510ce 100644
--- a/framework/source/classes/addonmenu.cxx
+++ b/framework/source/classes/addonmenu.cxx
@@ -39,7 +39,7 @@
#include <general.h>
#include <macros/debug/assertion.hxx>
#include <helper/imageproducer.hxx>
-#include <classes/menuconfiguration.hxx>
+#include <xml/menuconfiguration.hxx>
//_________________________________________________________________________________________________________________
// interface includes
@@ -106,23 +106,12 @@ sal_Bool AddonPopupMenu::IsCommandURLPrefix( const ::rtl::OUString& aCmdURL )
}
AddonPopupMenu::AddonPopupMenu( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame ) :
- m_xFrame( rFrame )
+ AddonMenu( rFrame )
{
}
AddonPopupMenu::~AddonPopupMenu()
{
- for ( USHORT i = 0; i < GetItemCount(); i++ )
- {
- if ( GetItemType( i ) != MENUITEM_SEPARATOR )
- {
- // delete user attributes created with new!
- USHORT nId = GetItemId( i );
- MenuConfiguration::Attributes* pUserAttributes = (MenuConfiguration::Attributes*)GetUserValue( nId );
- delete pUserAttributes;
- delete GetPopupMenu( nId );
- }
- }
}
// ------------------------------------------------------------------------
diff --git a/framework/source/classes/addonsoptions.cxx b/framework/source/classes/addonsoptions.cxx
index 26de1c7b24..b94d47c988 100644
--- a/framework/source/classes/addonsoptions.cxx
+++ b/framework/source/classes/addonsoptions.cxx
@@ -789,7 +789,7 @@ sal_Bool AddonsOptions_Impl::ReadOfficeToolBarSet( AddonToolBars& rAddonOfficeTo
ReadToolBarItemSet( aToolBarItemNode, rAddonOfficeToolBars[n] );
}
- return ( rAddonOfficeToolBars.size() > 0 );
+ return ( !rAddonOfficeToolBars.empty() );
}
diff --git a/framework/source/classes/bmkmenu.cxx b/framework/source/classes/bmkmenu.cxx
index 0e6c269464..3c2d17771d 100644
--- a/framework/source/classes/bmkmenu.cxx
+++ b/framework/source/classes/bmkmenu.cxx
@@ -41,7 +41,7 @@
#include <general.h>
#include <macros/debug/assertion.hxx>
#include <helper/imageproducer.hxx>
-#include <classes/menuconfiguration.hxx>
+#include <xml/menuconfiguration.hxx>
//_________________________________________________________________________________________________________________
// interface includes
@@ -130,15 +130,17 @@ USHORT BmkMenu_Impl::GetMID()
// ------------------------------------------------------------------------
-BmkMenu::BmkMenu( com::sun::star::uno::Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType, BmkMenu* pRoot ) :
- m_nType( nType ), m_xFrame( xFrame )
+BmkMenu::BmkMenu( com::sun::star::uno::Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType, BmkMenu* pRoot )
+ :AddonMenu(xFrame)
+ ,m_nType( nType )
{
_pImp = new BmkMenu_Impl( pRoot );
Initialize();
}
-BmkMenu::BmkMenu( Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType ) :
- m_nType( nType ), m_xFrame( xFrame )
+BmkMenu::BmkMenu( Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType )
+ :AddonMenu(xFrame)
+ ,m_nType( nType )
{
_pImp = new BmkMenu_Impl();
Initialize();
@@ -147,17 +149,6 @@ BmkMenu::BmkMenu( Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType ) :
BmkMenu::~BmkMenu()
{
delete _pImp;
-
- for ( USHORT i = 0; i < GetItemCount(); i++ )
- {
- if ( GetItemType( i ) != MENUITEM_SEPARATOR )
- {
- // delete user attributes created with new!
- USHORT nId = GetItemId( i );
- MenuConfiguration::Attributes* pUserAttributes = (MenuConfiguration::Attributes*)GetUserValue( nId );
- delete pUserAttributes;
- }
- }
}
void BmkMenu::Initialize()
diff --git a/framework/source/classes/framelistanalyzer.cxx b/framework/source/classes/framelistanalyzer.cxx
index bf16a997d0..84b9e97969 100644
--- a/framework/source/classes/framelistanalyzer.cxx
+++ b/framework/source/classes/framelistanalyzer.cxx
@@ -151,8 +151,7 @@ void FrameListAnalyzer::impl_analyze()
(xSet.is() )
)
{
- css::uno::Any aValue = xSet->getPropertyValue(FRAME_PROPNAME_ISHIDDEN);
- aValue >>= m_bReferenceIsHidden;
+ xSet->getPropertyValue(FRAME_PROPNAME_ISHIDDEN) >>= m_bReferenceIsHidden;
}
// check, if the reference frame includes the backing component.
@@ -272,8 +271,7 @@ void FrameListAnalyzer::impl_analyze()
xSet = css::uno::Reference< css::beans::XPropertySet >(xFrame, css::uno::UNO_QUERY);
if (xSet.is())
{
- css::uno::Any aValue = xSet->getPropertyValue(FRAME_PROPNAME_ISHIDDEN);
- aValue >>= bHidden;
+ xSet->getPropertyValue(FRAME_PROPNAME_ISHIDDEN) >>= bHidden;
}
}
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index 8628744fbc..973d3cbdc0 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -33,7 +33,7 @@
#include <classes/fwktabwindow.hxx>
#include "framework.hrc"
-#include <classes/fwkresid.hxx>
+#include <classes/fwlresid.hxx>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XContainerWindowEventHandler.hpp>
@@ -224,9 +224,9 @@ void FwkTabPage::Save()
FwkTabWindow::FwkTabWindow( Window* pParent ) :
- Window( pParent, FwkResId( WIN_TABWINDOW ) ),
+ Window( pParent, FwlResId( WIN_TABWINDOW ) ),
- m_aTabCtrl ( this, FwkResId( TC_TABCONTROL ) )
+ m_aTabCtrl ( this, FwlResId( TC_TABCONTROL ) )
{
uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
m_xWinProvider = uno::Reference < awt::XContainerWindowProvider >(
@@ -365,20 +365,19 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea
{
beans::NamedValue aValue = rProperties[i];
::rtl::OUString sName = aValue.Name;
- uno::Any aAny = aValue.Value;
if ( sName.equalsAscii("Title") )
- aAny >>= sTitle;
+ aValue.Value >>= sTitle;
else if ( sName.equalsAscii("ToolTip") )
- aAny >>= sToolTip;
+ aValue.Value >>= sToolTip;
else if ( sName.equalsAscii("PageURL") )
- aAny >>= sPageURL;
+ aValue.Value >>= sPageURL;
else if ( sName.equalsAscii("EventHdl") )
- aAny >>= xEventHdl;
+ aValue.Value >>= xEventHdl;
else if ( sName.equalsAscii("Image") )
- aAny >>= xImage;
+ aValue.Value >>= xImage;
else if ( sName.equalsAscii("Disabled") )
- aAny >>= bDisabled;
+ aValue.Value >>= bDisabled;
}
TabEntry* pEntry = new TabEntry( nIndex, sPageURL, xEventHdl );
diff --git a/framework/source/classes/fwlresid.cxx b/framework/source/classes/fwlresid.cxx
new file mode 100755
index 0000000000..d8eeb18dee
--- /dev/null
+++ b/framework/source/classes/fwlresid.cxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * 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.cxx,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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_framework.hxx"
+
+#include "classes/fwlresid.hxx"
+#include <tools/string.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+#include <rtl/strbuf.hxx>
+
+namespace framework
+{
+
+ResMgr* FwlResId::GetResManager()
+{
+ static ResMgr* pResMgr = NULL;
+
+ if ( !pResMgr )
+ {
+ rtl::OStringBuffer aBuf( 32 );
+ aBuf.append( "fwe" );
+
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ pResMgr = ResMgr::CreateResMgr( aBuf.getStr() );
+ }
+
+ return pResMgr;
+}
+
+// -----------------------------------------------------------------------
+
+FwlResId::FwlResId( USHORT nId ) :
+ ResId( nId, *FwlResId::GetResManager() )
+{
+}
+
+}
+
diff --git a/framework/source/classes/imagewrapper.cxx b/framework/source/classes/imagewrapper.cxx
index cd57d41895..7e001a9e41 100644
--- a/framework/source/classes/imagewrapper.cxx
+++ b/framework/source/classes/imagewrapper.cxx
@@ -54,7 +54,6 @@ static Sequence< sal_Int8 > impl_getStaticIdentifier()
ImageWrapper::ImageWrapper( const Image& aImage ) : ThreadHelpBase( &Application::GetSolarMutex() )
- , cppu::OWeakObject()
, m_aImage( aImage )
{
}
@@ -70,33 +69,6 @@ Sequence< sal_Int8 > ImageWrapper::GetUnoTunnelId()
return impl_getStaticIdentifier();
}
-
-// XInterface
-void SAL_CALL ImageWrapper::acquire() throw ()
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL ImageWrapper::release() throw ()
-{
- OWeakObject::release();
-}
-
-Any SAL_CALL ImageWrapper::queryInterface( const Type& aType )
-throw ( RuntimeException )
-{
- Any a = ::cppu::queryInterface(
- aType ,
- SAL_STATIC_CAST( com::sun::star::awt::XBitmap*, this ),
- SAL_STATIC_CAST( XUnoTunnel*, this ),
- SAL_STATIC_CAST( XTypeProvider*, this ));
-
- if( a.hasValue() )
- return a;
-
- return OWeakObject::queryInterface( aType );
-}
-
// XBitmap
com::sun::star::awt::Size SAL_CALL ImageWrapper::getSize() throw ( RuntimeException )
{
@@ -147,63 +119,5 @@ sal_Int64 SAL_CALL ImageWrapper::getSomething( const Sequence< sal_Int8 >& aIden
return 0;
}
-// XTypeProvider
-Sequence< Type > SAL_CALL ImageWrapper::getTypes() throw ( RuntimeException )
-{
- // Optimize this method !
- // We initialize a static variable only one time. And we don't must use a mutex at every call!
- // For the first call; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL!
- static ::cppu::OTypeCollection* pTypeCollection = NULL ;
-
- if ( pTypeCollection == NULL )
- {
- // Ready for multithreading; get global mutex for first call of this method only! see before
- osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
-
- // Control these pointer again ... it can be, that another instance will be faster then these!
- if ( pTypeCollection == NULL )
- {
- // Create a static typecollection ...
- static ::cppu::OTypeCollection aTypeCollection(
- ::getCppuType(( const Reference< XTypeProvider >*)NULL ) ,
- ::getCppuType(( const Reference< XUnoTunnel >*)NULL ) ,
- ::getCppuType(( const Reference< com::sun::star::awt::XBitmap >*)NULL ) ) ;
-
- // ... and set his address to static pointer!
- pTypeCollection = &aTypeCollection ;
- }
- }
-
- return pTypeCollection->getTypes() ;
-}
-
-Sequence< sal_Int8 > SAL_CALL ImageWrapper::getImplementationId() throw ( RuntimeException )
-{
- // Create one Id for all instances of this class.
- // Use ethernet address to do this! (sal_True)
-
- // Optimize this method
- // We initialize a static variable only one time. And we don't must use a mutex at every call!
- // For the first call; pID is NULL - for the second call pID is different from NULL!
- static ::cppu::OImplementationId* pID = NULL ;
-
- if ( pID == NULL )
- {
- // Ready for multithreading; get global mutex for first call of this method only! see before
- osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
-
- // Control these pointer again ... it can be, that another instance will be faster then these!
- if ( pID == NULL )
- {
- // Create a new static ID ...
- static ::cppu::OImplementationId aID( sal_False ) ;
- // ... and set his address to static pointer!
- pID = &aID ;
- }
- }
-
- return pID->getImplementationId() ;
-}
-
}
diff --git a/framework/source/classes/makefile.mk b/framework/source/classes/makefile.mk
index a80bf0b87a..c55af1cdf8 100644
--- a/framework/source/classes/makefile.mk
+++ b/framework/source/classes/makefile.mk
@@ -57,6 +57,7 @@ SLOFILES= \
$(SLO)$/addonmenu.obj \
$(SLO)$/addonsoptions.obj \
$(SLO)$/fwkresid.obj \
+ $(SLO)$/fwlresid.obj \
$(SLO)$/framelistanalyzer.obj \
$(SLO)$/sfxhelperfunctions.obj \
$(SLO)$/menuextensionsupplier.obj \
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 88b573bbf0..0527084adb 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -36,14 +36,14 @@
// my own includes
//_________________________________________________________________________________________________________________
#include <classes/menumanager.hxx>
-#include <classes/menuconfiguration.hxx>
+#include <xml/menuconfiguration.hxx>
#include <classes/bmkmenu.hxx>
#include <classes/addonmenu.hxx>
#include <helper/imageproducer.hxx>
#include <threadhelp/resetableguard.hxx>
#include "classes/addonsoptions.hxx"
#include <classes/fwkresid.hxx>
-
+#include <services.h>
#include "classes/resource.hrc"
//_________________________________________________________________________________________________________________
@@ -92,6 +92,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
@@ -122,9 +123,7 @@ namespace framework
#define SID_HELPMENU (SID_SFX_START + 410)
#define SFX_REFERER_USER "private:user"
-#define DESKTOP_SERVICE ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))
-const ::rtl::OUString aSlotString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
const ::rtl::OUString aSlotNewDocDirect( RTL_CONSTASCII_USTRINGPARAM( "slot:5537" ));
const ::rtl::OUString aSlotAutoPilot( RTL_CONSTASCII_USTRINGPARAM( "slot:6381" ));
@@ -146,7 +145,6 @@ MenuManager::MenuManager(
REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
: // #110897#
ThreadHelpBase( &Application::GetSolarMutex() ),
- OWeakObject(),
mxServiceFactory(xServiceFactory)
{
m_bActive = sal_False;
@@ -163,61 +161,30 @@ MenuManager::MenuManager(
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
+#if 0
::std::vector< USHORT > aQueryLabelItemIdVector;
+#endif
USHORT nItemCount = pMenu->GetItemCount();
+ m_aMenuItemHandlerVector.reserve(nItemCount);
+ ::rtl::OUString aItemCommand;
for ( USHORT i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = pMenu->GetItemId( i );
-
- ::rtl::OUString aItemCommand = pMenu->GetItemCommand( nItemId );
- if ( !aItemCommand.getLength() )
- {
- aItemCommand = aSlotString;
- aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)nItemId );
- pMenu->SetItemCommand( nItemId, aItemCommand );
- }
+ USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i );
PopupMenu* pPopupMenu = pMenu->GetPopupMenu( nItemId );
if ( pPopupMenu )
{
- if (( aItemCommand.getLength() > nAddonsURLPrefixLength ) &&
- ( aItemCommand.indexOf( ADDONSPOPUPMENU_URL_PREFIX ) == 0 ))
- {
- // A special addon popup menu, must be created with a different ctor
-
- // #110897#
- // MenuManager* pSubMenuManager = new MenuManager( rFrame, (AddonPopupMenu *)pPopupMenu, bDeleteChildren, bDeleteChildren );
- MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), rFrame, (AddonPopupMenu *)pPopupMenu, bDeleteChildren, bDeleteChildren );
-
- // store menu item command as we later have to know which menu is active (see Activate handler)
- pSubMenuManager->m_aMenuItemCommand = aItemCommand;
-
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
- nItemId,
- pSubMenuManager,
- aXDispatchRef );
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
- }
- else
+ AddMenu(pPopupMenu,aItemCommand,nItemId,bDeleteChildren,bDeleteChildren);
+ if (! (( aItemCommand.getLength() > nAddonsURLPrefixLength ) &&
+ ( aItemCommand.indexOf( ADDONSPOPUPMENU_URL_PREFIX ) == 0 )) )
{
// #110897#
// MenuManager* pSubMenuManager = new MenuManager( rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
- MenuManager* pSubMenuMgr = new MenuManager( getServiceFactory(), rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
-
- // store menu item command as we later have to know which menu is active (see Activate handler)
- pSubMenuMgr->m_aMenuItemCommand = aItemCommand;
-
- REFERENCE< XDISPATCH > aXDispRef;
- MenuItemHandler* pMenuItemHdl = new MenuItemHandler(
- nItemId,
- pSubMenuMgr,
- aXDispRef );
- m_aMenuItemHandlerVector.push_back( pMenuItemHdl );
-
+#if 0
if ( pMenu->GetItemText( nItemId ).Len() == 0 )
aQueryLabelItemIdVector.push_back( nItemId );
+#endif
// Create addon popup menu if there exist elements and this is the tools popup menu
if (( nItemId == SID_ADDONLIST ||
@@ -237,23 +204,18 @@ MenuManager::MenuManager(
pPopupMenu->SetPopupMenu( ITEMID_ADDONLIST, pSubMenu );
// Set item command for popup menu to enable it for GetImageFromURL
+ const static ::rtl::OUString aSlotString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aItemCommand = aSlotString;
aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)ITEMID_ADDONLIST );
pPopupMenu->SetItemCommand( ITEMID_ADDONLIST, aItemCommand );
// #110897#
// MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False );
- MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), rFrame, pSubMenu, sal_True, sal_False );
-
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
- nItemId,
- pSubMenuManager,
- aXDispatchRef );
+ AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False);
+#if 0
if ( pMenu->GetItemText( nItemId ).Len() == 0 )
aQueryLabelItemIdVector.push_back( nItemId );
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
-
+#endif
// Set image for the addon popup menu item
if ( m_bShowMenuImages && !pPopupMenu->GetItemImage( ITEMID_ADDONLIST ))
{
@@ -281,16 +243,11 @@ MenuManager::MenuManager(
// #110897#
// MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False );
- MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), rFrame, pSubMenu, sal_True, sal_False );
-
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
- nItemId,
- pSubMenuManager,
- aXDispatchRef );
+ AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False);
+#if 0
if ( pMenu->GetItemText( nItemId ).Len() == 0 )
aQueryLabelItemIdVector.push_back( nItemId );
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
+#endif
if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId ))
{
@@ -311,16 +268,11 @@ MenuManager::MenuManager(
// #110897#
// MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False );
- MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), rFrame, pSubMenu, sal_True, sal_False );
-
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
- nItemId,
- pSubMenuManager,
- aXDispatchRef );
+ AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False);
+#if 0
if ( pMenu->GetItemText( nItemId ).Len() == 0 )
aQueryLabelItemIdVector.push_back( nItemId );
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
+#endif
if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId ))
{
@@ -368,8 +320,10 @@ MenuManager::MenuManager(
REFERENCE< XDISPATCH > aXDispatchRef;
m_aMenuItemHandlerVector.push_back( new MenuItemHandler( nItemId, NULL, aXDispatchRef ));
+#if 0
if ( pMenu->GetItemText( nItemId ).Len() == 0 )
aQueryLabelItemIdVector.push_back( nItemId );
+#endif
}
}
}
@@ -397,98 +351,15 @@ MenuManager::MenuManager(
}
}
#endif
- m_pVCLMenu->SetHighlightHdl( LINK( this, MenuManager, Highlight ));
- m_pVCLMenu->SetActivateHdl( LINK( this, MenuManager, Activate ));
- m_pVCLMenu->SetDeactivateHdl( LINK( this, MenuManager, Deactivate ));
- m_pVCLMenu->SetSelectHdl( LINK( this, MenuManager, Select ));
-}
-
-
-// #110897#
-MenuManager::MenuManager(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
- REFERENCE< XFRAME >& rFrame, BmkMenu* pBmkMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
-: // #110897#
- ThreadHelpBase( &Application::GetSolarMutex() ),
- OWeakObject(),
- mxServiceFactory(xServiceFactory)
-{
- m_bActive = sal_False;
- m_bDeleteMenu = bDelete;
- m_bDeleteChildren = bDeleteChildren;
- m_pVCLMenu = pBmkMenu;
- m_xFrame = rFrame;
- m_bInitialized = sal_False;
- m_bIsBookmarkMenu = sal_True;
-
- const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
-
- SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
-
- USHORT nItemCount = pBmkMenu->GetItemCount();
- for ( USHORT i = 0; i < nItemCount; i++ )
- {
- USHORT nItemId = pBmkMenu->GetItemId( i );
-
- ::rtl::OUString aItemCommand = pBmkMenu->GetItemCommand( nItemId );
- if ( !aItemCommand.getLength() )
- {
- aItemCommand = aSlotString;
- aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)nItemId );
- pBmkMenu->SetItemCommand( nItemId, aItemCommand );
- }
-
- PopupMenu* pPopupMenu = pBmkMenu->GetPopupMenu( nItemId );
- if ( pPopupMenu )
- {
- // #110897#
- // MenuManager* pSubMenuManager = new MenuManager( rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
- MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
-
- // store menu item command as we later have to know which menu is active (see Acivate handler)
- pSubMenuManager->m_aMenuItemCommand = aItemCommand;
-
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
- nItemId,
- pSubMenuManager,
- aXDispatchRef );
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
- }
- else
- {
- if ( pBmkMenu->GetItemType( i ) != MENUITEM_SEPARATOR )
- {
- MenuConfiguration::Attributes* pBmkAttributes = (MenuConfiguration::Attributes *)(pBmkMenu->GetUserValue( nItemId ));
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler( nItemId, NULL, aXDispatchRef );
-
- if ( pBmkAttributes )
- {
- // read additional attributes from attributes struct and BmkMenu implementation will delete all attributes itself!!
- pMenuItemHandler->aTargetFrame = pBmkAttributes->aTargetFrame;
- }
-
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
- }
- }
- }
-
- m_pVCLMenu->SetHighlightHdl( LINK( this, MenuManager, Highlight ));
- m_pVCLMenu->SetActivateHdl( LINK( this, MenuManager, Activate ));
- m_pVCLMenu->SetDeactivateHdl( LINK( this, MenuManager, Deactivate ));
- m_pVCLMenu->SetSelectHdl( LINK( this, MenuManager, Select ));
+ SetHdl();
}
-
// #110897#
MenuManager::MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
: // #110897#
ThreadHelpBase( &Application::GetSolarMutex() ),
- OWeakObject(),
mxServiceFactory(xServiceFactory)
{
m_bActive = sal_False;
@@ -505,34 +376,18 @@ MenuManager::MenuManager(
SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
USHORT nItemCount = pAddonMenu->GetItemCount();
+ m_aMenuItemHandlerVector.reserve(nItemCount);
+ ::rtl::OUString aItemCommand;
for ( USHORT i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = pAddonMenu->GetItemId( i );
-
- ::rtl::OUString aItemCommand = pAddonMenu->GetItemCommand( nItemId );
- if ( !aItemCommand.getLength() )
- {
- aItemCommand = aSlotString;
- aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)nItemId );
- pAddonMenu->SetItemCommand( nItemId, aItemCommand );
- }
+ USHORT nItemId = FillItemCommand(aItemCommand,pAddonMenu, i );
PopupMenu* pPopupMenu = pAddonMenu->GetPopupMenu( nItemId );
if ( pPopupMenu )
{
// #110897#
// MenuManager* pSubMenuManager = new MenuManager( rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
- MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
-
- // store menu item command as we later have to know which menu is active (see Acivate handler)
- pSubMenuManager->m_aMenuItemCommand = aItemCommand;
-
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
- nItemId,
- pSubMenuManager,
- aXDispatchRef );
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
+ AddMenu(pPopupMenu,aItemCommand,nItemId,bDeleteChildren,bDeleteChildren);
}
else
{
@@ -553,110 +408,27 @@ MenuManager::MenuManager(
}
}
- m_pVCLMenu->SetHighlightHdl( LINK( this, MenuManager, Highlight ));
- m_pVCLMenu->SetActivateHdl( LINK( this, MenuManager, Activate ));
- m_pVCLMenu->SetDeactivateHdl( LINK( this, MenuManager, Deactivate ));
- m_pVCLMenu->SetSelectHdl( LINK( this, MenuManager, Select ));
+ SetHdl();
}
-
-// #110897#
-MenuManager::MenuManager(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
- REFERENCE< XFRAME >& rFrame, AddonPopupMenu* pAddonPopupMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
-: // #110897#
- ThreadHelpBase( &Application::GetSolarMutex() ),
- OWeakObject(),
- mxServiceFactory(xServiceFactory)
+void MenuManager::SetHdl()
{
- m_bActive = sal_False;
- m_bDeleteMenu = bDelete;
- m_bDeleteChildren = bDeleteChildren;
- m_pVCLMenu = pAddonPopupMenu;
- m_xFrame = rFrame;
- m_bInitialized = sal_False;
- m_bIsBookmarkMenu = sal_True;
-
- const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
-
- SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
-
- USHORT nItemCount = pAddonPopupMenu->GetItemCount();
- for ( USHORT i = 0; i < nItemCount; i++ )
- {
- USHORT nItemId = pAddonPopupMenu->GetItemId( i );
-
- ::rtl::OUString aItemCommand = pAddonPopupMenu->GetItemCommand( nItemId );
- if ( !aItemCommand.getLength() )
- {
- aItemCommand = aSlotString;
- aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)nItemId );
- pAddonPopupMenu->SetItemCommand( nItemId, aItemCommand );
- }
-
- PopupMenu* pPopupMenu = pAddonPopupMenu->GetPopupMenu( nItemId );
- if ( pPopupMenu )
- {
- // #110897#
- // MenuManager* pSubMenuManager = new MenuManager( rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
- MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren );
-
- // store menu item command as we later have to know which menu is active (see Acivate handler)
- pSubMenuManager->m_aMenuItemCommand = aItemCommand;
-
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
- nItemId,
- pSubMenuManager,
- aXDispatchRef );
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
- }
- else
- {
- if ( pAddonPopupMenu->GetItemType( i ) != MENUITEM_SEPARATOR )
- {
- MenuConfiguration::Attributes* pAttributes = (MenuConfiguration::Attributes *)(pAddonPopupMenu->GetUserValue( nItemId ));
- REFERENCE< XDISPATCH > aXDispatchRef;
- MenuItemHandler* pMenuItemHandler = new MenuItemHandler( nItemId, NULL, aXDispatchRef );
-
- if ( pAttributes )
- {
- // read additional attributes from attributes struct and BmkMenu implementation will delete all attributes itself!!
- pMenuItemHandler->aTargetFrame = pAttributes->aTargetFrame;
- }
-
- m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
- }
- }
- }
-
m_pVCLMenu->SetHighlightHdl( LINK( this, MenuManager, Highlight ));
m_pVCLMenu->SetActivateHdl( LINK( this, MenuManager, Activate ));
m_pVCLMenu->SetDeactivateHdl( LINK( this, MenuManager, Deactivate ));
m_pVCLMenu->SetSelectHdl( LINK( this, MenuManager, Select ));
-}
-Any SAL_CALL MenuManager::queryInterface( const ::com::sun::star::uno::Type & rType ) throw ( RuntimeException )
-{
- Any a = ::cppu::queryInterface(
- rType ,
- SAL_STATIC_CAST( XSTATUSLISTENER*, this ),
- SAL_STATIC_CAST( XEVENTLISTENER*, this ));
- if ( a.hasValue() )
- return a;
-
- return OWeakObject::queryInterface( rType );
+ if ( mxServiceFactory.is() )
+ m_xURLTransformer.set( mxServiceFactory->createInstance(SERVICENAME_URLTRANSFORMER),UNO_QUERY );
}
-
MenuManager::~MenuManager()
{
std::vector< MenuItemHandler* >::iterator p;
for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
{
MenuItemHandler* pItemHandler = *p;
- pItemHandler->xMenuItemDispatch = REFERENCE< XDISPATCH >();
+ pItemHandler->xMenuItemDispatch.clear();
if ( pItemHandler->pSubMenuManager )
SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)pItemHandler->pSubMenuManager )->release();
delete pItemHandler;
@@ -730,11 +502,7 @@ throw ( RuntimeException )
aTargetURL.Complete = pStatusChangedMenu->aMenuItemURL;
// #110897#
- // REFERENCE< XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
- // rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- REFERENCE< XURLTransformer > xTrans( getServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- xTrans->parseStrict( aTargetURL );
+ m_xURLTransformer->parseStrict( aTargetURL );
REFERENCE< XDISPATCHPROVIDER > xDispatchProvider( m_xFrame, UNO_QUERY );
REFERENCE< XDISPATCH > xMenuItemDispatch = xDispatchProvider->queryDispatch(
@@ -754,16 +522,15 @@ throw ( RuntimeException )
void MenuManager::RemoveListener()
{
ResetableGuard aGuard( m_aLock );
+ ClearMenuDispatch();
+}
+void MenuManager::ClearMenuDispatch(const EVENTOBJECT& Source,bool _bRemoveOnly)
+{
// disposing called from parent dispatcher
// remove all listener to prepare shutdown
// #110897#
- //REFERENCE< XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
- // rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- REFERENCE< XURLTransformer > xTrans( getServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
-
std::vector< MenuItemHandler* >::iterator p;
for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
{
@@ -772,15 +539,20 @@ void MenuManager::RemoveListener()
{
URL aTargetURL;
aTargetURL.Complete = pItemHandler->aMenuItemURL;
- xTrans->parseStrict( aTargetURL );
+ m_xURLTransformer->parseStrict( aTargetURL );
pItemHandler->xMenuItemDispatch->removeStatusListener(
SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL );
}
- pItemHandler->xMenuItemDispatch = REFERENCE< XDISPATCH >();
+ pItemHandler->xMenuItemDispatch.clear();
if ( pItemHandler->pSubMenuManager )
- pItemHandler->pSubMenuManager->RemoveListener();
+ {
+ if ( _bRemoveOnly )
+ pItemHandler->pSubMenuManager->RemoveListener();
+ else
+ pItemHandler->pSubMenuManager->disposing( Source );
+ }
}
}
@@ -790,34 +562,7 @@ void SAL_CALL MenuManager::disposing( const EVENTOBJECT& Source ) throw ( RUNTIM
if ( Source.Source == m_xFrame )
{
ResetableGuard aGuard( m_aLock );
-
- // disposing called from parent dispatcher
- // remove all listener to prepare shutdown
-
- // #110897#
- // REFERENCE< XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
- // rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- REFERENCE< XURLTransformer > xTrans( getServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
-
- std::vector< MenuItemHandler* >::iterator p;
- for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
- {
- MenuItemHandler* pItemHandler = *p;
- if ( pItemHandler->xMenuItemDispatch.is() )
- {
- URL aTargetURL;
- aTargetURL.Complete = pItemHandler->aMenuItemURL;
- xTrans->parseStrict( aTargetURL );
-
- pItemHandler->xMenuItemDispatch->removeStatusListener(
- SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL );
- }
-
- pItemHandler->xMenuItemDispatch = REFERENCE< XDISPATCH >();
- if ( pItemHandler->pSubMenuManager )
- pItemHandler->pSubMenuManager->disposing( Source );
- }
+ ClearMenuDispatch(Source,false);
}
else
{
@@ -844,15 +589,10 @@ void SAL_CALL MenuManager::disposing( const EVENTOBJECT& Source ) throw ( RUNTIM
aTargetURL.Complete = pMenuItemDisposing->aMenuItemURL;
// #110897#
- // REFERENCE< XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
- // rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- REFERENCE< XURLTransformer > xTrans( getServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- xTrans->parseStrict( aTargetURL );
-
- pMenuItemDisposing->xMenuItemDispatch->removeStatusListener(
- SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL );
- pMenuItemDisposing->xMenuItemDispatch = REFERENCE< XDISPATCH >();
+ m_xURLTransformer->parseStrict( aTargetURL );
+
+ pMenuItemDisposing->xMenuItemDispatch->removeStatusListener(SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL );
+ pMenuItemDisposing->xMenuItemDispatch.clear();
}
}
}
@@ -869,6 +609,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
USHORT nPickItemId = START_ITEMID_PICKLIST;
int nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength();
+ aNewPickVector.reserve(nPickListMenuItems);
for ( int i = 0; i < nPickListMenuItems; i++ )
{
Sequence< PropertyValue > aPickListEntry = aHistoryList[i];
@@ -896,19 +637,15 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
aNewPickVector.push_back( pNewMenuItemHandler );
}
- if ( aNewPickVector.size() > 0 )
+ if ( !aNewPickVector.empty() )
{
URL aTargetURL;
REFERENCE< XDISPATCHPROVIDER > xDispatchProvider( m_xFrame, UNO_QUERY );
// #110897#
- // REFERENCE< XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
- // rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- REFERENCE< XURLTransformer > xTrans( getServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
-
REFERENCE< XDISPATCH > xMenuItemDispatch;
+ static const ::rtl::OUString s_sDefault(RTL_CONSTASCII_USTRINGPARAM("_default"));
// query for dispatcher
std::vector< MenuItemHandler* >::iterator p;
for ( p = aNewPickVector.begin(); p != aNewPickVector.end(); p++ )
@@ -916,12 +653,12 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
MenuItemHandler* pMenuItemHandler = *p;
aTargetURL.Complete = pMenuItemHandler->aMenuItemURL;
- xTrans->parseStrict( aTargetURL );
+ m_xURLTransformer->parseStrict( aTargetURL );
if ( !xMenuItemDispatch.is() )
{
// attention: this code assume that "_blank" can only be consumed by desktop service
- xMenuItemDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString::createFromAscii("_default"), 0 );
+ xMenuItemDispatch = xDispatchProvider->queryDispatch( aTargetURL, s_sDefault, 0 );
}
if ( xMenuItemDispatch.is() )
@@ -963,8 +700,10 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
}
// append new picklist menu entries
+ aNewPickVector.reserve(aNewPickVector.size());
pMenu->InsertSeparator();
- for ( sal_uInt32 i = 0; i < aNewPickVector.size(); i++ )
+ const sal_uInt32 nCount = aNewPickVector.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
char menuShortCut[5] = "~n: ";
@@ -1027,17 +766,13 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
}
}
-
-void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu )
+void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XMultiServiceFactory >& xServiceFactory,framework::IMutex& _rMutex )
{
// update window list
::std::vector< ::rtl::OUString > aNewWindowListVector;
// #110897#
- // Reference< XDesktop > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
- // DESKTOP_SERVICE ), UNO_QUERY );
- Reference< XDesktop > xDesktop( getServiceFactory()->createInstance(
- DESKTOP_SERVICE ), UNO_QUERY );
+ Reference< XDesktop > xDesktop( xServiceFactory->createInstance( SERVICENAME_DESKTOP ), UNO_QUERY );
USHORT nActiveItemId = 0;
USHORT nItemId = START_ITEMID_WINDOWLIST;
@@ -1048,11 +783,12 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu )
Reference< XFrame > xCurrentFrame = xDesktop->getCurrentFrame();
Reference< XIndexAccess > xList( xTasksSupplier->getFrames(), UNO_QUERY );
sal_Int32 nCount = xList->getCount();
+ aNewWindowListVector.reserve(nCount);
for (sal_Int32 i=0; i<nCount; ++i )
{
- Any aItem = xList->getByIndex(i);
Reference< XFrame > xFrame;
- aItem >>= xFrame;
+ xList->getByIndex(i) >>= xFrame;
+
if (xFrame.is())
{
if ( xFrame == xCurrentFrame )
@@ -1069,9 +805,9 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu )
}
{
- ResetableGuard aGuard( m_aLock );
+ ResetableGuard aGuard( _rMutex );
- int nItemCount = pMenu->GetItemCount();
+ int nItemCount = pMenu->GetItemCount();
if ( nItemCount > 0 )
{
@@ -1084,12 +820,13 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu )
pMenu->RemoveItem( pMenu->GetItemCount()-1 );
}
- if ( aNewWindowListVector.size() > 0 )
+ if ( !aNewWindowListVector.empty() )
{
// append new window list entries to menu
pMenu->InsertSeparator();
nItemId = START_ITEMID_WINDOWLIST;
- for ( sal_uInt32 i = 0; i < aNewWindowListVector.size(); i++ )
+ const sal_uInt32 nCount = aNewWindowListVector.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
pMenu->InsertItem( nItemId, aNewWindowListVector.at( i ), MIB_RADIOCHECK );
if ( nItemId == nActiveItemId )
@@ -1179,7 +916,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
else if ( m_aMenuItemCommand == aSpecialWindowMenu ||
m_aMenuItemCommand == aSlotSpecialWindowMenu ||
aCommand == aSpecialWindowCommand )
- UpdateSpecialWindowMenu( pMenu );
+ UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
// Check if some modes have changed so we have to update our menu images
sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
@@ -1189,48 +926,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
// The mode changed so we have to replace all images
m_bWasHiContrast = bIsHiContrast;
m_bShowMenuImages = bShowMenuImages;
- AddonsOptions aAddonOptions;
-
- for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ )
- {
- USHORT nId = pMenu->GetItemId( nPos );
- if ( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR )
- {
- if ( bShowMenuImages )
- {
- sal_Bool bImageSet = sal_False;
- ::rtl::OUString aImageId;
-
- ::framework::MenuConfiguration::Attributes* pMenuAttributes =
- (::framework::MenuConfiguration::Attributes*)pMenu->GetUserValue( nId );
-
- if ( pMenuAttributes )
- aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
-
- if ( aImageId.getLength() > 0 )
- {
- Image aImage = GetImageFromURL( m_xFrame, aImageId, FALSE, bIsHiContrast );
- if ( !!aImage )
- {
- bImageSet = sal_True;
- pMenu->SetItemImage( nId, aImage );
- }
- }
-
- if ( !bImageSet )
- {
- rtl::OUString aMenuItemCommand = pMenu->GetItemCommand( nId );
- Image aImage = GetImageFromURL( m_xFrame, aMenuItemCommand, FALSE, bIsHiContrast );
- if ( !aImage )
- aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, FALSE, bIsHiContrast );
-
- pMenu->SetItemImage( nId, aImage );
- }
- }
- else
- pMenu->SetItemImage( nId, Image() );
- }
- }
+ FillMenuImages(m_xFrame,pMenu,bIsHiContrast,bShowMenuImages);
}
if ( m_bInitialized )
@@ -1240,11 +936,6 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
URL aTargetURL;
// #110897#
- // REFERENCE< XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
- // rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- REFERENCE< XURLTransformer > xTrans( getServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
-
ResetableGuard aGuard( m_aLock );
REFERENCE< XDISPATCHPROVIDER > xDispatchProvider( m_xFrame, UNO_QUERY );
@@ -1266,14 +957,15 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
::rtl::OUString aItemCommand = pMenu->GetItemCommand( pMenuItemHandler->nItemId );
if ( !aItemCommand.getLength() )
{
- aItemCommand = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
+ const static ::rtl::OUString aSlotString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
+ aItemCommand = aSlotString;
aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)pMenuItemHandler->nItemId );
pMenu->SetItemCommand( pMenuItemHandler->nItemId, aItemCommand );
}
aTargetURL.Complete = aItemCommand;
- xTrans->parseStrict( aTargetURL );
+ m_xURLTransformer->parseStrict( aTargetURL );
REFERENCE< XDISPATCH > xMenuItemDispatch;
if ( m_bIsBookmarkMenu )
@@ -1330,8 +1022,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu )
// #110897#
// Reference< XFramesSupplier > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
// DESKTOP_SERVICE ), UNO_QUERY );
- Reference< XFramesSupplier > xDesktop( getServiceFactory()->createInstance(
- DESKTOP_SERVICE ), UNO_QUERY );
+ Reference< XFramesSupplier > xDesktop( getServiceFactory()->createInstance( SERVICENAME_DESKTOP ), UNO_QUERY );
if ( xDesktop.is() )
{
@@ -1340,9 +1031,9 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu )
sal_Int32 nCount = xList->getCount();
for ( sal_Int32 i=0; i<nCount; ++i )
{
- Any aItem = xList->getByIndex(i);
Reference< XFrame > xFrame;
- aItem >>= xFrame;
+ xList->getByIndex(i) >>= xFrame;
+
if ( xFrame.is() && nTaskId == nCurItemId )
{
Window* pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
@@ -1360,14 +1051,8 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu )
MenuItemHandler* pMenuItemHandler = GetMenuItemHandler( nCurItemId );
if ( pMenuItemHandler && pMenuItemHandler->xMenuItemDispatch.is() )
{
- // #110897#
- // REFERENCE< XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
- // rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
- REFERENCE< XURLTransformer > xTrans( getServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
-
aTargetURL.Complete = pMenuItemHandler->aMenuItemURL;
- xTrans->parseStrict( aTargetURL );
+ m_xURLTransformer->parseStrict( aTargetURL );
if ( nCurItemId >= START_ITEMID_PICKLIST &&
nCurItemId < START_ITEMID_WINDOWLIST )
@@ -1378,11 +1063,9 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu )
else if ( m_bIsBookmarkMenu )
{
// bookmark menu item selected
- Any a;
aArgs.realloc( 1 );
aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Referer" ));
- a <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SFX_REFERER_USER ));
- aArgs[0].Value = a;
+ aArgs[0].Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SFX_REFERER_USER ));
}
xDispatch = pMenuItemHandler->xMenuItemDispatch;
@@ -1410,4 +1093,78 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFac
return mxServiceFactory;
}
+void MenuManager::AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,USHORT _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren)
+{
+ MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), m_xFrame, _pPopupMenu, _bDelete, _bDeleteChildren );
+
+ // store menu item command as we later have to know which menu is active (see Activate handler)
+ pSubMenuManager->m_aMenuItemCommand = _sItemCommand;
+
+ REFERENCE< XDISPATCH > aXDispatchRef;
+ MenuItemHandler* pMenuItemHandler = new MenuItemHandler(
+ _nItemId,
+ pSubMenuManager,
+ aXDispatchRef );
+ m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
+}
+
+USHORT MenuManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const
+{
+ USHORT nItemId = _pMenu->GetItemId( _nIndex );
+
+ _rItemCommand = _pMenu->GetItemCommand( nItemId );
+ if ( !_rItemCommand.getLength() )
+ {
+ const static ::rtl::OUString aSlotString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
+ _rItemCommand = aSlotString;
+ _rItemCommand += ::rtl::OUString::valueOf( (sal_Int32)nItemId );
+ _pMenu->SetItemCommand( nItemId, _rItemCommand );
+ }
+ return nItemId;
+}
+void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_Bool bIsHiContrast,sal_Bool bShowMenuImages)
+{
+ AddonsOptions aAddonOptions;
+
+ for ( USHORT nPos = 0; nPos < _pMenu->GetItemCount(); nPos++ )
+ {
+ USHORT nId = _pMenu->GetItemId( nPos );
+ if ( _pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR )
+ {
+ if ( bShowMenuImages )
+ {
+ sal_Bool bImageSet = sal_False;
+ ::rtl::OUString aImageId;
+
+ ::framework::MenuConfiguration::Attributes* pMenuAttributes =
+ (::framework::MenuConfiguration::Attributes*)_pMenu->GetUserValue( nId );
+
+ if ( pMenuAttributes )
+ aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
+
+ if ( aImageId.getLength() > 0 )
+ {
+ Image aImage = GetImageFromURL( _xFrame, aImageId, FALSE, bIsHiContrast );
+ if ( !!aImage )
+ {
+ bImageSet = sal_True;
+ _pMenu->SetItemImage( nId, aImage );
+ }
+ }
+
+ if ( !bImageSet )
+ {
+ rtl::OUString aMenuItemCommand = _pMenu->GetItemCommand( nId );
+ Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, FALSE, bIsHiContrast );
+ if ( !aImage )
+ aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, FALSE, bIsHiContrast );
+
+ _pMenu->SetItemImage( nId, aImage );
+ }
+ }
+ else
+ _pMenu->SetItemImage( nId, Image() );
+ }
+ }
+}
}
diff --git a/framework/source/classes/propertysethelper.cxx b/framework/source/classes/propertysethelper.cxx
index 40bb50cec8..5e1c2d5604 100644
--- a/framework/source/classes/propertysethelper.cxx
+++ b/framework/source/classes/propertysethelper.cxx
@@ -301,8 +301,7 @@ css::uno::Any SAL_CALL PropertySetHelper::getPropertyValue(const ::rtl::OUString
// <- SAFE
}
- css::uno::Any aValue = impl_getPropertyValue(aPropInfo.Name, aPropInfo.Handle);
- return aValue;
+ return impl_getPropertyValue(aPropInfo.Name, aPropInfo.Handle);
}
//-----------------------------------------------------------------------------
diff --git a/framework/source/classes/protocolhandlercache.cxx b/framework/source/classes/protocolhandlercache.cxx
index 1b05108568..3a1c4131c5 100644
--- a/framework/source/classes/protocolhandlercache.cxx
+++ b/framework/source/classes/protocolhandlercache.cxx
@@ -56,6 +56,7 @@
//_________________________________________________________________________________________________________________
#include <tools/wldcrd.hxx>
#include <unotools/configpathes.hxx>
+#include <rtl/ustrbuf.hxx>
//_________________________________________________________________________________________________________________
// namespace
@@ -299,15 +300,13 @@ void HandlerCFGAccess::read( HandlerHash** ppHandler ,
sal_Int32 nTarget=0;
for( nSource=0; nSource<nSourceCount; ++nSource )
{
- ::rtl::OUString sPath;
+ ::rtl::OUStringBuffer sPath( SETNAME_HANDLER );
+ sPath.append(CFG_PATH_SEPERATOR);
+ sPath.append(lNames[nSource]);
+ sPath.append(CFG_PATH_SEPERATOR);
+ sPath.append(PROPERTY_PROTOCOLS);
- sPath = SETNAME_HANDLER ;
- sPath += CFG_PATH_SEPERATOR ;
- sPath += lNames[nSource] ;
- sPath += CFG_PATH_SEPERATOR ;
-
- lFullNames[nTarget] = sPath;
- lFullNames[nTarget] += PROPERTY_PROTOCOLS;
+ lFullNames[nTarget] = sPath.makeStringAndClear();
++nTarget;
}
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 3471a22b86..2ab4e33b50 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -127,8 +127,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const ::rtl::
( TargetHelper::matchSpecialTarget(sName, TargetHelper::E_DEFAULT) )
)
{
- css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(xSMGR, PACKAGE, RELPATH, KEY, ::comphelper::ConfigurationHelper::E_READONLY);
- aVal >>= sCreator;
+ ::comphelper::ConfigurationHelper::readDirectKey(xSMGR, PACKAGE, RELPATH, KEY, ::comphelper::ConfigurationHelper::E_READONLY) >>= sCreator;
}
xCreator = css::uno::Reference< css::lang::XSingleServiceFactory >(
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index a35e3d2512..f93613bcf9 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -46,11 +46,8 @@
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/CommandGroup.hpp>
-
-#ifndef __COM_SUN_STAR_AWT_XTOPWINDOW_HPP_
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
-#endif
-
#include "com/sun/star/beans/XFastPropertySet.hpp"
#include <toolkit/helper/vclunohelper.hxx>
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index b48a6568db..1bb33a3350 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -185,7 +185,7 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css:
// a) no interceptor at all - set this instance as master for given interceptor
// and set our slave as it's slave - and put this interceptor to the list.
// It's place there doesn matter. Because this list is currently empty.
- if (m_lInterceptionRegs.size()<1)
+ if (m_lInterceptionRegs.empty())
{
xInterceptor->setMasterDispatchProvider(xThis );
xInterceptor->setSlaveDispatchProvider (m_xSlave);
@@ -333,7 +333,7 @@ void SAL_CALL InterceptionHelper::disposing(const css::lang::EventObject& aEvent
#if OSL_DEBUG_LEVEL > 0
// SAFE ->
aReadLock.lock();
- if (m_lInterceptionRegs.size() > 0)
+ if (!m_lInterceptionRegs.empty() )
OSL_ENSURE(sal_False, "There are some pending interceptor objects, which seams to be registered during (!) the destruction of a frame.");
aReadLock.unlock();
// <- SAFE
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index 43c0da312d..5fd964341d 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -36,8 +36,9 @@
//_________________________________________________________________________________________________________________
#include <dispatch/menudispatcher.hxx>
#include <general.h>
-#include <classes/menuconfiguration.hxx>
+#include <xml/menuconfiguration.hxx>
#include <classes/addonmenu.hxx>
+#include <services.h>
//_________________________________________________________________________________________________________________
// interface includes
@@ -62,6 +63,7 @@
#include <tools/rcid.h>
#include <vos/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <rtl/logfile.hxx>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -388,7 +390,7 @@ IMPL_LINK( MenuDispatcher, Close_Impl, void*, EMPTYARG )
css::util::URL aURL;
aURL.Complete = ::rtl::OUString::createFromAscii(".uno:CloseWin");
css::uno::Reference< css::util::XURLTransformer > xTrans ( m_xFactory->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer") ), css::uno::UNO_QUERY );
+ SERVICENAME_URLTRANSFORMER ), css::uno::UNO_QUERY );
if( xTrans.is() )
{
// Datei laden
diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx
index 73b94f43bb..507f6a998f 100644
--- a/framework/source/dispatch/popupmenudispatcher.cxx
+++ b/framework/source/dispatch/popupmenudispatcher.cxx
@@ -37,7 +37,7 @@
#include <dispatch/popupmenudispatcher.hxx>
#include <general.h>
-#include <classes/menuconfiguration.hxx>
+#include <xml/menuconfiguration.hxx>
#include <classes/addonmenu.hxx>
#include <services.h>
#include <properties.h>
@@ -241,8 +241,7 @@ throw( css::uno::RuntimeException )
css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider;
// Find popup menu controller using the base URL
- Any a = xPopupCtrlQuery->getByName( aBaseURL );
- a >>= xDispatchProvider;
+ xPopupCtrlQuery->getByName( aBaseURL ) >>= xDispatchProvider;
aGuard.unlock();
// Ask popup menu dispatch provider for dispatch object
@@ -384,8 +383,7 @@ void PopupMenuDispatcher::impl_RetrievePopupControllerQuery()
{
try
{
- Any a = xPropSet->getPropertyValue( FRAME_PROPNAME_LAYOUTMANAGER );
- a >>= xLayoutManager;
+ xPropSet->getPropertyValue( FRAME_PROPNAME_LAYOUTMANAGER ) >>= xLayoutManager;
if ( xLayoutManager.is() )
{
diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx
index 6eb340ccb2..531d6807ee 100755
--- a/framework/source/dispatch/windowcommanddispatch.cxx
+++ b/framework/source/dispatch/windowcommanddispatch.cxx
@@ -55,6 +55,7 @@
#include <vcl/cmdevt.hxx>
#include <vos/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <rtl/logfile.hxx>
//_______________________________________________
// namespace
diff --git a/framework/source/helper/actiontriggerhelper.cxx b/framework/source/helper/actiontriggerhelper.cxx
index ce533b2c14..6075495848 100644
--- a/framework/source/helper/actiontriggerhelper.cxx
+++ b/framework/source/helper/actiontriggerhelper.cxx
@@ -128,9 +128,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta
try
{
Reference< XPropertySet > xPropSet;
- Any a = xIndexAccess->getByIndex( i );
-
- if (( a >>= xPropSet ) && ( xPropSet.is() ))
+ if (( xIndexAccess->getByIndex( i ) >>= xPropSet ) && ( xPropSet.is() ))
{
if ( IsSeparator( xPropSet ))
{
diff --git a/framework/source/helper/dockingareadefaultacceptor.cxx b/framework/source/helper/dockingareadefaultacceptor.cxx
index f6c33c7003..cf88201459 100644
--- a/framework/source/helper/dockingareadefaultacceptor.cxx
+++ b/framework/source/helper/dockingareadefaultacceptor.cxx
@@ -82,7 +82,6 @@ using namespace ::rtl ;
DockingAreaDefaultAcceptor::DockingAreaDefaultAcceptor( const Reference< XFrame >& xOwner )
// Init baseclasses first
: ThreadHelpBase ( &Application::GetSolarMutex() )
- , OWeakObject ( )
// Init member
, m_xOwner ( xOwner )
{
@@ -96,18 +95,6 @@ DockingAreaDefaultAcceptor::~DockingAreaDefaultAcceptor()
}
//*****************************************************************************************************************
-// XInterface, XTypeProvider
-//*****************************************************************************************************************
-DEFINE_XINTERFACE_2( DockingAreaDefaultAcceptor ,
- OWeakObject ,
- DIRECT_INTERFACE(XTypeProvider ) ,
- DIRECT_INTERFACE(::com::sun::star::ui::XDockingAreaAcceptor ) )
-
-DEFINE_XTYPEPROVIDER_2( DockingAreaDefaultAcceptor ,
- XTypeProvider ,
- ::com::sun::star::ui::XDockingAreaAcceptor )
-
-//*****************************************************************************************************************
// XDockingAreaAcceptor
//*****************************************************************************************************************
css::uno::Reference< css::awt::XWindow > SAL_CALL DockingAreaDefaultAcceptor::getContainerWindow() throw (css::uno::RuntimeException)
diff --git a/framework/source/helper/mischelper.cxx b/framework/source/helper/mischelper.cxx
index 395d592592..8e0f79b260 100644
--- a/framework/source/helper/mischelper.cxx
+++ b/framework/source/helper/mischelper.cxx
@@ -32,13 +32,21 @@
#include "precompiled_framework.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
#include <tools/debug.hxx>
#include <comphelper/processfactory.hxx>
#include <helper/mischelper.hxx>
+#include <services.h>
using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::lang;
namespace framework
{
@@ -49,14 +57,10 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues
{
try
{
- uno::Reference< lang::XMultiServiceFactory > xMgr ( comphelper::getProcessServiceFactory() );
- if (xMgr.is())
- {
- m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >(
- xMgr->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ),
- uno::UNO_QUERY );
- }
+ m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >(
+ m_xServiceManager->createInstance(
+ rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ),
+ uno::UNO_QUERY );
}
catch (uno::Exception &r)
{
@@ -66,6 +70,76 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues
}
return m_xLanguageGuesser;
}
+
+::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)
+{
+ ::rtl::OUString aLabel;
+
+ // Retrieve popup menu labels
+ if ( !_xUICommandLabels.is() )
+ {
+ try
+ {
+ if ( !_rIni )
+ {
+ _rIni = sal_True;
+ Reference< XModuleManager > xModuleManager( _xServiceFactory->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW );
+
+ try
+ {
+ _rModuleIdentifier = xModuleManager->identify( _xFrame );
+ }
+ catch( Exception& )
+ {
+ }
+ }
+
+ Reference< XNameAccess > xNameAccess( _xServiceFactory->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY );
+ if ( xNameAccess.is() )
+ {
+ xNameAccess->getByName( _rModuleIdentifier ) >>= _xUICommandLabels;
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+
+ if ( _xUICommandLabels.is() )
+ {
+ try
+ {
+ if ( aCmdURL.getLength() > 0 )
+ {
+ rtl::OUString aStr;
+ Sequence< PropertyValue > aPropSeq;
+ if ( _xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
+ {
+ for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
+ {
+ if ( aPropSeq[i].Name.equalsAscii( _pName/*"Label"*/ ))
+ {
+ aPropSeq[i].Value >>= aStr;
+ break;
+ }
+ }
+ }
+ aLabel = aStr;
+ }
+ }
+ catch ( com::sun::star::uno::Exception& )
+ {
+ }
+ }
+
+ return aLabel;
+}
} // namespace framework
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx
index 7ae53db8a1..274f3cdd6b 100644
--- a/framework/source/helper/ocomponentaccess.cxx
+++ b/framework/source/helper/ocomponentaccess.cxx
@@ -83,7 +83,6 @@ using namespace ::rtl ;
OComponentAccess::OComponentAccess( const Reference< XDesktop >& xOwner )
// Init baseclasses first
: ThreadHelpBase ( &Application::GetSolarMutex() )
- , OWeakObject ( )
// Init member
, m_xOwner ( xOwner )
{
@@ -99,20 +98,6 @@ OComponentAccess::~OComponentAccess()
}
//*****************************************************************************************************************
-// XInterface, XTypeProvider
-//*****************************************************************************************************************
-DEFINE_XINTERFACE_3( OComponentAccess ,
- OWeakObject ,
- DIRECT_INTERFACE(XTypeProvider ) ,
- DIRECT_INTERFACE(XEnumerationAccess ) ,
- DIRECT_INTERFACE(XElementAccess ) )
-
-DEFINE_XTYPEPROVIDER_3( OComponentAccess ,
- XTypeProvider ,
- XEnumerationAccess ,
- XElementAccess )
-
-//*****************************************************************************************************************
// XEnumerationAccess
//*****************************************************************************************************************
Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration() throw( RuntimeException )
diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx
index 347d09e6ed..ed38666380 100644
--- a/framework/source/helper/ocomponentenumeration.cxx
+++ b/framework/source/helper/ocomponentenumeration.cxx
@@ -85,7 +85,6 @@ OComponentEnumeration::OComponentEnumeration( const Sequence< Reference< XCompon
// we must garant right initialization and a valid value of this! First initialize
// baseclasses and then members. And we need the mutex for other baseclasses !!!
: ThreadHelpBase ( &Application::GetSolarMutex() )
- , OWeakObject ( )
// Init member
, m_nPosition ( 0 ) // 0 is the first position for a valid list and the right value for an invalid list to!
, m_seqComponents ( seqComponents )
@@ -105,22 +104,6 @@ OComponentEnumeration::~OComponentEnumeration()
}
//*****************************************************************************************************************
-// XInterface, XTypeProvider
-//*****************************************************************************************************************
-DEFINE_XINTERFACE_3 ( OComponentEnumeration ,
- OWeakObject ,
- DIRECT_INTERFACE(XTypeProvider ),
- DIRECT_INTERFACE(XEventListener ),
- DIRECT_INTERFACE(XEnumeration )
- )
-
-DEFINE_XTYPEPROVIDER_3 ( OComponentEnumeration ,
- XTypeProvider ,
- XEventListener ,
- XEnumeration
- )
-
-//*****************************************************************************************************************
// XEventListener
//*****************************************************************************************************************
void SAL_CALL OComponentEnumeration::disposing( const EventObject&
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index 68730bc59a..43f968225c 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -87,7 +87,6 @@ OFrames::OFrames( const Reference< XMultiServiceFactory >& xFactory ,
FrameContainer* pFrameContainer )
// Init baseclasses first
: ThreadHelpBase ( &Application::GetSolarMutex() )
- , OWeakObject ( )
// Init member
, m_xFactory ( xFactory )
, m_xOwner ( xOwner )
@@ -109,24 +108,6 @@ OFrames::~OFrames()
}
//*****************************************************************************************************************
-// XInterface
-//*****************************************************************************************************************
-DEFINE_XINTERFACE_4 ( OFrames ,
- OWeakObject ,
- DIRECT_INTERFACE(XTypeProvider ),
- DIRECT_INTERFACE(XFrames ),
- DIRECT_INTERFACE(XIndexAccess ),
- DIRECT_INTERFACE(XElementAccess )
- )
-
-DEFINE_XTYPEPROVIDER_4 ( OFrames ,
- XTypeProvider ,
- XFrames ,
- XIndexAccess ,
- XElementAccess
- )
-
-//*****************************************************************************************************************
// XFrames
//*****************************************************************************************************************
void SAL_CALL OFrames::append( const Reference< XFrame >& xFrame ) throw( RuntimeException )
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 02eb74d98b..de7fa59eea 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -240,12 +240,11 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&)
try
{
- css::uno::Any aWindowState = ::comphelper::ConfigurationHelper::readDirectKey(xSMGR,
+ ::comphelper::ConfigurationHelper::readDirectKey(xSMGR,
sPackage,
sRelPath,
sKey,
- ::comphelper::ConfigurationHelper::E_READONLY);
- aWindowState >>= sWindowState;
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= sWindowState;
}
catch(const css::uno::RuntimeException& exRun)
{ throw exRun; }
diff --git a/framework/source/helper/popupmenucontrollerbase.cxx b/framework/source/helper/popupmenucontrollerbase.cxx
index 29a9a06888..e8215eccca 100644
--- a/framework/source/helper/popupmenucontrollerbase.cxx
+++ b/framework/source/helper/popupmenucontrollerbase.cxx
@@ -44,9 +44,8 @@
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/awt/MenuItemStyle.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -57,7 +56,7 @@
#endif
#include <vcl/svapp.hxx>
#include <rtl/ustrbuf.hxx>
-
+#include <rtl/logfile.hxx>
//_________________________________________________________________________________________________________________
// Defines
//_________________________________________________________________________________________________________________
@@ -111,6 +110,10 @@ PopupMenuControllerBase::PopupMenuControllerBase( const ::com::sun::star::uno::R
m_xServiceManager( xServiceManager ),
m_aListenerContainer( m_aLock.getShareableOslMutex() )
{
+ if ( m_xServiceManager.is() )
+ m_xURLTransformer.set( m_xServiceManager->createInstance(
+ SERVICENAME_URLTRANSFORMER),
+ UNO_QUERY );
}
PopupMenuControllerBase::~PopupMenuControllerBase()
@@ -178,10 +181,12 @@ void SAL_CALL PopupMenuControllerBase::disposing( const EventObject& ) throw ( R
// XMenuListener
void SAL_CALL PopupMenuControllerBase::highlight( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
-
- if ( m_bDisposed )
- throw DisposedException();
+}
+
+void PopupMenuControllerBase::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL)
+{
+ Sequence<PropertyValue> aArgs;
+ _xDispatch->dispatch( aURL, aArgs );
}
void SAL_CALL PopupMenuControllerBase::select( const css::awt::MenuEvent& rEvent ) throw (RuntimeException)
@@ -205,37 +210,24 @@ void SAL_CALL PopupMenuControllerBase::select( const css::awt::MenuEvent& rEvent
if ( pPopupMenu )
{
css::util::URL aTargetURL;
- Sequence<PropertyValue> aArgs;
- Reference< XURLTransformer > xURLTransformer( xServiceManager->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
- UNO_QUERY );
-
{
vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
aTargetURL.Complete = pVCLPopupMenu->GetItemCommand( rEvent.MenuId );
}
- xURLTransformer->parseStrict( aTargetURL );
- xDispatch->dispatch( aTargetURL, aArgs );
+ m_xURLTransformer->parseStrict( aTargetURL );
+ impl_select(xDispatch,aTargetURL);
}
}
}
void SAL_CALL PopupMenuControllerBase::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
-
- if ( m_bDisposed )
- throw DisposedException();
}
void SAL_CALL PopupMenuControllerBase::deactivate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
-
- if ( m_bDisposed )
- throw DisposedException();
}
void SAL_CALL PopupMenuControllerBase::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
@@ -247,12 +239,9 @@ void SAL_CALL PopupMenuControllerBase::updatePopupMenu() throw ( ::com::sun::sta
Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
Reference< XDispatch > xDispatch( m_xDispatch );
- Reference< XURLTransformer > xURLTransformer( m_xServiceManager->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
- UNO_QUERY );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = m_aCommandURL;
- xURLTransformer->parseStrict( aTargetURL );
+ m_xURLTransformer->parseStrict( aTargetURL );
aLock.unlock();
// Add/remove status listener to get a status update once
@@ -279,10 +268,7 @@ throw( RuntimeException )
return Reference< XDispatch >();
}
-Sequence< Reference< XDispatch > > SAL_CALL
-PopupMenuControllerBase::queryDispatches(
- const Sequence< DispatchDescriptor >& lDescriptor )
-throw( RuntimeException )
+Sequence< Reference< XDispatch > > SAL_CALL PopupMenuControllerBase::queryDispatches( const Sequence< DispatchDescriptor >& lDescriptor ) throw( RuntimeException )
{
// Create return list - which must have same size then the given descriptor
// It's not allowed to pack it!
@@ -381,9 +367,6 @@ throw( ::com::sun::star::uno::RuntimeException )
// XInitialization
void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- const rtl::OUString aFrameName( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- const rtl::OUString aCommandURLName( RTL_CONSTASCII_USTRINGPARAM( "CommandURL" ));
-
ResetableGuard aLock( m_aLock );
sal_Bool bInitalized( m_bInitialized );
@@ -413,5 +396,35 @@ void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArgum
}
}
}
+// XPopupMenuController
+void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException )
+{
+ ResetableGuard aLock( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xFrame.is() && !m_xPopupMenu.is() )
+ {
+ // Create popup menu on demand
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ m_xPopupMenu = xPopupMenu;
+ m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY ));
+
+ Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
+
+ com::sun::star::util::URL aTargetURL;
+ aTargetURL.Complete = m_aCommandURL;
+ m_xURLTransformer->parseStrict( aTargetURL );
+ m_xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
+
+ impl_setPopupMenu();
+
+ updatePopupMenu();
+ }
+}
+void PopupMenuControllerBase::impl_setPopupMenu()
+{
+}
}
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index ec2ca00715..1db613237d 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -336,8 +336,7 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
{
try
{
- css::uno::Any aID = xSet->getPropertyValue( CONTROLLER_PROPNAME_ICONID );
- aID >>= nIcon;
+ xSet->getPropertyValue( CONTROLLER_PROPNAME_ICONID ) >>= nIcon;
}
catch(const css::uno::Exception&)
{}
diff --git a/framework/source/helper/titlehelper.cxx b/framework/source/helper/titlehelper.cxx
index 4c83be7f6c..2eb1707ae3 100644
--- a/framework/source/helper/titlehelper.cxx
+++ b/framework/source/helper/titlehelper.cxx
@@ -521,7 +521,7 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram
impl_appendProductName (sTitle);
impl_appendModuleName (sTitle);
impl_appendProductExtension (sTitle);
- impl_appendEvalVersion (sTitle);
+ //impl_appendEvalVersion (sTitle);
impl_appendDebugVersion (sTitle);
// SYNCHRONIZED ->
@@ -633,29 +633,29 @@ void TitleHelper::impl_appendDebugVersion (::rtl::OUStringBuffer&)
#endif
//*****************************************************************************************************************
-void TitleHelper::impl_appendEvalVersion (::rtl::OUStringBuffer& sTitle)
+void TitleHelper::impl_appendEvalVersion (::rtl::OUStringBuffer& /*sTitle*/)
{
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR ;
- aLock.clear ();
- // <- SYNCHRONIZED
-
- css::uno::Reference< css::beans::XMaterialHolder > xHolder(
- xSMGR->createInstance(SERVICENAME_TABREG),
- css::uno::UNO_QUERY);
-
- if ( ! xHolder.is())
- return;
-
- ::comphelper::SequenceAsHashMap aMaterial(xHolder->getMaterial());
- const ::rtl::OUString sEvalTitle = aMaterial.getUnpackedValueOrDefault(TABREG_PROPNAME_TITLE, ::rtl::OUString());
-
- if (sEvalTitle.getLength())
- {
- sTitle.appendAscii (" " );
- sTitle.append (sEvalTitle);
- }
+ // ::osl::ResettableMutexGuard aLock(m_aMutex);
+ // css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR ;
+ //aLock.clear ();
+ //// <- SYNCHRONIZED
+
+ //css::uno::Reference< css::beans::XMaterialHolder > xHolder(
+ // xSMGR->createInstance(SERVICENAME_TABREG),
+ // css::uno::UNO_QUERY);
+
+ // if ( ! xHolder.is())
+ // return;
+
+ // ::comphelper::SequenceAsHashMap aMaterial(xHolder->getMaterial());
+ //const ::rtl::OUString sEvalTitle = aMaterial.getUnpackedValueOrDefault(TABREG_PROPNAME_TITLE, ::rtl::OUString());
+
+ //if (sEvalTitle.getLength())
+ //{
+ // sTitle.appendAscii (" " );
+ // sTitle.append (sEvalTitle);
+ //}
}
//-----------------------------------------------
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 87a19fa5fd..23ac2c8a79 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -38,6 +38,8 @@
#include <general.h>
#include <properties.h>
#include <threadhelp/resetableguard.hxx>
+#include <uielement/constitemcontainer.hxx>
+#include <uielement/rootitemcontainer.hxx>
//_________________________________________________________________________________________________________________
// interface includes
@@ -46,11 +48,13 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
#include <vcl/svapp.hxx>
+#include <rtl/logfile.hxx>
const int UIELEMENT_PROPHANDLE_CONFIGSOURCE = 1;
const int UIELEMENT_PROPHANDLE_FRAME = 2;
@@ -75,6 +79,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
using namespace com::sun::star::frame;
using namespace com::sun::star::lang;
+using namespace com::sun::star::container;
using namespace ::com::sun::star::ui;
namespace framework
@@ -110,7 +115,7 @@ DEFINE_XTYPEPROVIDER_10 ( UIConfigElementWrapperBase
::com::sun::star::ui::XUIConfigurationListener
)
-UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType )
+UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory )
: ThreadHelpBase ( &Application::GetSolarMutex() )
, ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() )
, ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
@@ -122,6 +127,7 @@ UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType )
, m_bConfigListening ( sal_False )
, m_bDisposed ( sal_False )
, m_bNoClose ( sal_False )
+ , m_xServiceFactory ( _xServiceFactory )
, m_aListenerContainer ( m_aLock.getShareableOslMutex() )
{
}
@@ -493,5 +499,58 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigE
// Return static "PropertyDescriptor"
return lPropertyDescriptor;
}
+void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAccess >& xSettings ) throw ( RuntimeException )
+{
+ ResetableGuard aLock( m_aLock );
+
+ //if ( m_bDisposed )
+ // throw DisposedException();
+
+ if ( xSettings.is() )
+ {
+ // Create a copy of the data if the container is not const
+ Reference< XIndexReplace > xReplace( xSettings, UNO_QUERY );
+ if ( xReplace.is() )
+ m_xConfigData = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xSettings ) ), UNO_QUERY );
+ else
+ m_xConfigData = xSettings;
+
+ if ( m_xConfigSource.is() && m_bPersistent )
+ {
+ ::rtl::OUString aResourceURL( m_aResourceURL );
+ Reference< XUIConfigurationManager > xUICfgMgr( m_xConfigSource );
+
+ aLock.unlock();
+
+ try
+ {
+ xUICfgMgr->replaceSettings( aResourceURL, m_xConfigData );
+ }
+ catch( NoSuchElementException& )
+ {
+ }
+ }
+ else if ( !m_bPersistent )
+ {
+ // Transient menubar => Fill menubar with new data
+ impl_fillNewData();
+ }
+ }
+}
+void UIConfigElementWrapperBase::impl_fillNewData()
+{
+}
+Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_Bool bWriteable ) throw ( RuntimeException )
+{
+ ResetableGuard aLock( m_aLock );
+
+ //if ( m_bDisposed )
+ // throw DisposedException();
+
+ if ( bWriteable )
+ return Reference< XIndexAccess >( static_cast< OWeakObject * >( new RootItemContainer( m_xConfigData ) ), UNO_QUERY );
+
+ return m_xConfigData;
+}
}
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index e417ac95b1..64a08326e7 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -50,6 +50,7 @@
// includes of other projects
//_________________________________________________________________________________________________________________
#include <vcl/svapp.hxx>
+#include <rtl/logfile.hxx>
const int UIELEMENT_PROPHANDLE_RESOURCEURL = 1;
const int UIELEMENT_PROPHANDLE_TYPE = 2;
diff --git a/framework/source/inc/accelerators/acceleratorconfiguration.hxx b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
index 5e4594dc94..5b0da6ddc2 100644
--- a/framework/source/inc/accelerators/acceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
@@ -75,7 +75,7 @@ namespace framework
{
//-----------------------------------------------
// Accelerators.xcu
-static const ::rtl::OUString CFG_ENTRY_ACCELERATORS = ::rtl::OUString::createFromAscii("org.openoffice.Office.Accelerators");
+
static const ::rtl::OUString CFG_ENTRY_PRIMARY = ::rtl::OUString::createFromAscii("PrimaryKeys");
static const ::rtl::OUString CFG_ENTRY_SECONDARY = ::rtl::OUString::createFromAscii("SecondaryKeys");
diff --git a/framework/source/inc/dispatch/uieventloghelper.hxx b/framework/source/inc/dispatch/uieventloghelper.hxx
index 8725454481..9b425077c4 100644
--- a/framework/source/inc/dispatch/uieventloghelper.hxx
+++ b/framework/source/inc/dispatch/uieventloghelper.hxx
@@ -40,6 +40,7 @@
#include <com/sun/star/util/URL.hpp>
#include <comphelper/uieventslogger.hxx>
#include <rtl/ustring.hxx>
+#include <services.h>
namespace framework
{
@@ -61,7 +62,7 @@ namespace framework
{
try
{
- static ::rtl::OUString our_aModuleManagerName = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager");
+ static ::rtl::OUString our_aModuleManagerName = SERVICENAME_MODULEMANAGER;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager(
rServiceManager->createInstance(our_aModuleManagerName)
, ::com::sun::star::uno::UNO_QUERY_THROW);
diff --git a/framework/source/inc/pattern/frame.hxx b/framework/source/inc/pattern/frame.hxx
index 6e8a967300..16167e39ce 100644
--- a/framework/source/inc/pattern/frame.hxx
+++ b/framework/source/inc/pattern/frame.hxx
@@ -42,6 +42,7 @@
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/XCloseable.hpp>
//_______________________________________________
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index ec383a8313..0c47659339 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -85,19 +85,6 @@ static ::rtl::OUString ENVTYPE_DOCUMENTEVENT = ::rtl::OUString::createFromAsc
//-----------------------------------------------
-DEFINE_XINTERFACE_4(HelpOnStartup ,
- OWeakObject ,
- DIRECT_INTERFACE(css::lang::XTypeProvider ),
- DIRECT_INTERFACE(css::lang::XServiceInfo ),
- DIRECT_INTERFACE(css::task::XJob ),
- DIRECT_INTERFACE(css::lang::XEventListener))
-
-DEFINE_XTYPEPROVIDER_4(HelpOnStartup ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- css::task::XJob ,
- css::lang::XEventListener)
-
DEFINE_XSERVICEINFO_MULTISERVICE(HelpOnStartup ,
::cppu::OWeakObject ,
SERVICENAME_JOB ,
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index 257c8772ac..2609a57734 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -45,11 +45,13 @@
#include <com/sun/star/task/XAsyncJob.hpp>
#include <com/sun/star/util/XCloseBroadcaster.hpp>
#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//________________________________
// includes of other projects
#include <rtl/ustrbuf.hxx>
#include <vcl/svapp.hxx>
+#include <comphelper/uieventslogger.hxx>
//________________________________
// namespace
@@ -236,6 +238,7 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD
// Otherwhise we might die by ref count ...
css::uno::Reference< css::task::XJobListener > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
+ if ( ::comphelper::UiEventsLogger::isEnabled() )
try
{
// create the job
diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx
index 8e395a15a5..bb04f4f09f 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -660,23 +660,20 @@ css::uno::Sequence< ::rtl::OUString > JobData::getEnabledJobsForEvent( const css
for (sal_Int32 s=0; s<c; ++s)
{
- css::uno::Any aNode = xJobList->getByName(pAllJobs[s]);
css::uno::Reference< css::beans::XPropertySet > xJob;
if (
- !(aNode >>= xJob) ||
+ !(xJobList->getByName(pAllJobs[s]) >>= xJob) ||
!(xJob.is() )
)
{
continue;
}
- aNode = xJob->getPropertyValue(ADMINTIME);
::rtl::OUString sAdminTime;
- aNode >>= sAdminTime;
+ xJob->getPropertyValue(ADMINTIME) >>= sAdminTime;
- aNode = xJob->getPropertyValue(USERTIME);
::rtl::OUString sUserTime;
- aNode >>= sUserTime;
+ xJob->getPropertyValue(USERTIME) >>= sUserTime;
if (!isEnabled(sAdminTime, sUserTime))
continue;
diff --git a/framework/source/jobs/jobresult.cxx b/framework/source/jobs/jobresult.cxx
index faffb74ab7..98a0821180 100644
--- a/framework/source/jobs/jobresult.cxx
+++ b/framework/source/jobs/jobresult.cxx
@@ -138,7 +138,7 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult )
// analyze the result and actualize our other members
::comphelper::SequenceAsHashMap aProtocol(aResult);
- if (aProtocol.size() < 1)
+ if ( aProtocol.empty() )
return;
::comphelper::SequenceAsHashMap::const_iterator pIt = aProtocol.end();
diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx
index 9745619155..0bafb763a4 100644
--- a/framework/source/jobs/shelljob.cxx
+++ b/framework/source/jobs/shelljob.cxx
@@ -80,17 +80,6 @@ static const ::rtl::OUString PROP_CHECKEXITCODE = ::rtl::OUString::createFromAsc
//-----------------------------------------------
-DEFINE_XINTERFACE_3(ShellJob ,
- OWeakObject ,
- DIRECT_INTERFACE(css::lang::XTypeProvider ),
- DIRECT_INTERFACE(css::lang::XServiceInfo ),
- DIRECT_INTERFACE(css::task::XJob ))
-
-DEFINE_XTYPEPROVIDER_3(ShellJob ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- css::task::XJob )
-
DEFINE_XSERVICEINFO_MULTISERVICE(ShellJob ,
::cppu::OWeakObject ,
SERVICENAME_JOB ,
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 9e81fae21b..3ea3d2759d 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -86,6 +86,7 @@
#include <com/sun/star/frame/LayoutManagerEvents.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDispatchHelper.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
@@ -107,7 +108,7 @@
#include <svtools/cmdoptions.hxx>
#include <algorithm>
-
+#include <boost/bind.hpp>
// ______________________________________________
// using namespace
@@ -131,6 +132,26 @@ using namespace ::com::sun::star::frame;
// You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START)
static const sal_Int32 DOCKWIN_ID_BASE = 9800;
+bool lcl_checkUIElement(const Reference< XUIElement >& xUIElement,css::awt::Rectangle& _rPosSize,Reference< css::awt::XWindow >& _xWindow)
+{
+ bool bRet = xUIElement.is();
+ if ( bRet )
+ {
+ vos::OGuard aGuard( Application::GetSolarMutex() );
+ _xWindow.set( xUIElement->getRealInterface(), UNO_QUERY );
+ _rPosSize = _xWindow->getPosSize();
+
+ Window* pWindow = VCLUnoHelper::GetWindow( _xWindow );
+ if ( pWindow->GetType() == WINDOW_TOOLBOX )
+ {
+ ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 );
+ _rPosSize.Width = aSize.Width();
+ _rPosSize.Height = aSize.Height();
+ }
+ } // if ( xUIElement.is() )
+ return bRet;
+}
+
// convert alignment constant to vcl's WindowAlign type
static WindowAlign ImplConvertAlignment( sal_Int16 aAlignment )
{
@@ -200,15 +221,10 @@ bool LayoutManager::UIElement::operator< ( const LayoutManager::UIElement& aUIEl
bool bEqual = ( m_aDockedData.m_aPos.X() == aUIElement.m_aDockedData.m_aPos.X() );
if ( bEqual )
{
- if ( m_bUserActive && !aUIElement.m_bUserActive )
- return sal_True;
- else if ( !m_bUserActive && aUIElement.m_bUserActive )
- return sal_False;
- else
- return sal_False;
+ return m_bUserActive && !aUIElement.m_bUserActive;
}
else
- return ( m_aDockedData.m_aPos.X() <= aUIElement.m_aDockedData.m_aPos.X() );
+ return ( m_aDockedData.m_aPos.X() < aUIElement.m_aDockedData.m_aPos.X() );
}
}
else
@@ -220,15 +236,10 @@ bool LayoutManager::UIElement::operator< ( const LayoutManager::UIElement& aUIEl
bool bEqual = ( m_aDockedData.m_aPos.Y() == aUIElement.m_aDockedData.m_aPos.Y() );
if ( bEqual )
{
- if ( m_bUserActive && !aUIElement.m_bUserActive )
- return sal_True;
- else if ( !m_bUserActive && aUIElement.m_bUserActive )
- return sal_False;
- else
- return sal_False;
+ return m_bUserActive && !aUIElement.m_bUserActive;
}
else
- return ( m_aDockedData.m_aPos.Y() <= aUIElement.m_aDockedData.m_aPos.Y() );
+ return ( m_aDockedData.m_aPos.Y() < aUIElement.m_aDockedData.m_aPos.Y() );
}
}
}
@@ -394,7 +405,7 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM
, ::cppu::OWeakObject ( )
, m_xSMGR( xServiceManager )
, m_xURLTransformer( Reference< XURLTransformer >( xServiceManager->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
+ SERVICENAME_URLTRANSFORMER),
UNO_QUERY ))
, m_nLockCount( 0 )
, m_bActive( sal_False )
@@ -493,8 +504,7 @@ void LayoutManager::impl_clearUpMenuBar()
{
try
{
- Any a = xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" )));
- a >>= xMenuBar;
+ xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar;
}
catch ( com::sun::star::beans::UnknownPropertyException )
{
@@ -821,7 +831,8 @@ void LayoutManager::implts_destroyDockingAreaWindows()
aWriteLock.unlock();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- for ( sal_Int32 i=0; i < (sal_Int32)oldDockingAreaWindows.size(); i++ )
+ const sal_uInt32 nCount = oldDockingAreaWindows.size();
+ for ( sal_uInt32 i=0; i < nCount; i++ )
{
if ( oldDockingAreaWindows[i].is() )
{
@@ -957,13 +968,13 @@ void LayoutManager::implts_createAddonsToolBars()
Sequence< PropertyValue > aPropSeq( 2 );
aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- aPropSeq[0].Value = makeAny( xFrame );
+ aPropSeq[0].Value <<= xFrame;
aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationData" ));
for ( sal_uInt32 i = 0; i < nCount; i++ )
{
::rtl::OUString aAddonToolBarName( aAddonsToolBarStaticName + m_pAddonOptions->GetAddonsToolbarResourceName(i) );
aAddonToolBarData = m_pAddonOptions->GetAddonsToolBarPart( i );
- aPropSeq[1].Value = makeAny( aAddonToolBarData );
+ aPropSeq[1].Value <<= aAddonToolBarData;
aWriteLock.lock();
UIElement aElement = impl_findElement( aAddonToolBarName );
@@ -1072,15 +1083,16 @@ void LayoutManager::implts_createNonContextSensitiveToolBars()
try
{
- rtl::OUString aElementType;
- rtl::OUString aElementName;
- rtl::OUString aName;
-
- Reference< ::com::sun::star::ui::XUIElement > xUIElement;
Sequence< rtl::OUString > aToolbarNames = xPersistentWindowState->getElementNames();
if ( aToolbarNames.getLength() > 0 )
{
+ rtl::OUString aElementType;
+ rtl::OUString aElementName;
+ rtl::OUString aName;
+
+ Reference< ::com::sun::star::ui::XUIElement > xUIElement;
+ aMakeVisibleToolbars.reserve(aToolbarNames.getLength());
WriteGuard aWriteLock( m_aLock );
const rtl::OUString* pTbNames = aToolbarNames.getConstArray();
@@ -1120,12 +1132,10 @@ void LayoutManager::implts_createNonContextSensitiveToolBars()
{
}
- if ( aMakeVisibleToolbars.size() > 0 )
+ if ( !aMakeVisibleToolbars.empty() )
{
implts_lock();
- for ( sal_uInt32 i = 0; i < aMakeVisibleToolbars.size(); i++ )
- requestElement( aMakeVisibleToolbars[i] );
-
+ ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &LayoutManager::requestElement, this,_1 ));
implts_unlock();
}
}
@@ -1368,7 +1378,8 @@ void LayoutManager::implts_refreshContextToolbarsVisibility()
aReadLock.unlock();
UIElement aUIElement;
- for ( sal_uInt32 i = 0; i < aToolbarVisibleVector.size(); i++ )
+ const sal_uInt32 nCount = aToolbarVisibleVector.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
UIElementVisibility& rToolbar = aToolbarVisibleVector[i];
@@ -1411,10 +1422,8 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName,
try
{
- Any a;
Sequence< PropertyValue > aWindowState;
- a = xPersistentWindowState->getByName( aName );
- if ( a >>= aWindowState )
+ if ( xPersistentWindowState->getByName( aName ) >>= aWindowState )
{
sal_Bool bValue( sal_False );
for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ )
@@ -1579,18 +1588,18 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con
aPos.X = rElementData.m_aDockedData.m_aPos.X();
aPos.Y = rElementData.m_aDockedData.m_aPos.Y();
aWindowState[3].Name = m_aPropDockPos;
- aWindowState[3].Value = makeAny( aPos );
+ aWindowState[3].Value <<= aPos;
aPos.X = rElementData.m_aFloatingData.m_aPos.X();
aPos.Y = rElementData.m_aFloatingData.m_aPos.Y();
aWindowState[4].Name = m_aPropPos;
- aWindowState[4].Value = makeAny( aPos );
+ aWindowState[4].Value <<= aPos;
css::awt::Size aSize;
aSize.Width = rElementData.m_aFloatingData.m_aSize.Width();
aSize.Height = rElementData.m_aFloatingData.m_aSize.Height();
aWindowState[5].Name = m_aPropSize;
- aWindowState[5].Value = makeAny( aSize );
+ aWindowState[5].Value <<= aSize;
aWindowState[6].Name = m_aPropUIName;
aWindowState[6].Value = makeAny( rElementData.m_aUIName );
aWindowState[7].Name = m_aPropLocked;
@@ -1799,7 +1808,7 @@ void LayoutManager::implts_setElementData( UIElement& rElement, const Reference<
{
Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY );
- if ( xDockWindow.is() && xWindow.is() && xDockWindow->isFloating() )
+ if ( xDockWindow.is() && xDockWindow->isFloating() )
{
vos::OGuard aGuard( Application::GetSolarMutex() );
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
@@ -1864,7 +1873,8 @@ void LayoutManager::implts_findNextDockingPos( DockingArea DockingArea, const ::
implts_getDockingAreaElementInfos( DockingArea, aRowColumnsWindowData );
sal_Int32 nPixelPos( 0 );
- for ( sal_Int32 i = 0; i < sal_Int32( aRowColumnsWindowData.size()); i++ )
+ const sal_uInt32 nCount = aRowColumnsWindowData.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
SingleRowColumnWindowData& rRowColumnWindowData = aRowColumnsWindowData[i];
@@ -1877,7 +1887,8 @@ void LayoutManager::implts_findNextDockingPos( DockingArea DockingArea, const ::
{
// Check current row where we can find the needed space
sal_Int32 nCurrPos( 0 );
- for ( sal_Int32 j = 0; j < sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size()); j++ )
+ const sal_uInt32 nWindowSizesCount = rRowColumnWindowData.aRowColumnWindowSizes.size();
+ for ( sal_uInt32 j = 0; j < nWindowSizesCount; j++ )
{
css::awt::Rectangle rRect = rRowColumnWindowData.aRowColumnWindowSizes[j];
sal_Int32& rSpace = rRowColumnWindowData.aRowColumnSpace[j];
@@ -1999,7 +2010,8 @@ void LayoutManager::implts_sortUIElements()
UIElementVector::iterator pIter;
for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ )
{
- if ( pIter->m_bUserActive )
+ // why check, just set it to false
+ //if ( pIter->m_bUserActive )
pIter->m_bUserActive = sal_False;
}
@@ -2021,24 +2033,22 @@ void LayoutManager::implts_getDockingAreaElementInfos( DockingArea eDockingArea,
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
ReadGuard aReadLock( m_aLock );
+ aWindowVector.reserve(m_aUIElements.size());
xDockAreaWindow = m_xDockAreaWindows[eDockingArea];
UIElementVector::iterator pIter;
for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ )
{
- if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea )
+ if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea && pIter->m_bVisible && !pIter->m_bFloating )
{
Reference< XUIElement > xUIElement( pIter->m_xUIElement );
if ( xUIElement.is() )
{
Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY );
- if ( xWindow.is() )
+ Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
+ if ( xDockWindow.is() )
{
- Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xDockWindow.is() && pIter->m_bVisible && !pIter->m_bFloating )
- {
- // docked windows
- aWindowVector.push_back( *pIter );
- }
+ // docked windows
+ aWindowVector.push_back( *pIter );
}
}
}
@@ -2068,29 +2078,15 @@ void LayoutManager::implts_getDockingAreaElementInfos( DockingArea eDockingArea,
else
nLastRowColPixelPos = aDockAreaRect.Width;
- for ( j = 0; j < sal_Int32( aWindowVector.size()); j++ )
+ const sal_uInt32 nCount = aWindowVector.size();
+ for ( j = 0; j < sal_Int32( nCount); j++ )
{
const UIElement& rElement = aWindowVector[j];
Reference< css::awt::XWindow > xWindow;
Reference< XUIElement > xUIElement( rElement.m_xUIElement );
css::awt::Rectangle aPosSize;
- if ( xUIElement.is() )
- {
- vos::OGuard aGuard( Application::GetSolarMutex() );
- xWindow = Reference< css::awt::XWindow >( xUIElement->getRealInterface(), UNO_QUERY );
- aPosSize = xWindow->getPosSize();
-
- Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow->GetType() == WINDOW_TOOLBOX )
- {
- ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 );
- aPosSize.Width = aSize.Width();
- aPosSize.Height = aSize.Height();
- }
- }
- else
+ if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) )
continue;
-
if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) ||
( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ))
{
@@ -2225,7 +2221,8 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
ReadGuard aReadLock( m_aLock );
UIElementVector::iterator pIter;
- for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ )
+ UIElementVector::iterator pEnd = m_aUIElements.end();
+ for ( pIter = m_aUIElements.begin(); pIter != pEnd; pIter++ )
{
if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea )
{
@@ -2268,33 +2265,21 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
sal_Int32 j;
sal_Int32 nLastPos( 0 );
- for ( j = 0; j < sal_Int32( aWindowVector.size()); j++ )
+ const sal_uInt32 nCount = aWindowVector.size();
+ for ( j = 0; j < sal_Int32( nCount); j++ )
{
const UIElement& rElement = aWindowVector[j];
Reference< css::awt::XWindow > xWindow;
Reference< XUIElement > xUIElement( rElement.m_xUIElement );
css::awt::Rectangle aPosSize;
- if ( xUIElement.is() )
- {
- vos::OGuard aGuard( Application::GetSolarMutex() );
- xWindow = Reference< css::awt::XWindow >( xUIElement->getRealInterface(), UNO_QUERY );
- aPosSize = xWindow->getPosSize();
-
- Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow->GetType() == WINDOW_TOOLBOX )
- {
- ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 );
- aPosSize.Width = aSize.Width();
- aPosSize.Height = aSize.Height();
- }
- }
- else
+ if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) )
continue;
+ sal_Int32 nSpace;
if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) ||
( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ))
{
- sal_Int32 nSpace( rElement.m_aDockedData.m_aPos.X() - nLastPos );
+ nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos );
// Calc space before an element and store it
if ( rElement.m_aDockedData.m_aPos.X() > nLastPos )
@@ -2302,11 +2287,9 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
else
nSpace = 0;
- rRowColumnWindowData.aRowColumnSpace.push_back( nSpace );
nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width;
- rRowColumnWindowData.aRowColumnWindows.push_back( xWindow );
- rRowColumnWindowData.aUIElementNames.push_back( rElement.m_aName );
+
rRowColumnWindowData.aRowColumnWindowSizes.push_back(
css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(),
rElement.m_aDockedData.m_aPos.Y(),
@@ -2314,21 +2297,19 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
aPosSize.Height ));
if ( rRowColumnWindowData.nStaticSize < aPosSize.Height )
rRowColumnWindowData.nStaticSize = aPosSize.Height;
- rRowColumnWindowData.nVarSize += aPosSize.Width + nSpace;
+ rRowColumnWindowData.nVarSize += aPosSize.Width;
}
else
{
// Calc space before an element and store it
- sal_Int32 nSpace( rElement.m_aDockedData.m_aPos.Y() - nLastPos );
+ nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos );
if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos )
rRowColumnWindowData.nSpace += nSpace;
else
nSpace = 0;
- rRowColumnWindowData.aRowColumnSpace.push_back( nSpace );
+
nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height;
- rRowColumnWindowData.aRowColumnWindows.push_back( xWindow );
- rRowColumnWindowData.aUIElementNames.push_back( rElement.m_aName );
rRowColumnWindowData.aRowColumnWindowSizes.push_back(
css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(),
rElement.m_aDockedData.m_aPos.Y(),
@@ -2336,8 +2317,13 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
aPosSize.Height ));
if ( rRowColumnWindowData.nStaticSize < aPosSize.Width )
rRowColumnWindowData.nStaticSize = aPosSize.Width;
- rRowColumnWindowData.nVarSize += aPosSize.Height + nSpace;
+ rRowColumnWindowData.nVarSize += aPosSize.Height;
}
+
+ rRowColumnWindowData.aUIElementNames.push_back( rElement.m_aName );
+ rRowColumnWindowData.aRowColumnWindows.push_back( xWindow );
+ rRowColumnWindowData.aRowColumnSpace.push_back( nSpace );
+ rRowColumnWindowData.nVarSize += nSpace;
}
}
@@ -2354,13 +2340,14 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ));
implts_getDockingAreaElementInfoOnSingleRowCol( eDockingArea, nRowCol, aRowColumnWindowData );
- if ( aRowColumnWindowData.aRowColumnWindows.size() == 0 )
+ if ( aRowColumnWindowData.aRowColumnWindows.empty() )
return rMovedElementRect;
else
{
sal_Int32 nSpace( 0 );
::Rectangle aFrontDockingRect( rMovedElementRect );
- for ( sal_uInt32 i = 0; i < aRowColumnWindowData.aRowColumnWindows.size(); i++ )
+ const sal_uInt32 nCount = aRowColumnWindowData.aRowColumnWindows.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
if ( bHorzDockArea )
{
@@ -2415,7 +2402,7 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
( DockingArea > DockingArea_DOCKINGAREA_RIGHT ))
DockingArea = DockingArea_DOCKINGAREA_TOP;
- if ( rRowColumnWindowData.aRowColumnWindows.size() == 0 )
+ if ( rRowColumnWindowData.aRowColumnWindows.empty() )
return aWinRect;
else
{
@@ -2432,7 +2419,8 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea
Window* pDockingAreaWindow( VCLUnoHelper::GetWindow( xDockingAreaWindow ));
if ( pDockingAreaWindow && pContainerWindow )
{
- for ( sal_uInt32 i = 0; i < rRowColumnWindowData.aRowColumnWindows.size(); i++ )
+ const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindows.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
css::awt::Rectangle aWindowRect = rRowColumnWindowData.aRowColumnWindows[i]->getPosSize();
::Rectangle aRect( aWindowRect.X, aWindowRect.Y, aWindowRect.X+aWindowRect.Width, aWindowRect.Y+aWindowRect.Height );
@@ -2660,7 +2648,8 @@ void LayoutManager::implts_calcDockingPosSize(
// determine current first row/column and last row/column
sal_Int32 nMaxRowCol( -1 );
sal_Int32 nMinRowCol( SAL_MAX_INT32 );
- for ( sal_uInt32 i = 0; i < aRowColumnsWindowData.size(); i++ )
+ const sal_uInt32 nCount = aRowColumnsWindowData.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
if ( aRowColumnsWindowData[i].nRowColumn > nMaxRowCol )
nMaxRowCol = aRowColumnsWindowData[i].nRowColumn;
@@ -2676,7 +2665,8 @@ void LayoutManager::implts_calcDockingPosSize(
::Rectangle aWindowRect;
::Rectangle aRowColumnRect;
- for ( sal_uInt32 i = 0; i < aRowColumnsWindowData.size(); i++ )
+ const sal_uInt32 nWindowDataCount = aRowColumnsWindowData.size();
+ for ( sal_uInt32 i = 0; i < nWindowDataCount; i++ )
{
::Rectangle aRect( aRowColumnsWindowData[i].aRowColumnRect.X,
aRowColumnsWindowData[i].aRowColumnRect.Y,
@@ -3163,6 +3153,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible )
}
ReadGuard aReadLock( m_aLock );
+ aWinVector.reserve(m_aUIElements.size());
UIElementVector::iterator pIter;
for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ )
{
@@ -3187,7 +3178,8 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible )
try
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- for ( sal_uInt32 i = 0; i < aWinVector.size(); i++ )
+ const sal_uInt32 nCount = aWinVector.size();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
Reference< css::awt::XWindow > xWindow( aWinVector[i] );
if ( xWindow.is() )
@@ -3653,7 +3645,7 @@ throw (::com::sun::star::uno::RuntimeException)
Reference< XDispatchProvider > xDispatchProvider;
MenuBar* pMenuBar = new MenuBar;
- m_pInplaceMenuBar = new MenuBarManager( m_xSMGR, m_xFrame, xDispatchProvider, aModuleIdentifier, pMenuBar, sal_True, sal_True );
+ m_pInplaceMenuBar = new MenuBarManager( m_xSMGR, m_xFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pMenuBar, sal_True, sal_True );
m_pInplaceMenuBar->SetItemContainer( xMergedMenuBar );
Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow );
@@ -3895,9 +3887,10 @@ throw ( RuntimeException )
else
implts_destroyElements(); // remove all elements
- if ( oldDockingAreaWindows.size() > 0 )
+ if ( !oldDockingAreaWindows.empty() )
{
- for ( sal_Int32 i=0; i < (sal_Int32)oldDockingAreaWindows.size(); i++ )
+ const sal_uInt32 nCount = oldDockingAreaWindows.size();
+ for ( sal_uInt32 i = 0; i < nCount; ++i )
{
if ( oldDockingAreaWindows[i].is() )
{
@@ -4079,7 +4072,8 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent )
aReadLock.unlock();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- for ( sal_uInt32 i = 0; i < aListenerArray.size(); i++ )
+ const sal_uInt32 nCount = aListenerArray.size();
+ for ( sal_uInt32 i = 0; i < nCount; ++i )
{
try
{
@@ -4125,7 +4119,6 @@ throw (RuntimeException)
ReadGuard aReadLock( m_aLock );
Reference< XFrame > xFrame = m_xFrame;
Reference< XURLTransformer > xURLTransformer = m_xURLTransformer;
- Reference< XModel > xModel;
sal_Bool bInPlaceMenu = m_bInplaceMenuSet;
aReadLock.unlock();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
@@ -4133,7 +4126,7 @@ throw (RuntimeException)
if ( !xFrame.is() )
return;
- xModel = impl_getModelFromFrame( xFrame );
+ Reference< XModel > xModel( impl_getModelFromFrame( xFrame ) );
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
WriteGuard aWriteLock( m_aLock );
@@ -4147,7 +4140,7 @@ throw (RuntimeException)
implts_findElement( aName, aElementType, aElementName, xUIElement );
bFound = xUIElement.is();
- if ( xFrame.is() && m_xContainerWindow.is() && !implts_isPreviewModel( xModel ) ) // no bars on preview mode
+ if ( /*xFrame.is() && */m_xContainerWindow.is() && !implts_isPreviewModel( xModel ) ) // no bars on preview mode
{
if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ))
{
@@ -4243,8 +4236,7 @@ throw (RuntimeException)
{
try
{
- Any a = xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" )));
- a >>= xMenuBar;
+ xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar;
}
catch ( com::sun::star::beans::UnknownPropertyException )
{
@@ -4263,13 +4255,11 @@ throw (RuntimeException)
if ( pMenuBar )
{
pSysWindow->SetMenuBar( pMenuBar );
+ pMenuBar->SetDisplayable( m_bMenuVisible );
if ( m_bMenuVisible )
{
- pMenuBar->SetDisplayable( sal_True );
bNotify = sal_True;
}
- else
- pMenuBar->SetDisplayable( sal_False );
implts_updateMenuBarClose();
}
}
@@ -4304,8 +4294,7 @@ throw (RuntimeException)
if ( bNotify )
{
// UI element is invisible - provide information to listeners
- uno::Any a = uno::makeAny( aName );
- implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, a );
+ implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) );
}
}
@@ -4362,7 +4351,7 @@ throw (RuntimeException)
{
if ( pIter->m_aName == aName )
{
- xComponent = Reference< XComponent >( pIter->m_xUIElement, UNO_QUERY );
+ xComponent.set( pIter->m_xUIElement, UNO_QUERY );
Reference< XUIElement > xUIElement( pIter->m_xUIElement );
if ( xUIElement.is() )
{
@@ -4444,8 +4433,7 @@ throw (RuntimeException)
if ( bNotify )
{
// UI element is invisible - provide information to listeners
- uno::Any a = uno::makeAny( aName );
- implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, a );
+ implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) );
}
}
@@ -4530,7 +4518,7 @@ throw (::com::sun::star::uno::RuntimeException)
if ( xDockWindow.is() && xDockWindow->isFloating() )
bShowElement = ( bShowElement && xContainerWindow->isActive() );
- if ( xWindow.is() && xDockWindow.is() && bShowElement )
+ if ( xDockWindow.is() && bShowElement )
{
pIter->m_bVisible = sal_True;
aWriteLock.unlock();
@@ -4550,9 +4538,9 @@ throw (::com::sun::star::uno::RuntimeException)
}
bResult = sal_False;
- break;
}
- }
+ } // if ( pIter->m_xUIElement.is() )
+ break;
}
}
@@ -4597,8 +4585,7 @@ throw (::com::sun::star::uno::RuntimeException)
if ( bNotify )
{
// UI element is visible - provide information to listeners
- uno::Any a = uno::makeAny( ResourceURL );
- implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, a );
+ implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( ResourceURL ) );
}
return bResult;
@@ -4723,7 +4710,7 @@ throw (RuntimeException)
implts_writeWindowStateData( aUIElement.m_aName, aUIElement );
implts_sortUIElements();
- if ( xWindow.is() && xDockWindow.is() && bShowElement )
+ if ( xDockWindow.is() && bShowElement )
{
// we need VCL here to pass special flags to Show()
vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -4739,7 +4726,8 @@ throw (RuntimeException)
doLayout();
bResult = sal_True;
- }
+ } // if ( xDockWindow.is() && bShowElement )
+ break;
}
}
}
@@ -4757,8 +4745,7 @@ throw (RuntimeException)
if ( bNotify )
{
// UI element is visible - provide information to listeners
- uno::Any a = uno::makeAny( aName );
- implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, a );
+ implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) );
}
return bResult;
@@ -4839,7 +4826,7 @@ throw (RuntimeException)
Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xWindow.is() && xDockWindow.is() )
+ if ( xDockWindow.is() )
{
pIter->m_bVisible = sal_False;
aWriteLock.unlock();
@@ -4852,7 +4839,8 @@ throw (RuntimeException)
bResult = sal_True;
bNotify = sal_True;
- }
+ } // if ( xDockWindow.is() )
+ break;
}
}
}
@@ -4870,8 +4858,7 @@ throw (RuntimeException)
if ( bNotify )
{
// UI element is visible - provide information to listeners
- uno::Any a = uno::makeAny( aName );
- implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, a );
+ implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) );
}
return sal_False;
@@ -4882,96 +4869,93 @@ throw (RuntimeException)
{
UIElement aUIElement;
- if ( implts_findElement( aName, aUIElement ))
+ if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() )
{
- if ( aUIElement.m_xUIElement.is() )
+ try
{
- try
+ Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY );
+ Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
+ if ( xDockWindow.is() )
{
- Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY );
- Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xWindow.is() && xDockWindow.is() )
- {
- if ( DockingArea != DockingArea_DOCKINGAREA_DEFAULT )
- aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( DockingArea );
+ if ( DockingArea != DockingArea_DOCKINGAREA_DEFAULT )
+ aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( DockingArea );
- if (( Pos.X != SAL_MAX_INT32 ) && ( Pos.Y != SAL_MAX_INT32 ))
- aUIElement.m_aDockedData.m_aPos = ::Point( Pos.X, Pos.Y );
+ if (( Pos.X != SAL_MAX_INT32 ) && ( Pos.Y != SAL_MAX_INT32 ))
+ aUIElement.m_aDockedData.m_aPos = ::Point( Pos.X, Pos.Y );
- if ( !xDockWindow->isFloating() )
- {
- Window* pWindow( 0 );
- ToolBox* pToolBox( 0 );
+ if ( !xDockWindow->isFloating() )
+ {
+ Window* pWindow( 0 );
+ ToolBox* pToolBox( 0 );
+ {
+ vos::OGuard aGuard( Application::GetSolarMutex() );
+ pWindow = VCLUnoHelper::GetWindow( xWindow );
+ if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
- pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
- {
- pToolBox = (ToolBox *)pWindow;
+ pToolBox = (ToolBox *)pWindow;
- // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a
- // horizontal to a vertical docking area!
- pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ));
- }
+ // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a
+ // horizontal to a vertical docking area!
+ pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ));
}
+ }
- if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) ||
- ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 ))
- {
- // Docking on its default position without a preset position -
- // we have to find a good place for it.
- ::Size aSize;
-
- vos::OGuard aGuard( Application::GetSolarMutex() );
- {
- if ( pToolBox )
- aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) );
- else
- aSize = pWindow->GetSizePixel();
- }
+ if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) ||
+ ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 ))
+ {
+ // Docking on its default position without a preset position -
+ // we have to find a good place for it.
+ ::Size aSize;
- ::Point aPixelPos;
- ::Point aDockPos;
- implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea,
- aSize,
- aDockPos,
- aPixelPos );
- aUIElement.m_aDockedData.m_aPos = aDockPos;
+ vos::OGuard aGuard( Application::GetSolarMutex() );
+ {
+ if ( pToolBox )
+ aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) );
+ else
+ aSize = pWindow->GetSizePixel();
}
- }
- WriteGuard aWriteLock( m_aLock );
- UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName );
- if ( rUIElement.m_aName == aName )
- {
- rUIElement.m_aDockedData.m_nDockedArea = aUIElement.m_aDockedData.m_nDockedArea;
- rUIElement.m_aDockedData.m_aPos = aUIElement.m_aDockedData.m_aPos;
+ ::Point aPixelPos;
+ ::Point aDockPos;
+ implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea,
+ aSize,
+ aDockPos,
+ aPixelPos );
+ aUIElement.m_aDockedData.m_aPos = aDockPos;
}
- aWriteLock.unlock();
+ }
- if ( xDockWindow->isFloating() )
- {
- // Will call toggle floating mode which will do the rest!
- xWindow->setVisible( sal_False );
- xDockWindow->setFloatingMode( sal_False );
- xWindow->setVisible( sal_True );
- }
- else
- {
- implts_writeWindowStateData( aName, aUIElement );
- implts_sortUIElements();
+ WriteGuard aWriteLock( m_aLock );
+ UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName );
+ if ( rUIElement.m_aName == aName )
+ {
+ rUIElement.m_aDockedData.m_nDockedArea = aUIElement.m_aDockedData.m_nDockedArea;
+ rUIElement.m_aDockedData.m_aPos = aUIElement.m_aDockedData.m_aPos;
+ }
+ aWriteLock.unlock();
- if ( aUIElement.m_bVisible )
- doLayout();
- }
+ if ( xDockWindow->isFloating() )
+ {
+ // Will call toggle floating mode which will do the rest!
+ xWindow->setVisible( sal_False );
+ xDockWindow->setFloatingMode( sal_False );
+ xWindow->setVisible( sal_True );
+ }
+ else
+ {
+ implts_writeWindowStateData( aName, aUIElement );
+ implts_sortUIElements();
- return sal_True;
+ if ( aUIElement.m_bVisible )
+ doLayout();
}
+
+ return sal_True;
}
- catch ( DisposedException& )
- {
- }
+ }
+ catch ( DisposedException& )
+ {
}
}
@@ -5000,7 +4984,8 @@ throw (RuntimeException)
}
}
- for ( sal_uInt32 i = 0; i < aToolBarNameVector.size(); i++ )
+ const sal_uInt32 nCount = aToolBarNameVector.size();
+ for ( sal_uInt32 i = 0; i < nCount; ++i )
{
::com::sun::star::awt::Point aPoint;
aPoint.X = aPoint.Y = SAL_MAX_INT32;
@@ -5164,42 +5149,39 @@ throw (RuntimeException)
{
UIElement aUIElement;
- if ( implts_findElement( aName, aUIElement ))
+ if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() )
{
- if ( aUIElement.m_xUIElement.is() )
+ try
{
- try
- {
- Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY );
- Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
+ Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY );
+ Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xWindow.is() && xDockWindow.is() )
+ if ( xWindow.is() && xDockWindow.is() )
+ {
+ if ( aUIElement.m_bFloating )
{
- if ( aUIElement.m_bFloating )
- {
- xWindow->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS );
- implts_writeNewStateData( aName, xWindow );
- }
- else
- {
- WriteGuard aWriteLock( m_aLock );
- UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName );
- if ( rUIElement.m_aName == aName )
- rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y );
- aWriteLock.unlock();
+ xWindow->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS );
+ implts_writeNewStateData( aName, xWindow );
+ }
+ else
+ {
+ WriteGuard aWriteLock( m_aLock );
+ UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName );
+ if ( rUIElement.m_aName == aName )
+ rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y );
+ aWriteLock.unlock();
- aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y );
- implts_writeWindowStateData( aName, aUIElement );
- implts_sortUIElements();
+ aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y );
+ implts_writeWindowStateData( aName, aUIElement );
+ implts_sortUIElements();
- if ( aUIElement.m_bVisible )
- doLayout();
- }
+ if ( aUIElement.m_bVisible )
+ doLayout();
}
}
- catch ( DisposedException& )
- {
- }
+ }
+ catch ( DisposedException& )
+ {
}
}
}
@@ -5322,10 +5304,7 @@ throw (RuntimeException)
if ( xWindow.is() )
{
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->IsVisible() )
- return sal_True;
- else
- return sal_False;
+ return pWindow && pWindow->IsVisible();
}
}
}
@@ -5353,13 +5332,8 @@ throw (RuntimeException)
{
if ( pIter->m_aName == aName && pIter->m_xUIElement.is() )
{
- Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
- if ( xWindow.is() )
- {
- Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xDockWindow.is() )
- return xDockWindow->isFloating();
- }
+ Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
+ return xDockWindow.is() && xDockWindow->isFloating();
}
}
@@ -5376,13 +5350,8 @@ throw (RuntimeException)
{
if ( pIter->m_aName == aName && pIter->m_xUIElement.is() )
{
- Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
- if ( xWindow.is() )
- {
- Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xDockWindow.is() )
- return !xDockWindow->isFloating();
- }
+ Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
+ return xDockWindow.is() && !xDockWindow->isFloating();
}
}
@@ -5397,16 +5366,10 @@ throw (::com::sun::star::uno::RuntimeException)
ReadGuard aReadLock( m_aLock );
for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ )
{
- if (( pIter->m_aName == ResourceURL ) &&
- ( pIter->m_xUIElement.is() ))
+ if (( pIter->m_aName == ResourceURL ) && ( pIter->m_xUIElement.is() ))
{
- Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
- if ( xWindow.is() )
- {
- Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xDockWindow.is() )
- return xDockWindow->isLocked();
- }
+ Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
+ return xDockWindow.is() && !xDockWindow->isLocked();
}
}
@@ -5416,64 +5379,53 @@ throw (::com::sun::star::uno::RuntimeException)
css::awt::Size SAL_CALL LayoutManager::getElementSize( const ::rtl::OUString& aName )
throw (RuntimeException)
{
- UIElementVector::const_iterator pIter;
-
ReadGuard aReadLock( m_aLock );
- for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ )
+ UIElement aElementData;
+ if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() )
{
- if ( pIter->m_aName == aName && pIter->m_xUIElement.is() )
+ Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY );
+ if ( xWindow.is() )
{
- Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
- if ( xWindow.is() )
+ Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+ if ( pWindow )
{
- Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow )
- {
- ::Size aSize = pWindow->GetSizePixel();
- css::awt::Size aElementSize;
- aElementSize.Width = aSize.Width();
- aElementSize.Height = aSize.Height();
- return aElementSize;
- }
- else
- break;
- }
+ ::Size aSize = pWindow->GetSizePixel();
+ css::awt::Size aElementSize;
+ aElementSize.Width = aSize.Width();
+ aElementSize.Height = aSize.Height();
+ return aElementSize;
+ } // if ( pWindow )
}
}
-
return css::awt::Size();
}
css::awt::Point SAL_CALL LayoutManager::getElementPos( const ::rtl::OUString& aName )
throw (RuntimeException)
{
- UIElementVector::const_iterator pIter;
-
ReadGuard aReadLock( m_aLock );
- for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ )
+ UIElement aElementData;
+ if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() )
{
- if ( pIter->m_aName == aName && pIter->m_xUIElement.is() )
+ Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY );
+ Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
+ if ( xDockWindow.is() )
{
- Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY );
- Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY );
- if ( xWindow.is() && xDockWindow.is() )
+ css::awt::Point aPos;
+ if ( aElementData.m_bFloating )
{
- css::awt::Point aPos;
- if ( pIter->m_bFloating )
- {
- css::awt::Rectangle aRect = xWindow->getPosSize();
- aPos.X = aRect.X;
- aPos.Y = aRect.Y;
- }
- else
- {
- ::Point aVirtualPos = pIter->m_aDockedData.m_aPos;
- aPos.X = aVirtualPos.X();
- aPos.Y = aVirtualPos.Y();
- }
-
- return aPos;
+ css::awt::Rectangle aRect = xWindow->getPosSize();
+ aPos.X = aRect.X;
+ aPos.Y = aRect.Y;
+ }
+ else
+ {
+ ::Point aVirtualPos = aElementData.m_aDockedData.m_aPos;
+ aPos.X = aVirtualPos.X();
+ aPos.Y = aVirtualPos.Y();
}
+
+ return aPos;
}
}
@@ -5621,7 +5573,8 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace )
implts_getDockingAreaElementInfos( (DockingArea)i, aRowColumnsWindowData );
sal_Int32 nOffset( 0 );
- for ( sal_Int32 j = 0; j < sal_Int32( aRowColumnsWindowData.size() ); j++ )
+ const sal_uInt32 nCount = aRowColumnsWindowData.size();
+ for ( sal_uInt32 j = 0; j < nCount; ++j )
{
implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[j], aContainerSize );
nOffset += aRowColumnsWindowData[j].nStaticSize;
@@ -5687,7 +5640,7 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin
sal_Int32 nBottomDockingAreaSize;
sal_Int32 nContainerClientSize;
- if ( rRowColumnWindowData.aRowColumnWindows.size() == 0 )
+ if ( rRowColumnWindowData.aRowColumnWindows.empty() )
return;
if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) ||
@@ -5704,26 +5657,28 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin
nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize;
}
+ const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindowSizes.size();
if (( nDiff < 0 ) && ( nRCSpace > 0 ))
{
// First we try to reduce the size of blank space before/behind docked windows
- sal_Int32 i = rRowColumnWindowData.aRowColumnWindowSizes.size()-1;
+ sal_Int32 i = nCount - 1;
while ( i >= 0 )
{
sal_Int32 nSpace = rRowColumnWindowData.aRowColumnSpace[i];
if ( nSpace >= -nDiff )
{
+
if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) ||
( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ))
{
// Try to move this and all user elements behind with the calculated difference
- for ( sal_Int32 j = i; j < sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size() ); j++ )
+ for ( sal_uInt32 j = i; j < nCount ; j++ )
rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff;
}
else
{
// Try to move this and all user elements behind with the calculated difference
- for ( sal_Int32 j = i; j < sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size() ); j++ )
+ for ( sal_uInt32 j = i; j < nCount ; j++ )
rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff;
}
nDiff = 0;
@@ -5736,13 +5691,13 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin
( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ))
{
// Try to move this and all user elements behind with the calculated difference
- for ( sal_Int32 j = i; j < sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size() ); j++ )
+ for ( sal_uInt32 j = i; j < nCount; j++ )
rRowColumnWindowData.aRowColumnWindowSizes[j].X -= nSpace;
}
else
{
// Try to move this and all user elements behind with the calculated difference
- for ( sal_Int32 j = i; j < sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size() ); j++ )
+ for ( sal_uInt32 j = i; j < nCount; j++ )
rRowColumnWindowData.aRowColumnWindowSizes[j].Y -= nSpace;
}
nDiff += nSpace;
@@ -5755,7 +5710,7 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin
if ( nDiff < 0 )
{
// Now we have to reduce the size of certain docked windows
- sal_Int32 i = sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size() - 1 );
+ sal_Int32 i = sal_Int32( nCount - 1 );
while ( i >= 0 )
{
css::awt::Rectangle& rWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i];
@@ -5787,7 +5742,7 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin
}
// Try to move this and all user elements behind with the calculated difference
- for ( sal_Int32 j = i; j < sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size() ); j++ )
+ for ( sal_uInt32 j = i; j < nCount; j++ )
rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff;
}
else
@@ -5805,7 +5760,7 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin
}
// Try to move this and all user elements behind with the calculated difference
- for ( sal_Int32 j = i; j < sal_Int32( rRowColumnWindowData.aRowColumnWindowSizes.size() ); j++ )
+ for ( sal_uInt32 j = i; j < nCount; j++ )
rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff;
}
}
@@ -5831,7 +5786,7 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin
nStartOffset = pDockAreaWindow->GetSizePixel().Height() - rRowColumnWindowData.nStaticSize;
vos::OGuard aGuard( Application::GetSolarMutex() );
- for ( sal_Int32 i = 0; i < sal_Int32( rRowColumnWindowData.aRowColumnWindows.size() ); i++ )
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
{
Reference< css::awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i];
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
@@ -5986,12 +5941,13 @@ css::awt::Rectangle LayoutManager::implts_calcDockingAreaSizes()
}
// Sum up max heights from every row/column
- if ( aWindowVector.size() > 0 )
+ if ( !aWindowVector.empty() )
{
for ( sal_Int32 i = 0; i <= DockingArea_DOCKINGAREA_RIGHT; i++ )
{
sal_Int32 nSize( 0 );
- for ( sal_Int32 j = 0; j < sal_Int32( aRowColumnSizes[i].size() ); j++ )
+ const sal_uInt32 nCount = aRowColumnSizes[i].size();
+ for ( sal_uInt32 j = 0; j < nCount; j++ )
nSize += aRowColumnSizes[i][j];
if ( i == DockingArea_DOCKINGAREA_TOP )
@@ -7084,6 +7040,7 @@ IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG )
void LayoutManager::implts_checkElementContainer()
{
+#ifdef DBG_UTIL
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
ReadGuard aReadLock( m_aLock );
@@ -7102,7 +7059,8 @@ void LayoutManager::implts_checkElementContainer()
::rtl::OString aName = ::rtl::OUStringToOString( pCheckIter->first, RTL_TEXTENCODING_ASCII_US );
DBG_ASSERT( "More than one element (%s) with the same name found!", aName.getStr() );
}
- }
+ } // for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ )
+#endif
}
//---------------------------------------------------------------------------------------------------------
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index e67b7570f0..902a5a970f 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -75,6 +75,7 @@
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XWindow2.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
@@ -1829,9 +1830,8 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
// read window state from the configuration
// and apply it on the window.
// Do nothing, if no configuration entry exists!
- css::uno::Any aWindowState = ::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES);
::rtl::OUString sWindowState ;
- aWindowState >>= sWindowState;
+ ::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES) >>= sWindowState;
if (sWindowState.getLength())
{
// SOLAR SAFE ->
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index de76f58891..9ad3f696d6 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -187,7 +187,7 @@ void SAL_CALL DispatchRecorder::endRecording() throw( css::uno::RuntimeException
/* SAFE{ */
WriteGuard aWriteLock(m_aLock);
- if ( !m_aStatements.size() )
+ if ( m_aStatements.empty() )
return ::rtl::OUString();
::rtl::OUStringBuffer aScriptBuffer;
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index 48d383ce7b..c7ef3da666 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -61,29 +61,29 @@
=================================================================================================================*/
#include <services/urltransformer.hxx>
#include <services/desktop.hxx>
-#include <services/tabwindowservice.hxx>
+//#include <services/tabwindowservice.hxx>
#include <services/frame.hxx>
#include <services/modulemanager.hxx>
-#include <dispatch/oxt_handler.hxx>
+//#include <dispatch/oxt_handler.hxx>
#include <jobs/jobexecutor.hxx>
-#include <recording/dispatchrecordersupplier.hxx>
-#include <recording/dispatchrecorder.hxx>
-#include <dispatch/mailtodispatcher.hxx>
-#include <dispatch/servicehandler.hxx>
+//#include <recording/dispatchrecordersupplier.hxx>
+//#include <recording/dispatchrecorder.hxx>
+//#include <dispatch/mailtodispatcher.hxx>
+//#include <dispatch/servicehandler.hxx>
#include <jobs/jobdispatch.hxx>
#include <services/backingcomp.hxx>
-#include <services/dispatchhelper.hxx>
+//#include <services/dispatchhelper.hxx>
#include <services/layoutmanager.hxx>
-#include <services/license.hxx>
+//#include <services/license.hxx>
#include <uifactory/uielementfactorymanager.hxx>
#include <uifactory/popupmenucontrollerfactory.hxx>
-#include <uielement/fontmenucontroller.hxx>
-#include <uielement/fontsizemenucontroller.hxx>
+//#include <uielement/fontmenucontroller.hxx>
+//#include <uielement/fontsizemenucontroller.hxx>
#include <uielement/objectmenucontroller.hxx>
-#include <uielement/headermenucontroller.hxx>
-#include <uielement/footermenucontroller.hxx>
+//#include <uielement/headermenucontroller.hxx>
+//#include <uielement/footermenucontroller.hxx>
#include <uielement/controlmenucontroller.hxx>
-#include <uielement/macrosmenucontroller.hxx>
+//#include <uielement/macrosmenucontroller.hxx>
#include <uielement/uicommanddescription.hxx>
#include <uiconfiguration/uiconfigurationmanager.hxx>
#include <uiconfiguration/moduleuicfgsupplier.hxx>
@@ -95,53 +95,54 @@
#include <uifactory/toolboxfactory.hxx>
#include <uifactory/addonstoolboxfactory.hxx>
#include "uiconfiguration/windowstateconfiguration.hxx"
-#include <uielement/toolbarsmenucontroller.hxx>
+//#include <uielement/toolbarsmenucontroller.hxx>
#include "uifactory/toolbarcontrollerfactory.hxx"
#include "uifactory/statusbarcontrollerfactory.hxx"
-#include <uielement/toolbarsmenucontroller.hxx>
#include <services/autorecovery.hxx>
#include <helper/statusindicatorfactory.hxx>
#include <uielement/recentfilesmenucontroller.hxx>
#include <uifactory/statusbarfactory.hxx>
#include <uiconfiguration/uicategorydescription.hxx>
#include <services/sessionlistener.hxx>
-#include <uielement/logoimagestatusbarcontroller.hxx>
-#include <uielement/logotextstatusbarcontroller.hxx>
-#include <uielement/newmenucontroller.hxx>
+//#include <uielement/logoimagestatusbarcontroller.hxx>
+//#include <uielement/logotextstatusbarcontroller.hxx>
+//#include <uielement/newmenucontroller.hxx>
#include <services/taskcreatorsrv.hxx>
-#include <uielement/simpletextstatusbarcontroller.hxx>
-#include <services/uriabbreviation.hxx>
-#include <dispatch/popupmenudispatcher.hxx>
+//#include <uielement/simpletextstatusbarcontroller.hxx>
+//#include <services/uriabbreviation.hxx>
+
#include <uielement/langselectionstatusbarcontroller.hxx>
-#include <uielement/langselectionmenucontroller.hxx>
+//#include <uielement/langselectionmenucontroller.hxx>
#include <uiconfiguration/imagemanager.hxx>
#include <uifactory/windowcontentfactorymanager.hxx>
+#include <services/substitutepathvars.hxx>
+#include <services/pathsettings.hxx>
COMPONENTGETIMPLEMENTATIONENVIRONMENT
COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::URLTransformer )
COMPONENTINFO( ::framework::Desktop )
COMPONENTINFO( ::framework::Frame )
- COMPONENTINFO( ::framework::Oxt_Handler )
+ //COMPONENTINFO( ::framework::Oxt_Handler )
COMPONENTINFO( ::framework::JobExecutor )
- COMPONENTINFO( ::framework::DispatchRecorderSupplier )
- COMPONENTINFO( ::framework::DispatchRecorder )
- COMPONENTINFO( ::framework::MailToDispatcher )
- COMPONENTINFO( ::framework::ServiceHandler )
+ //COMPONENTINFO( ::framework::DispatchRecorderSupplier )
+ //COMPONENTINFO( ::framework::DispatchRecorder )
+ //COMPONENTINFO( ::framework::MailToDispatcher )
+ //COMPONENTINFO( ::framework::ServiceHandler )
COMPONENTINFO( ::framework::JobDispatch )
COMPONENTINFO( ::framework::BackingComp )
- COMPONENTINFO( ::framework::DispatchHelper )
+ //COMPONENTINFO( ::framework::DispatchHelper )
COMPONENTINFO( ::framework::LayoutManager )
- COMPONENTINFO( ::framework::License )
+ //COMPONENTINFO( ::framework::License )
COMPONENTINFO( ::framework::UIElementFactoryManager )
COMPONENTINFO( ::framework::PopupMenuControllerFactory )
- COMPONENTINFO( ::framework::FontMenuController )
- COMPONENTINFO( ::framework::FontSizeMenuController )
+ //COMPONENTINFO( ::framework::FontMenuController )
+ //COMPONENTINFO( ::framework::FontSizeMenuController )
COMPONENTINFO( ::framework::ObjectMenuController )
- COMPONENTINFO( ::framework::HeaderMenuController )
- COMPONENTINFO( ::framework::FooterMenuController )
+ //COMPONENTINFO( ::framework::HeaderMenuController )
+ //COMPONENTINFO( ::framework::FooterMenuController )
COMPONENTINFO( ::framework::ControlMenuController )
- COMPONENTINFO( ::framework::MacrosMenuController )
+ //COMPONENTINFO( ::framework::MacrosMenuController )
COMPONENTINFO( ::framework::UICommandDescription )
COMPONENTINFO( ::framework::ModuleManager )
COMPONENTINFO( ::framework::UIConfigurationManager )
@@ -155,7 +156,7 @@ COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::URLTransformer
COMPONENTINFO( ::framework::AddonsToolBoxFactory )
COMPONENTINFO( ::framework::WindowStateConfiguration )
COMPONENTINFO( ::framework::ToolbarControllerFactory )
- COMPONENTINFO( ::framework::ToolbarsMenuController )
+ //COMPONENTINFO( ::framework::ToolbarsMenuController )
COMPONENTINFO( ::framework::AutoRecovery )
COMPONENTINFO( ::framework::StatusIndicatorFactory )
COMPONENTINFO( ::framework::RecentFilesMenuController )
@@ -163,43 +164,45 @@ COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::URLTransformer
COMPONENTINFO( ::framework::UICategoryDescription )
COMPONENTINFO( ::framework::StatusbarControllerFactory )
COMPONENTINFO( ::framework::SessionListener )
- COMPONENTINFO( ::framework::LogoImageStatusbarController )
- COMPONENTINFO( ::framework::LogoTextStatusbarController )
- COMPONENTINFO( ::framework::NewMenuController )
+ //COMPONENTINFO( ::framework::LogoImageStatusbarController )
+ //COMPONENTINFO( ::framework::LogoTextStatusbarController )
+ //COMPONENTINFO( ::framework::NewMenuController )
COMPONENTINFO( ::framework::TaskCreatorService )
- COMPONENTINFO( ::framework::SimpleTextStatusbarController )
- COMPONENTINFO( ::framework::UriAbbreviation )
- COMPONENTINFO( ::framework::PopupMenuDispatcher )
+ //COMPONENTINFO( ::framework::SimpleTextStatusbarController )
+ //COMPONENTINFO( ::framework::UriAbbreviation )
+ //COMPONENTINFO( ::framework::PopupMenuDispatcher )
COMPONENTINFO( ::framework::ImageManager )
COMPONENTINFO( ::framework::LangSelectionStatusbarController )
- COMPONENTINFO( ::framework::LanguageSelectionMenuController )
- COMPONENTINFO( ::framework::TabWindowService )
+ //COMPONENTINFO( ::framework::LanguageSelectionMenuController )
+ //COMPONENTINFO( ::framework::TabWindowService )
COMPONENTINFO( ::framework::WindowContentFactoryManager )
+ COMPONENTINFO( ::framework::SubstitutePathVariables )
+ COMPONENTINFO( ::framework::PathSettings )
)
COMPONENTGETFACTORY ( IFFACTORY( ::framework::URLTransformer ) else
IFFACTORY( ::framework::Desktop ) else
IFFACTORY( ::framework::Frame ) else
- IFFACTORY( ::framework::Oxt_Handler ) else
+ //IFFACTORY( ::framework::Oxt_Handler ) else
IFFACTORY( ::framework::JobExecutor ) else
- IFFACTORY( ::framework::DispatchRecorderSupplier ) else
- IFFACTORY( ::framework::DispatchRecorder ) else
- IFFACTORY( ::framework::MailToDispatcher ) else
- IFFACTORY( ::framework::ServiceHandler ) else
+ //IFFACTORY( ::framework::DispatchRecorderSupplier ) else
+ //IFFACTORY( ::framework::DispatchRecorder ) else
+ //IFFACTORY( ::framework::MailToDispatcher ) else
+ //IFFACTORY( ::framework::ServiceHandler ) else
IFFACTORY( ::framework::JobDispatch ) else
IFFACTORY( ::framework::BackingComp ) else
- IFFACTORY( ::framework::DispatchHelper ) else
+ //IFFACTORY( ::framework::DispatchHelper ) else
IFFACTORY( ::framework::LayoutManager ) else
- IFFACTORY( ::framework::License ) else
+ //IFFACTORY( ::framework::License ) else
IFFACTORY( ::framework::UIElementFactoryManager ) else
IFFACTORY( ::framework::PopupMenuControllerFactory ) else
- IFFACTORY( ::framework::FontMenuController ) else
- IFFACTORY( ::framework::FontSizeMenuController ) else
+ //IFFACTORY( ::framework::FontMenuController ) else
+ //IFFACTORY( ::framework::FontSizeMenuController ) else
IFFACTORY( ::framework::ObjectMenuController ) else
- IFFACTORY( ::framework::HeaderMenuController ) else
- IFFACTORY( ::framework::FooterMenuController ) else
+ //IFFACTORY( ::framework::HeaderMenuController ) else
+ //IFFACTORY( ::framework::FooterMenuController ) else
IFFACTORY( ::framework::ControlMenuController ) else
- IFFACTORY( ::framework::MacrosMenuController ) else
+ //IFFACTORY( ::framework::MacrosMenuController ) else
IFFACTORY( ::framework::UICommandDescription ) else
IFFACTORY( ::framework::ModuleManager ) else
IFFACTORY( ::framework::UIConfigurationManager ) else
@@ -213,7 +216,7 @@ COMPONENTGETFACTORY ( IFFACTORY( ::framework::URLTransformer ) else
IFFACTORY( ::framework::AddonsToolBoxFactory ) else
IFFACTORY( ::framework::WindowStateConfiguration ) else
IFFACTORY( ::framework::ToolbarControllerFactory ) else
- IFFACTORY( ::framework::ToolbarsMenuController ) else
+ //IFFACTORY( ::framework::ToolbarsMenuController ) else
IFFACTORY( ::framework::AutoRecovery ) else
IFFACTORY( ::framework::StatusIndicatorFactory ) else
IFFACTORY( ::framework::RecentFilesMenuController ) else
@@ -222,18 +225,19 @@ COMPONENTGETFACTORY ( IFFACTORY( ::framework::URLTransformer ) else
IFFACTORY( ::framework::SessionListener ) else
IFFACTORY( ::framework::StatusbarControllerFactory ) else
IFFACTORY( ::framework::SessionListener ) else
- IFFACTORY( ::framework::LogoImageStatusbarController ) else
- IFFACTORY( ::framework::LogoTextStatusbarController ) else
+ //IFFACTORY( ::framework::LogoImageStatusbarController ) else
+ //IFFACTORY( ::framework::LogoTextStatusbarController ) else
IFFACTORY( ::framework::TaskCreatorService ) else
- IFFACTORY( ::framework::NewMenuController ) else
- IFFACTORY( ::framework::SimpleTextStatusbarController ) else
- IFFACTORY( ::framework::UriAbbreviation ) else
- IFFACTORY( ::framework::PopupMenuDispatcher ) else
+ //IFFACTORY( ::framework::NewMenuController ) else
+ //IFFACTORY( ::framework::SimpleTextStatusbarController ) else
+ //IFFACTORY( ::framework::UriAbbreviation ) else
+ //IFFACTORY( ::framework::PopupMenuDispatcher ) else
IFFACTORY( ::framework::ImageManager ) else
- IFFACTORY( ::framework::PopupMenuDispatcher ) else
IFFACTORY( ::framework::LangSelectionStatusbarController ) else
- IFFACTORY( ::framework::LanguageSelectionMenuController ) else
+ //IFFACTORY( ::framework::LanguageSelectionMenuController ) else
IFFACTORY( ::framework::WindowContentFactoryManager ) else
- IFFACTORY( ::framework::TabWindowService )
+ //IFFACTORY( ::framework::TabWindowService ) else
+ IFFACTORY( ::framework::SubstitutePathVariables ) else
+ IFFACTORY( ::framework::PathSettings )
)
diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx
index d008176f81..2297346ae5 100644
--- a/framework/source/register/registertemp.cxx
+++ b/framework/source/register/registertemp.cxx
@@ -60,17 +60,74 @@
)
=================================================================================================================*/
#include <services/mediatypedetectionhelper.hxx>
-#include <services/substitutepathvars.hxx>
-#include <services/pathsettings.hxx>
+#include <dispatch/mailtodispatcher.hxx>
+#include <dispatch/oxt_handler.hxx>
+#include <dispatch/popupmenudispatcher.hxx>
+#include <dispatch/servicehandler.hxx>
+#include <services/dispatchhelper.hxx>
+#include <recording/dispatchrecorder.hxx>
+#include <recording/dispatchrecordersupplier.hxx>
+#include <services/license.hxx>
+#include <services/uriabbreviation.hxx>
+#include <uielement/simpletextstatusbarcontroller.hxx>
+#include <uielement/logoimagestatusbarcontroller.hxx>
+#include <uielement/logotextstatusbarcontroller.hxx>
+#include <services/tabwindowservice.hxx>
+#include <uielement/fontmenucontroller.hxx>
+#include <uielement/fontsizemenucontroller.hxx>
+#include <uielement/footermenucontroller.hxx>
+#include <uielement/headermenucontroller.hxx>
+#include <uielement/langselectionmenucontroller.hxx>
+#include <uielement/macrosmenucontroller.hxx>
+#include <uielement/newmenucontroller.hxx>
+#include <uielement/toolbarsmenucontroller.hxx>
COMPONENTGETIMPLEMENTATIONENVIRONMENT
COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::MediaTypeDetectionHelper )
- COMPONENTINFO( ::framework::SubstitutePathVariables )
- COMPONENTINFO( ::framework::PathSettings )
+ COMPONENTINFO( ::framework::MailToDispatcher )
+ COMPONENTINFO( ::framework::NewMenuController )
+ COMPONENTINFO( ::framework::ToolbarsMenuController )
+ COMPONENTINFO( ::framework::MacrosMenuController )
+ COMPONENTINFO( ::framework::FontSizeMenuController )
+ COMPONENTINFO( ::framework::HeaderMenuController )
+ COMPONENTINFO( ::framework::FooterMenuController )
+ COMPONENTINFO( ::framework::FontMenuController )
+ COMPONENTINFO( ::framework::ServiceHandler )
+ COMPONENTINFO( ::framework::LogoImageStatusbarController )
+ COMPONENTINFO( ::framework::LogoTextStatusbarController )
+ COMPONENTINFO( ::framework::SimpleTextStatusbarController )
+ COMPONENTINFO( ::framework::UriAbbreviation )
+ COMPONENTINFO( ::framework::LanguageSelectionMenuController )
+ COMPONENTINFO( ::framework::PopupMenuDispatcher )
+ COMPONENTINFO( ::framework::DispatchHelper )
+ COMPONENTINFO( ::framework::TabWindowService )
+ COMPONENTINFO( ::framework::DispatchRecorder )
+ COMPONENTINFO( ::framework::DispatchRecorderSupplier )
+ COMPONENTINFO( ::framework::Oxt_Handler )
+ COMPONENTINFO( ::framework::License )
)
-COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper ) else
- IFFACTORY( ::framework::SubstitutePathVariables ) else
- IFFACTORY( ::framework::PathSettings )
+COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper )
+ IFFACTORY( ::framework::MailToDispatcher ) else
+ IFFACTORY( ::framework::ServiceHandler ) else
+ IFFACTORY( ::framework::LogoTextStatusbarController ) else
+ IFFACTORY( ::framework::LogoImageStatusbarController ) else
+ IFFACTORY( ::framework::License ) else
+ IFFACTORY( ::framework::PopupMenuDispatcher ) else
+ IFFACTORY( ::framework::DispatchHelper ) else
+ IFFACTORY( ::framework::TabWindowService ) else
+ IFFACTORY( ::framework::DispatchRecorder ) else
+ IFFACTORY( ::framework::DispatchRecorderSupplier ) else
+ IFFACTORY( ::framework::SimpleTextStatusbarController ) else
+ IFFACTORY( ::framework::ToolbarsMenuController ) else
+ IFFACTORY( ::framework::FontMenuController ) else
+ IFFACTORY( ::framework::MacrosMenuController ) else
+ IFFACTORY( ::framework::NewMenuController ) else
+ IFFACTORY( ::framework::FontSizeMenuController ) else
+ IFFACTORY( ::framework::UriAbbreviation ) else
+ IFFACTORY( ::framework::FooterMenuController ) else
+ IFFACTORY( ::framework::HeaderMenuController ) else
+ IFFACTORY( ::framework::LanguageSelectionMenuController ) else
+ IFFACTORY( ::framework::Oxt_Handler )
)
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index f6841a7e0f..ca7b94f2c5 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3180,15 +3180,13 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue ,
{
case AUTORECOVERY_PROPHANDLE_EXISTS_RECOVERYDATA :
{
- css::uno::Any aSessionVal = ::comphelper::ConfigurationHelper::readDirectKey(
+ sal_Bool bSessionData = sal_False;
+ ::comphelper::ConfigurationHelper::readDirectKey(
m_xSMGR,
CFG_PACKAGE_RECOVERY,
CFG_PATH_RECOVERYINFO,
CFG_ENTRY_SESSIONDATA,
- ::comphelper::ConfigurationHelper::E_READONLY);
-
- sal_Bool bSessionData = sal_False;
- aSessionVal >>= bSessionData;
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= bSessionData;
sal_Bool bRecoveryData = ((sal_Bool)(m_lDocCache.size()>0));
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 0917a0cd04..64ac51daff 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -34,6 +34,7 @@
#include "backingwindow.hxx"
#include "framework.hrc"
#include "classes/fwkresid.hxx"
+#include <services.h>
#include "vcl/metric.hxx"
#include "vcl/mnemonic.hxx"
@@ -206,9 +207,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
maToolbox.ShowItem( nItemId_Info );
// get dispatch provider
- mxDesktop = Reference<XDesktop>( comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ),
- UNO_QUERY );
+ mxDesktop = Reference<XDesktop>( comphelper::getProcessServiceFactory()->createInstance(SERVICENAME_DESKTOP ),UNO_QUERY );
if( mxDesktop.is() )
mxDesktopDispatchProvider = Reference< XDispatchProvider >( mxDesktop, UNO_QUERY );
@@ -720,9 +719,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
{
try
{
- Reference<lang::XMultiServiceFactory> xConfig( comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))),
- UNO_QUERY);
+ Reference<lang::XMultiServiceFactory> xConfig( comphelper::getProcessServiceFactory()->createInstance(SERVICENAME_CFGPROVIDER),UNO_QUERY);
if( xConfig.is() )
{
Sequence<Any> args(1);
@@ -732,9 +729,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
Any(rtl::OUString::createFromAscii(pNodePath)),
PropertyState_DIRECT_VALUE);
args.getArray()[0] <<= val;
- Reference<container::XNameAccess> xNameAccess(
- xConfig->createInstanceWithArguments(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")),
- args), UNO_QUERY);
+ Reference<container::XNameAccess> xNameAccess(xConfig->createInstanceWithArguments(SERVICENAME_CFGREADACCESS,args), UNO_QUERY);
if( xNameAccess.is() )
{
rtl::OUString sURL;
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index ebb9eb0829..679554eabc 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -82,6 +82,7 @@
#include <com/sun/star/frame/XNotifyingDispatch.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/UpdateDocMode.hpp>
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index 29b3ff5c87..0413cbfdbc 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -63,19 +63,6 @@ namespace framework{
//_______________________________________________
// XInterface, XTypeProvider, XServiceInfo
-DEFINE_XINTERFACE_4(DispatchHelper ,
- OWeakObject ,
- DIRECT_INTERFACE(css::lang::XTypeProvider ),
- DIRECT_INTERFACE(css::lang::XServiceInfo ),
- DIRECT_INTERFACE(css::frame::XDispatchHelper ),
- DIRECT_INTERFACE(css::frame::XDispatchResultListener))
-
-DEFINE_XTYPEPROVIDER_4(DispatchHelper ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- css::frame::XDispatchHelper ,
- css::frame::XDispatchResultListener)
-
DEFINE_XSERVICEINFO_MULTISERVICE(DispatchHelper ,
::cppu::OWeakObject ,
SERVICENAME_DISPATCHHELPER ,
@@ -91,7 +78,6 @@ DEFINE_INIT_SERVICE( DispatchHelper, {} )
*/
DispatchHelper::DispatchHelper( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR )
: ThreadHelpBase( )
- , OWeakObject ( )
// Init member
, m_xSMGR (xSMGR)
{
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 6b3231b2b9..f6e55c671c 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -62,6 +62,7 @@
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/util/XCloseable.hpp>
@@ -991,10 +992,9 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Frame::findFrame( const ::rtl
sal_Int32 nCount = xContainer->getCount();
for( sal_Int32 i=0; i<nCount; ++i )
{
- css::uno::Any aItem = xContainer->getByIndex(i);
css::uno::Reference< css::frame::XFrame > xSibling;
if (
- ( !(aItem>>=xSibling) ) || // control unpacking
+ ( !(xContainer->getByIndex(i)>>=xSibling) ) || // control unpacking
( ! xSibling.is() ) || // check for valid items
( xSibling==static_cast< ::cppu::OWeakObject* >(this) ) // ignore ourself! (We are a part of this container too - but search on our children was already done.)
)
@@ -2899,11 +2899,7 @@ void Frame::implts_setIconOnWindow()
{
try
{
- css::uno::Any aID = xSet->getPropertyValue( DECLARE_ASCII("IconId") );
- if( aID.hasValue() == sal_True )
- {
- aID >>= nIcon;
- }
+ xSet->getPropertyValue( DECLARE_ASCII("IconId") )>>= nIcon;
}
catch( css::beans::UnknownPropertyException& )
{
diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx
index c71d1a1097..0627707de0 100644
--- a/framework/source/services/license.cxx
+++ b/framework/source/services/license.cxx
@@ -318,9 +318,9 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na
#endif
// check if we need to show the license at all
// open org.openoffice.Setup/Office/ooLicenseAcceptDate
- ::rtl::OUString sConfigSrvc = ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+ ::rtl::OUString sConfigSrvc = SERVICENAME_CFGPROVIDER;
::rtl::OUString sAccessSrvc = ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
- ::rtl::OUString sReadSrvc = ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
+ ::rtl::OUString sReadSrvc = SERVICENAME_CFGREADACCESS;
// get configuration provider
Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
@@ -332,11 +332,10 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na
theArgs[0] <<= v;
Reference< XPropertySet > pset = Reference< XPropertySet >(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
- Any result = pset->getPropertyValue(::rtl::OUString::createFromAscii("ooLicenseAcceptDate"));
// if we find a date there, compare it to baseinstall license date
::rtl::OUString aAcceptDate;
- if (result >>= aAcceptDate)
+ if (pset->getPropertyValue(::rtl::OUString::createFromAscii("ooLicenseAcceptDate")) >>= aAcceptDate)
{
// get LicenseFileDate from base install
::rtl::OUString aLicenseURL = aLicensePath;
diff --git a/framework/source/services/mediatypedetectionhelper.cxx b/framework/source/services/mediatypedetectionhelper.cxx
index 17016865d0..b5b7cfe062 100644
--- a/framework/source/services/mediatypedetectionhelper.cxx
+++ b/framework/source/services/mediatypedetectionhelper.cxx
@@ -38,6 +38,7 @@
#include <services.h>
#include <svtools/inettype.hxx>
#include <tools/string.hxx>
+#include <rtl/logfile.hxx>
//_________________________________________________________________________________________________________________
// interface includes
@@ -72,23 +73,6 @@ MediaTypeDetectionHelper::~MediaTypeDetectionHelper()
{
}
-//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
-//*****************************************************************************************************************
-
-DEFINE_XINTERFACE_3 ( MediaTypeDetectionHelper
- , OWeakObject
- , DIRECT_INTERFACE( lang::XTypeProvider )
- , DIRECT_INTERFACE( lang::XServiceInfo )
- , DIRECT_INTERFACE( util::XStringMapping )
- )
-
-DEFINE_XTYPEPROVIDER_3 ( MediaTypeDetectionHelper
- , lang::XTypeProvider
- , lang::XServiceInfo
- , util::XStringMapping
- )
-
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( MediaTypeDetectionHelper
, ::cppu::OWeakObject
, SERVICENAME_MEDIATYPEDETECTIONHELPER
diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx
index 1ad7cfb47e..2bb57c30ad 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/source/services/modulemanager.cxx
@@ -53,6 +53,7 @@
//_______________________________________________
// other includes
+#include <rtl/logfile.hxx>
namespace framework
{
@@ -194,7 +195,7 @@ void SAL_CALL ModuleManager::replaceByName(const ::rtl::OUString& sName ,
css::uno::RuntimeException )
{
::comphelper::SequenceAsHashMap lProps(aValue);
- if (lProps.size() < 1)
+ if (lProps.empty() )
{
throw css::lang::IllegalArgumentException(
::rtl::OUString::createFromAscii("No properties given to replace part of module."),
@@ -254,10 +255,8 @@ css::uno::Any SAL_CALL ModuleManager::getByName(const ::rtl::OUString& sName)
{
// get access to the element
css::uno::Reference< css::container::XNameAccess > xCFG = implts_getConfig();
- css::uno::Any aElement = xCFG->getByName(sName);
-
css::uno::Reference< css::container::XNameAccess > xModule;
- aElement >>= xModule;
+ xCFG->getByName(sName) >>= xModule;
if (!xModule.is())
{
throw css::uno::RuntimeException(
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 0f19580d16..8871fea734 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -157,6 +157,7 @@ PathSettings::PathSettings( const css::uno::Reference< css::lang::XMultiServiceF
, m_pPropHelp(0 )
, m_bIgnoreEvents(sal_False)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::PathSettings" );
}
//-----------------------------------------------------------------------------
@@ -170,6 +171,7 @@ PathSettings::~PathSettings()
void SAL_CALL PathSettings::changesOccurred(const css::util::ChangesEvent& aEvent)
throw (css::uno::RuntimeException)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::changesOccurred" );
/*
if (m_bIgnoreEvents)
return;
@@ -206,6 +208,7 @@ void SAL_CALL PathSettings::changesOccurred(const css::util::ChangesEvent& aEven
void SAL_CALL PathSettings::disposing(const css::lang::EventObject& aSource)
throw(css::uno::RuntimeException)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::disposing" );
// SAFE ->
WriteGuard aWriteLock(m_aLock);
@@ -219,6 +222,7 @@ void SAL_CALL PathSettings::disposing(const css::lang::EventObject& aSource)
//-----------------------------------------------------------------------------
void PathSettings::impl_readAll()
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_readAll" );
RTL_LOGFILE_CONTEXT(aLog, "framework (as96863) ::PathSettings::load config (all)");
// TODO think about me
@@ -241,6 +245,7 @@ void PathSettings::impl_readAll()
// NO substitution here ! It's done outside ...
OUStringList PathSettings::impl_readOldFormat(const ::rtl::OUString& sPath)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_readOldFormat" );
css::uno::Reference< css::container::XNameAccess > xCfg = fa_getCfgOld();
css::uno::Any aVal = xCfg->getByName(sPath);
@@ -308,6 +313,7 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const ::rtl::OUString& s
//-----------------------------------------------------------------------------
void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_storePath" );
m_bIgnoreEvents = sal_True;
css::uno::Reference< css::container::XNameAccess > xCfgNew = fa_getCfgNew();
@@ -356,6 +362,7 @@ void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath)
void PathSettings::impl_mergeOldUserPaths( PathSettings::PathInfo& rPath,
const OUStringList& lOld )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_mergeOldUserPaths" );
OUStringList::const_iterator pIt;
for ( pIt = lOld.begin();
pIt != lOld.end() ;
@@ -654,6 +661,7 @@ void PathSettings::impl_subst(PathSettings::PathInfo& aPath ,
{
OUStringList::const_iterator pIt;
OUStringList lTemp;
+ lTemp.reserve(rPath.lInternalPaths.size() + rPath.lUserPaths.size() + 1);
for ( pIt = rPath.lInternalPaths.begin();
pIt != rPath.lInternalPaths.end() ;
@@ -857,7 +865,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
if (aChangePath.bIsSinglePath)
{
LOG_ASSERT2(lList.size()>1, "PathSettings::impl_setPathValue()", "You try to set more then path value for a defined SINGLE_PATH!")
- if (lList.size()>0)
+ if ( !lList.empty() )
aChangePath.sWritePath = *(lList.begin());
else
aChangePath.sWritePath = ::rtl::OUString();
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 66bb9710d1..ee766efeee 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -295,7 +295,7 @@ void SubstitutePathVariables_Impl::GetSharePointsRules( SubstituteVariables& aSu
SubstituteRuleVector aRuleSet;
ReadSharePointRuleSetFromConfiguration( aSharePointNames[ nSharePoints ], aSharePointNodeName, aRuleSet );
- if ( aRuleSet.size() > 0 )
+ if ( !aRuleSet.empty() )
{
// We have at minimum one rule. Filter the correct rule out of the rule set
// and put into our SubstituteVariable map
@@ -409,10 +409,11 @@ sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector
{
sal_Bool bResult = sal_False;
- if ( aRuleSet.size() >= 1 )
+ if ( !aRuleSet.empty() )
{
sal_Int16 nPrioCurrentRule = aEnvPrioTable[ ET_UNKNOWN ];
- for ( sal_Int32 nIndex = 0; nIndex < (sal_Int32)aRuleSet.size(); nIndex++ )
+ const sal_uInt32 nCount = aRuleSet.size();
+ for ( sal_uInt32 nIndex = 0; nIndex < nCount; nIndex++ )
{
const SubstituteRule& aRule = aRuleSet[nIndex];
EnvironmentType eEnvType = aRule.aEnvType;
@@ -587,19 +588,6 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
//*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
-DEFINE_XINTERFACE_3 ( SubstitutePathVariables ,
- OWeakObject ,
- DIRECT_INTERFACE( css::lang::XTypeProvider ),
- DIRECT_INTERFACE( css::lang::XServiceInfo ),
- DIRECT_INTERFACE( css::util::XStringSubstitution )
- )
-
-DEFINE_XTYPEPROVIDER_3 ( SubstitutePathVariables ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- css::util::XStringSubstitution
- )
-
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( SubstitutePathVariables ,
::cppu::OWeakObject ,
SERVICENAME_SUBSTITUTEPATHVARIABLES ,
@@ -616,6 +604,7 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XMultiService
m_aImpl( LINK( this, SubstitutePathVariables, implts_ConfigurationNotify )),
m_xServiceManager( xServiceManager )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::SubstitutePathVariables" );
int i;
SetPredefinedPathVariables( m_aPreDefVars );
@@ -674,6 +663,7 @@ SubstitutePathVariables::~SubstitutePathVariables()
rtl::OUString SAL_CALL SubstitutePathVariables::substituteVariables( const ::rtl::OUString& aText, sal_Bool bSubstRequired )
throw ( NoSuchElementException, RuntimeException )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::substituteVariables" );
ResetableGuard aLock( m_aLock );
return impl_substituteVariable( aText, bSubstRequired );
}
@@ -681,6 +671,7 @@ throw ( NoSuchElementException, RuntimeException )
rtl::OUString SAL_CALL SubstitutePathVariables::reSubstituteVariables( const ::rtl::OUString& aText )
throw ( RuntimeException )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::reSubstituteVariables" );
ResetableGuard aLock( m_aLock );
return impl_reSubstituteVariables( aText );
}
@@ -688,6 +679,7 @@ throw ( RuntimeException )
rtl::OUString SAL_CALL SubstitutePathVariables::getSubstituteVariableValue( const ::rtl::OUString& aVariable )
throw ( NoSuchElementException, RuntimeException )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::getSubstituteVariableValue" );
ResetableGuard aLock( m_aLock );
return impl_getSubstituteVariableValue( aVariable );
}
@@ -707,6 +699,7 @@ IMPL_LINK( SubstitutePathVariables, implts_ConfigurationNotify, SubstitutePathNo
rtl::OUString SubstitutePathVariables::ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::ConvertOSLtoUCBURL" );
String aResult;
rtl::OUString aTemp;
@@ -722,28 +715,28 @@ rtl::OUString SubstitutePathVariables::ConvertOSLtoUCBURL( const rtl::OUString&
rtl::OUString SubstitutePathVariables::GetWorkPath() const
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::GetWorkPath" );
rtl::OUString aWorkPath;
- css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
+ ::comphelper::ConfigurationHelper::readDirectKey(
m_xServiceManager,
::rtl::OUString::createFromAscii("org.openoffice.Office.Paths"),
::rtl::OUString::createFromAscii("Paths/Work"),
::rtl::OUString::createFromAscii("WritePath"),
- ::comphelper::ConfigurationHelper::E_READONLY);
- aVal >>= aWorkPath;
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= aWorkPath;
return aWorkPath;
}
rtl::OUString SubstitutePathVariables::GetWorkVariableValue() const
{
- css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::GetWorkVariableValue" );
+ ::rtl::OUString aWorkPath;
+ ::comphelper::ConfigurationHelper::readDirectKey(
m_xServiceManager,
::rtl::OUString::createFromAscii("org.openoffice.Office.Paths"),
::rtl::OUString::createFromAscii("Variables"),
::rtl::OUString::createFromAscii("Work"),
- ::comphelper::ConfigurationHelper::E_READONLY);
- ::rtl::OUString aWorkPath;
- aVal >>= aWorkPath;
-
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= aWorkPath;
+
// fallback to $HOME in case platform dependend config layer does not return
// an usuable work dir value.
if (aWorkPath.getLength() < 1)
@@ -756,6 +749,7 @@ rtl::OUString SubstitutePathVariables::GetWorkVariableValue() const
rtl::OUString SubstitutePathVariables::GetHomeVariableValue() const
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::GetHomeVariableValue" );
osl::Security aSecurity;
rtl::OUString aHomePath;
@@ -765,6 +759,7 @@ rtl::OUString SubstitutePathVariables::GetHomeVariableValue() const
rtl::OUString SubstitutePathVariables::GetPathVariableValue() const
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::GetPathVariableValue" );
const int PATH_EXTEND_FACTOR = 120;
rtl::OUString aRetStr;
@@ -801,6 +796,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const
rtl::OUString SubstitutePathVariables::impl_substituteVariable( const ::rtl::OUString& rText, sal_Bool bSubstRequired )
throw ( NoSuchElementException, RuntimeException )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::impl_substituteVariable" );
// This is maximal recursive depth supported!
const sal_Int32 nMaxRecursiveDepth = 8;
@@ -928,7 +924,8 @@ throw ( NoSuchElementException, RuntimeException )
else
{
// Check for recursion
- for ( sal_Int32 i=0; i < (sal_Int32)aEndlessRecursiveDetector.size(); i++ )
+ const sal_uInt32 nCount = aEndlessRecursiveDetector.size();
+ for ( sal_uInt32 i=0; i < nCount; i++ )
{
if ( aEndlessRecursiveDetector[i] == aWorkText )
{
@@ -992,6 +989,7 @@ throw ( NoSuchElementException, RuntimeException )
rtl::OUString SubstitutePathVariables::impl_reSubstituteVariables( const ::rtl::OUString& rURL )
throw ( RuntimeException )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::impl_reSubstituteVariables" );
rtl::OUString aURL;
INetURLObject aUrl( rURL );
@@ -1096,6 +1094,7 @@ throw ( RuntimeException )
::rtl::OUString SubstitutePathVariables::impl_getSubstituteVariableValue( const ::rtl::OUString& rVariable )
throw ( NoSuchElementException, RuntimeException )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::impl_getSubstituteVariableValue" );
rtl::OUString aVariable;
sal_Int32 nPos = rVariable.indexOf( m_aVarStart );
@@ -1148,6 +1147,7 @@ throw ( NoSuchElementException, RuntimeException )
void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariables& aPreDefPathVariables )
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::SetPredefinedPathVariables" );
Any aAny;
::rtl::OUString aOfficePath;
::rtl::OUString aUserPath;
@@ -1204,9 +1204,8 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
// Detect the language type of the current office
aPreDefPathVariables.m_eLanguageType = LANGUAGE_ENGLISH_US;
- Any aLocale = utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( utl::ConfigManager::LOCALE );
rtl::OUString aLocaleStr;
- if ( aLocale >>= aLocaleStr )
+ if ( utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( utl::ConfigManager::LOCALE ) >>= aLocaleStr )
aPreDefPathVariables.m_eLanguageType = MsLangId::convertIsoStringToLanguage( aLocaleStr );
else
{
diff --git a/framework/source/services/uriabbreviation.cxx b/framework/source/services/uriabbreviation.cxx
index ad8177f5eb..c7655f5cc5 100644
--- a/framework/source/services/uriabbreviation.cxx
+++ b/framework/source/services/uriabbreviation.cxx
@@ -55,19 +55,6 @@ namespace css = ::com::sun::star;
//*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
-DEFINE_XINTERFACE_3 ( UriAbbreviation ,
- cppu::OWeakObject ,
- DIRECT_INTERFACE(css::lang::XTypeProvider ),
- DIRECT_INTERFACE(css::lang::XServiceInfo ),
- DIRECT_INTERFACE(css::util::XStringAbbreviation )
- )
-
-DEFINE_XTYPEPROVIDER_3 ( UriAbbreviation ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- css::util::XStringAbbreviation
- )
-
DEFINE_XSERVICEINFO_MULTISERVICE_2 ( UriAbbreviation ,
::cppu::OWeakObject ,
SERVICENAME_STRINGABBREVIATION ,
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index 6d8000694d..f04827592e 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -77,21 +77,11 @@ using namespace ::com::sun::star::util ;
//*****************************************************************************************************************
// constructor
//*****************************************************************************************************************
-URLTransformer::URLTransformer( const Reference< XMultiServiceFactory >& xFactory )
- // Init baseclasses first
- // Attention:
- // Don't change order of initialization!
- // ThreadHelpBase is a struct with a mutex as member. We can't use a mutex as member, while
- // we must garant right initialization and a valid value of this! First initialize
- // baseclasses and then members. And we need the mutex for other baseclasses !!!
- : ThreadHelpBase ( &Application::GetSolarMutex() )
- , OWeakObject ( )
- // Init member
- , m_xFactory ( xFactory )
+URLTransformer::URLTransformer( const Reference< XMultiServiceFactory >& /*xFactory*/ )
{
// Safe impossible cases.
// Method not defined for all incoming parameter.
- LOG_ASSERT( xFactory.is(), "URLTransformer::URLTransformer()\nInvalid parameter detected!\n" )
+ //LOG_ASSERT( xFactory.is(), "URLTransformer::URLTransformer()\nInvalid parameter detected!\n" )
}
//*****************************************************************************************************************
@@ -105,19 +95,6 @@ URLTransformer::~URLTransformer()
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
-DEFINE_XINTERFACE_3 ( URLTransformer ,
- OWeakObject ,
- DIRECT_INTERFACE(XTypeProvider ),
- DIRECT_INTERFACE(XServiceInfo ),
- DIRECT_INTERFACE(XURLTransformer )
- )
-
-DEFINE_XTYPEPROVIDER_3 ( URLTransformer ,
- XTypeProvider ,
- XServiceInfo ,
- XURLTransformer
- )
-
DEFINE_XSERVICEINFO_MULTISERVICE ( URLTransformer ,
OWeakObject ,
SERVICENAME_URLTRANSFORMER ,
@@ -129,21 +106,68 @@ DEFINE_INIT_SERVICE ( URLTransformer,
}
)
+namespace
+{
+ void lcl_ParserHelper(INetURLObject& _rParser,URL& _rURL,bool _bUseIntern)
+ {
+ // Get all information about this URL.
+ _rURL.Protocol = INetURLObject::GetScheme( _rParser.GetProtocol() );
+ _rURL.User = _rParser.GetUser ( INetURLObject::DECODE_WITH_CHARSET );
+ _rURL.Password = _rParser.GetPass ( INetURLObject::DECODE_WITH_CHARSET );
+ _rURL.Server = _rParser.GetHost ( INetURLObject::DECODE_WITH_CHARSET );
+ _rURL.Port = (sal_Int16)_rParser.GetPort();
+
+ sal_Int32 nCount = _rParser.getSegmentCount( false );
+ if ( nCount > 0 )
+ {
+ // Don't add last segment as it is the name!
+ --nCount;
+
+ rtl::OUStringBuffer aPath;
+ for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ aPath.append( sal_Unicode( '/' ));
+ aPath.append( _rParser.getName( nIndex, false, INetURLObject::NO_DECODE ));
+ }
+
+ if ( nCount > 0 )
+ aPath.append( sal_Unicode( '/' )); // final slash!
+
+ _rURL.Path = aPath.makeStringAndClear();
+ _rURL.Name = _rParser.getName( INetURLObject::LAST_SEGMENT, false, INetURLObject::NO_DECODE );
+ }
+ else
+ {
+ _rURL.Path = _rParser.GetURLPath( INetURLObject::NO_DECODE );
+ _rURL.Name = _rParser.GetName ( );
+ }
+
+ _rURL.Arguments = _rParser.GetParam ( INetURLObject::NO_DECODE );
+ _rURL.Mark = _rParser.GetMark ( INetURLObject::DECODE_WITH_CHARSET );
+
+ // INetURLObject supports only an intelligent method of parsing URL's. So write
+ // back Complete to have a valid encoded URL in all cases!
+ _rURL.Complete = _rParser.GetMainURL( INetURLObject::NO_DECODE );
+ if ( _bUseIntern )
+ _rURL.Complete = _rURL.Complete.intern();
+
+ _rParser.SetMark ( ::rtl::OUString() );
+ _rParser.SetParam( ::rtl::OUString() );
+
+ _rURL.Main = _rParser.GetMainURL( INetURLObject::NO_DECODE );
+ }
+}
//*****************************************************************************************************************
// XURLTransformer
//*****************************************************************************************************************
sal_Bool SAL_CALL URLTransformer::parseStrict( URL& aURL ) throw( RuntimeException )
{
- // Ready for multithreading
- ResetableGuard aGuard( m_aLock );
-
// Safe impossible cases.
if (( &aURL == NULL ) ||
( aURL.Complete.getLength() < 1 ) )
{
return sal_False;
}
-
// Try to extract the protocol
sal_Int32 nURLIndex = aURL.Complete.indexOf( sal_Unicode( ':' ));
::rtl::OUString aProtocol;
@@ -165,50 +189,7 @@ sal_Bool SAL_CALL URLTransformer::parseStrict( URL& aURL ) throw( RuntimeExcepti
}
else if ( !aParser.HasError() )
{
- aURL.Protocol = INetURLObject::GetScheme( aParser.GetProtocol() );
- aURL.User = aParser.GetUser ( INetURLObject::DECODE_WITH_CHARSET );
- aURL.Password = aParser.GetPass ( INetURLObject::DECODE_WITH_CHARSET );
- aURL.Server = aParser.GetHost ( INetURLObject::DECODE_WITH_CHARSET );
- aURL.Port = (sal_Int16)aParser.GetPort();
-
- sal_Int32 nCount = aParser.getSegmentCount( false );
- if ( nCount > 0 )
- {
- // Don't add last segment as it is the name!
- --nCount;
-
- rtl::OUStringBuffer aPath;
- for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
- {
- aPath.append( sal_Unicode( '/' ));
- aPath.append( aParser.getName( nIndex, false, INetURLObject::NO_DECODE ));
- }
-
- if ( nCount > 0 )
- aPath.append( sal_Unicode( '/' )); // final slash!
-
- aURL.Path = aPath.makeStringAndClear();
- aURL.Name = aParser.getName( INetURLObject::LAST_SEGMENT, false, INetURLObject::NO_DECODE );
- }
- else
- {
- aURL.Path = aParser.GetURLPath( INetURLObject::NO_DECODE );
- aURL.Name = aParser.GetName ( );
- }
-
- aURL.Arguments = aParser.GetParam ( INetURLObject::NO_DECODE );
- aURL.Mark = aParser.GetMark ( INetURLObject::DECODE_WITH_CHARSET );
-
- // INetURLObject supports only an intelligent method of parsing URL's. So write
- // back Complete to have a valid encoded URL in all cases!
- aURL.Complete = aParser.GetMainURL( INetURLObject::NO_DECODE );
- aURL.Complete = aURL.Complete.intern();
-
- aParser.SetMark ( ::rtl::OUString() );
- aParser.SetParam( ::rtl::OUString() );
-
- aURL.Main = aParser.GetMainURL( INetURLObject::NO_DECODE );
-
+ lcl_ParserHelper(aParser,aURL,false);
// Return "URL is parsed".
return sal_True;
}
@@ -235,8 +216,6 @@ sal_Bool SAL_CALL URLTransformer::parseStrict( URL& aURL ) throw( RuntimeExcepti
sal_Bool SAL_CALL URLTransformer::parseSmart( URL& aURL ,
const ::rtl::OUString& sSmartProtocol ) throw( RuntimeException )
{
- // Ready for multithreading
- ResetableGuard aGuard( m_aLock );
// Safe impossible cases.
if (( &aURL == NULL ) ||
( aURL.Complete.getLength() < 1 ) )
@@ -251,48 +230,7 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( URL& aURL ,
bool bOk = aParser.SetSmartURL( aURL.Complete );
if ( bOk )
{
- // Get all information about this URL.
- aURL.Protocol = INetURLObject::GetScheme( aParser.GetProtocol() );
- aURL.User = aParser.GetUser ( INetURLObject::DECODE_WITH_CHARSET );
- aURL.Password = aParser.GetPass ( INetURLObject::DECODE_WITH_CHARSET );
- aURL.Server = aParser.GetHost ( INetURLObject::DECODE_WITH_CHARSET );
- aURL.Port = (sal_Int16)aParser.GetPort();
-
- sal_Int32 nCount = aParser.getSegmentCount( false );
- if ( nCount > 0 )
- {
- // Don't add last segment as it is the name!
- --nCount;
-
- rtl::OUStringBuffer aPath;
- for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
- {
- aPath.append( sal_Unicode( '/' ));
- aPath.append( aParser.getName( nIndex, false, INetURLObject::NO_DECODE ));
- }
-
- if ( nCount > 0 )
- aPath.append( sal_Unicode( '/' )); // final slash!
-
- aURL.Path = aPath.makeStringAndClear();
- aURL.Name = aParser.getName( INetURLObject::LAST_SEGMENT, false, INetURLObject::NO_DECODE );
- }
- else
- {
- aURL.Path = aParser.GetURLPath( INetURLObject::NO_DECODE );
- aURL.Name = aParser.GetName ( );
- }
-
- aURL.Arguments = aParser.GetParam ( INetURLObject::NO_DECODE );
- aURL.Mark = aParser.GetMark ( INetURLObject::DECODE_WITH_CHARSET );
-
- aURL.Complete = aParser.GetMainURL( INetURLObject::NO_DECODE );
-
- aParser.SetMark ( ::rtl::OUString() );
- aParser.SetParam( ::rtl::OUString() );
-
- aURL.Main = aParser.GetMainURL( INetURLObject::NO_DECODE );
-
+ lcl_ParserHelper(aParser,aURL,true);
// Return "URL is parsed".
return sal_True;
}
@@ -333,9 +271,6 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( URL& aURL ,
//*****************************************************************************************************************
sal_Bool SAL_CALL URLTransformer::assemble( URL& aURL ) throw( RuntimeException )
{
- // Ready for multithreading
- ResetableGuard aGuard( m_aLock );
-
// Safe impossible cases.
if ( &aURL == NULL )
return sal_False ;
@@ -400,9 +335,6 @@ sal_Bool SAL_CALL URLTransformer::assemble( URL& aURL ) throw( RuntimeException
::rtl::OUString SAL_CALL URLTransformer::getPresentation( const URL& aURL ,
sal_Bool bWithPassword ) throw( RuntimeException )
{
- // Ready for multithreading
- ResetableGuard aGuard( m_aLock );
-
// Safe impossible cases.
if (( &aURL == NULL ) ||
( aURL.Complete.getLength() < 1 ) ||
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index 5a3431bd49..72d7b4a1c5 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/WindowDescriptor.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
diff --git a/framework/source/tabwin/tabwinfactory.cxx b/framework/source/tabwin/tabwinfactory.cxx
index 6bf4eafd4b..bde6ef7524 100644
--- a/framework/source/tabwin/tabwinfactory.cxx
+++ b/framework/source/tabwin/tabwinfactory.cxx
@@ -70,19 +70,6 @@ namespace framework
//*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
-DEFINE_XINTERFACE_3 ( TabWinFactory ,
- OWeakObject ,
- DIRECT_INTERFACE( css::lang::XTypeProvider ),
- DIRECT_INTERFACE( css::lang::XServiceInfo ),
- DIRECT_INTERFACE( css::lang::XSingleComponentFactory )
- )
-
-DEFINE_XTYPEPROVIDER_3 ( TabWinFactory ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- css::lang::XSingleComponentFactory
- )
-
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( TabWinFactory ,
::cppu::OWeakObject ,
SERVICENAME_TABWINFACTORY ,
diff --git a/framework/source/threadhelp/transactionmanager.cxx b/framework/source/threadhelp/transactionmanager.cxx
index 3b1519fa22..17b06afa67 100644
--- a/framework/source/threadhelp/transactionmanager.cxx
+++ b/framework/source/threadhelp/transactionmanager.cxx
@@ -43,7 +43,7 @@
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
-
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
diff --git a/framework/source/uiconfiguration/graphicnameaccess.cxx b/framework/source/uiconfiguration/graphicnameaccess.cxx
index aee1b9e0a9..658d18df01 100644
--- a/framework/source/uiconfiguration/graphicnameaccess.cxx
+++ b/framework/source/uiconfiguration/graphicnameaccess.cxx
@@ -103,7 +103,7 @@ throw(::com::sun::star::uno::RuntimeException)
sal_Bool SAL_CALL GraphicNameAccess::hasElements()
throw( uno::RuntimeException )
{
- return ( m_aNameToElementMap.size() > 0 );
+ return ( !m_aNameToElementMap.empty() );
}
uno::Type SAL_CALL GraphicNameAccess::getElementType()
diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx
index 06af65cf52..18eb67dea3 100644
--- a/framework/source/uiconfiguration/imagemanager.cxx
+++ b/framework/source/uiconfiguration/imagemanager.cxx
@@ -35,6 +35,7 @@
#include <xml/imagesconfiguration.hxx>
#include <uiconfiguration/graphicnameaccess.hxx>
#include <services.h>
+#include "imagemanagerimpl.hxx"
#include "properties.h"
@@ -62,6 +63,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/pngread.hxx>
#include <vcl/pngwrite.hxx>
+#include <rtl/logfile.hxx>
//_________________________________________________________________________________________________________________
// namespaces
@@ -90,55 +92,14 @@ const sal_Int32 IMAGE_SIZE_LARGE = 26;
const sal_Int16 MAX_IMAGETYPE_VALUE = ::com::sun::star::ui::ImageType::COLOR_HIGHCONTRAST|
::com::sun::star::ui::ImageType::SIZE_LARGE;
-static const char IMAGE_FOLDER[] = "images";
-static const char BITMAPS_FOLDER[] = "Bitmaps";
-static const char IMAGE_EXTENSION[] = ".png";
-
-static const char* IMAGELIST_XML_FILE[] =
-{
- "sc_imagelist.xml",
- "lc_imagelist.xml",
- "sch_imagelist.xml",
- "lch_imagelist.xml"
-};
-
-static const char* BITMAP_FILE_NAMES[] =
-{
- "sc_userimages.png",
- "lc_userimages.png",
- "sch_userimages.png",
- "lch_userimages.png"
-};
-
namespace framework
{
-static char ModuleImageList[] = "private:resource/images/moduleimages";
-
typedef GraphicNameAccess CmdToXGraphicNameAccess;
//*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
-DEFINE_XINTERFACE_6 ( ImageManager ,
- OWeakObject ,
- DIRECT_INTERFACE( css::lang::XTypeProvider ),
- DIRECT_INTERFACE( css::lang::XComponent ),
- DIRECT_INTERFACE( css::lang::XInitialization ),
- DIRECT_INTERFACE( ::com::sun::star::ui::XImageManager ),
- DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfiguration ),
- DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationPersistence )
- )
-
-DEFINE_XTYPEPROVIDER_6 ( ImageManager ,
- css::lang::XTypeProvider ,
- css::lang::XComponent ,
- css::lang::XInitialization ,
- ::com::sun::star::ui::XImageManager ,
- ::com::sun::star::ui::XUIConfiguration ,
- ::com::sun::star::ui::XUIConfigurationPersistence
- )
-
DEFINE_XSERVICEINFO_MULTISERVICE ( ImageManager ,
::cppu::OWeakObject ,
SERVICENAME_IMAGEMANAGER ,
@@ -147,471 +108,69 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ImageManager ,
DEFINE_INIT_SERVICE ( ImageManager, {} )
-static sal_Bool implts_checkAndScaleGraphic( uno::Reference< XGraphic >& rOutGraphic, const uno::Reference< XGraphic >& rInGraphic, sal_Int16 nImageType )
-{
- static Size aNormSize( IMAGE_SIZE_NORMAL, IMAGE_SIZE_NORMAL );
- static Size aLargeSize( IMAGE_SIZE_LARGE, IMAGE_SIZE_LARGE );
-
- if ( !rInGraphic.is() )
- {
- rOutGraphic = Image().GetXGraphic();
- return sal_False;
- }
-
- // Check size and scale it
- Image aImage( rInGraphic );
- Size aSize = aImage.GetSizePixel();
- bool bMustScale( false );
-
- if (( nImageType == ImageType_Color_Large ) ||
- ( nImageType == ImageType_HC_Large ))
- bMustScale = ( aSize != aLargeSize );
- else
- bMustScale = ( aSize != aNormSize );
-
- if ( bMustScale )
- {
- BitmapEx aBitmap = aImage.GetBitmapEx();
- aBitmap.Scale( aNormSize );
- aImage = Image( aBitmap );
- rOutGraphic = aImage.GetXGraphic();
- }
- else
- rOutGraphic = rInGraphic;
- return sal_True;
-}
-
-static sal_Int16 implts_convertImageTypeToIndex( sal_Int16 nImageType )
-{
- sal_Int16 nIndex( 0 );
- if ( nImageType & ::com::sun::star::ui::ImageType::SIZE_LARGE )
- nIndex += 1;
- if ( nImageType & ::com::sun::star::ui::ImageType::COLOR_HIGHCONTRAST )
- nIndex += 2;
- return nIndex;
-}
-
-ImageList* ImageManager::implts_getUserImageList( ImageType nImageType )
-{
- ResetableGuard aGuard( m_aLock );
- if ( !m_pUserImageList[nImageType] )
- implts_loadUserImages( nImageType, m_xUserImageStorage, m_xUserBitmapsStorage );
-
- return m_pUserImageList[nImageType];
-}
-
-void ImageManager::implts_initialize()
-{
- // Initialize the top-level structures with the storage data
- if ( m_xUserConfigStorage.is() )
- {
- long nModes = m_bReadOnly ? ElementModes::READ : ElementModes::READWRITE;
-
- try
- {
- m_xUserImageStorage = m_xUserConfigStorage->openStorageElement( OUString::createFromAscii( IMAGE_FOLDER ),
- nModes );
- if ( m_xUserImageStorage.is() )
- {
- m_xUserBitmapsStorage = m_xUserImageStorage->openStorageElement( OUString::createFromAscii( BITMAPS_FOLDER ),
- nModes );
- }
- }
- catch ( com::sun::star::container::NoSuchElementException& )
- {
- }
- catch ( ::com::sun::star::embed::InvalidStorageException& )
- {
- }
- catch ( ::com::sun::star::lang::IllegalArgumentException& )
- {
- }
- catch ( ::com::sun::star::io::IOException& )
- {
- }
- catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
- {
- }
- }
-}
-
-sal_Bool ImageManager::implts_loadUserImages(
- ImageType nImageType,
- const uno::Reference< XStorage >& xUserImageStorage,
- const uno::Reference< XStorage >& xUserBitmapsStorage )
-{
- ResetableGuard aGuard( m_aLock );
-
- if ( xUserImageStorage.is() && xUserBitmapsStorage.is() )
- {
- try
- {
- uno::Reference< XStream > xStream = xUserImageStorage->openStreamElement( rtl::OUString::createFromAscii( IMAGELIST_XML_FILE[nImageType] ),
- ElementModes::READ );
- uno::Reference< XInputStream > xInputStream = xStream->getInputStream();
-
- ImageListsDescriptor aUserImageListInfo;
- ImagesConfiguration::LoadImages( m_xServiceManager,
- xInputStream,
- aUserImageListInfo );
- if (( aUserImageListInfo.pImageList != 0 ) &&
- ( aUserImageListInfo.pImageList->Count() > 0 ))
- {
- ImageListItemDescriptor* pList = aUserImageListInfo.pImageList->GetObject(0);
- sal_Int32 nCount = pList->pImageItemList->Count();
-
- std::vector< OUString > aUserImagesVector;
- for ( USHORT i=0; i < nCount; i++ )
- {
- const ImageItemDescriptor* pItem = pList->pImageItemList->GetObject(i);
- aUserImagesVector.push_back( pItem->aCommandURL );
- }
-
- uno::Reference< XStream > xBitmapStream = xUserBitmapsStorage->openStreamElement(
- rtl::OUString::createFromAscii( BITMAP_FILE_NAMES[nImageType] ),
- ElementModes::READ );
-
- if ( xBitmapStream.is() )
- {
- SvStream* pSvStream( 0 );
- BitmapEx aUserBitmap;
- {
- pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream );
- vcl::PNGReader aPngReader( *pSvStream );
- aUserBitmap = aPngReader.Read();
- }
- delete pSvStream;
-
- // Delete old image list and create a new one from the read bitmap
- delete m_pUserImageList[nImageType];
- m_pUserImageList[nImageType] = new ImageList();
- m_pUserImageList[nImageType]->InsertFromHorizontalStrip
- ( aUserBitmap, aUserImagesVector );
- return sal_True;
- }
- }
- }
- catch ( com::sun::star::container::NoSuchElementException& )
- {
- }
- catch ( ::com::sun::star::embed::InvalidStorageException& )
- {
- }
- catch ( ::com::sun::star::lang::IllegalArgumentException& )
- {
- }
- catch ( ::com::sun::star::io::IOException& )
- {
- }
- catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
- {
- }
- }
-
- // Destroy old image list - create a new empty one
- delete m_pUserImageList[nImageType];
- m_pUserImageList[nImageType] = new ImageList;
-
- return sal_True;
-}
-
-sal_Bool ImageManager::implts_storeUserImages(
- ImageType nImageType,
- const uno::Reference< XStorage >& xUserImageStorage,
- const uno::Reference< XStorage >& xUserBitmapsStorage )
-{
- ResetableGuard aGuard( m_aLock );
-
- if ( m_bModified )
- {
- ImageList* pImageList = implts_getUserImageList( nImageType );
- if ( pImageList->GetImageCount() > 0 )
- {
- ImageListsDescriptor aUserImageListInfo;
- aUserImageListInfo.pImageList = new ImageListDescriptor;
-
- ImageListItemDescriptor* pList = new ImageListItemDescriptor;
- aUserImageListInfo.pImageList->Insert( pList, 0 );
-
- pList->pImageItemList = new ImageItemListDescriptor;
- for ( USHORT i=0; i < pImageList->GetImageCount(); i++ )
- {
- ImageItemDescriptor* pItem = new ::framework::ImageItemDescriptor;
-
- pItem->nIndex = i;
- pItem->aCommandURL = pImageList->GetImageName( i );
- pList->pImageItemList->Insert( pItem, pList->pImageItemList->Count() );
- }
-
- pList->aURL = String::CreateFromAscii("Bitmaps/");
- pList->aURL += String::CreateFromAscii( BITMAP_FILE_NAMES[nImageType] );
-
- uno::Reference< XTransactedObject > xTransaction;
- uno::Reference< XOutputStream > xOutputStream;
- uno::Reference< XStream > xStream = xUserImageStorage->openStreamElement( rtl::OUString::createFromAscii( IMAGELIST_XML_FILE[nImageType] ),
- ElementModes::WRITE|ElementModes::TRUNCATE );
- if ( xStream.is() )
- {
- uno::Reference< XStream > xBitmapStream =
- xUserBitmapsStorage->openStreamElement( rtl::OUString::createFromAscii( BITMAP_FILE_NAMES[nImageType] ),
- ElementModes::WRITE|ElementModes::TRUNCATE );
- if ( xBitmapStream.is() )
- {
- SvStream* pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream );
- {
- vcl::PNGWriter aPngWriter( pImageList->GetAsHorizontalStrip() );
- aPngWriter.Write( *pSvStream );
- }
- delete pSvStream;
-
- // Commit user bitmaps storage
- xTransaction = uno::Reference< XTransactedObject >( xUserBitmapsStorage, UNO_QUERY );
- if ( xTransaction.is() )
- xTransaction->commit();
- }
-
- xOutputStream = xStream->getOutputStream();
- if ( xOutputStream.is() )
- ImagesConfiguration::StoreImages( m_xServiceManager, xOutputStream, aUserImageListInfo );
-
- // Commit user image storage
- xTransaction = uno::Reference< XTransactedObject >( xUserImageStorage, UNO_QUERY );
- if ( xTransaction.is() )
- xTransaction->commit();
- }
-
- return sal_True;
- }
- else
- {
- // Remove the streams from the storage, if we have no data. We have to catch
- // the NoSuchElementException as it can be possible that there is no stream at all!
- try
- {
- xUserImageStorage->removeElement( rtl::OUString::createFromAscii( IMAGELIST_XML_FILE[nImageType] ));
- }
- catch ( ::com::sun::star::container::NoSuchElementException& )
- {
- }
-
- try
- {
- xUserBitmapsStorage->removeElement( rtl::OUString::createFromAscii( BITMAP_FILE_NAMES[nImageType] ));
- }
- catch ( ::com::sun::star::container::NoSuchElementException& )
- {
- }
-
- uno::Reference< XTransactedObject > xTransaction;
-
- // Commit user image storage
- xTransaction = uno::Reference< XTransactedObject >( xUserImageStorage, UNO_QUERY );
- if ( xTransaction.is() )
- xTransaction->commit();
-
- // Commit user bitmaps storage
- xTransaction = uno::Reference< XTransactedObject >( xUserBitmapsStorage, UNO_QUERY );
- if ( xTransaction.is() )
- xTransaction->commit();
-
- return sal_True;
- }
- }
-
- return sal_False;
-}
-
ImageManager::ImageManager( uno::Reference< XMultiServiceFactory > xServiceManager ) :
ThreadHelpBase( &Application::GetSolarMutex() )
- , m_xUserConfigStorage( 0 )
- , m_xUserImageStorage( 0 )
- , m_xUserBitmapsStorage( 0 )
- , m_bReadOnly( true )
- , m_bInitialized( false )
- , m_bModified( false )
-