summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-15 10:26:12 +0200
committerobo <obo@openoffice.org>2010-06-15 10:26:12 +0200
commit56f57bd9fe0ce39492edf1e9c26faa9fc2abce4d (patch)
tree72c2f6e4450e4d34b1af4c9ee775d6846ba0d02c /framework
parent6093b32cbee907c6cc959b64f4e6f0bf0de8fc89 (diff)
parent88d7f9fbe416d0f4c5edc4a9b5c9560d1d82167b (diff)
CWS-TOOLING: integrate CWS fwk139
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/classes/menumanager.hxx3
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx6
-rw-r--r--framework/source/classes/menumanager.cxx2
-rw-r--r--framework/source/services/pathsettings.cxx1
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx3
-rw-r--r--framework/source/uielement/toolbarmanager.cxx78
6 files changed, 92 insertions, 1 deletions
diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx
index 5c14edde9c03..8826716f1d6f 100644
--- a/framework/inc/classes/menumanager.hxx
+++ b/framework/inc/classes/menumanager.hxx
@@ -82,13 +82,14 @@ class MenuManager : public ThreadHelpBase ,
Menu* pMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
-
+#if 0
MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame,
AddonMenu* pAddonMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
+#endif
virtual ~MenuManager();
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index e7d670e9559b..5e780edb366b 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -60,6 +60,9 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
+//shizhoubo
+#include <com/sun/star/frame/XToolbarController.hpp>
+//end
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
@@ -185,6 +188,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropsForCommand( const ::rtl::OUString& rCmdURL );
void CreateControllers();
void UpdateControllers();
+ //for update controller via Support Visiable by shizhoubo
+ void UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController);
+ //end
void AddFrameActionListener();
void AddImageOrientationListener();
void UpdateImageOrientation();
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 0b2f30093ca8..61cb8eb4a253 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -357,6 +357,7 @@ MenuManager::MenuManager(
SetHdl();
}
+#if 0
// #110897#
MenuManager::MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
@@ -413,6 +414,7 @@ MenuManager::MenuManager(
SetHdl();
}
+#endif
void MenuManager::SetHdl()
{
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index e99e08895a3f..5227cb9f302c 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -855,6 +855,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
::rtl::OUString sVal;
aVal >>= sVal;
OUStringList lList = impl_convertOldStyle2Path(sVal);
+ impl_subst(lList, fa_getSubstitution(), sal_False);
impl_purgeKnownPaths(aChangePath, lList);
if (! impl_isValidPath(lList))
throw css::lang::IllegalArgumentException();
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 2905d0c0bd05..30b0fe5fec1c 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -93,6 +93,9 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo
if ( pVCLPopupMenu )
pPopupMenu = (PopupMenu *)pVCLPopupMenu->GetMenu();
+ if (!pPopupMenu)
+ return;
+
// insert basic
String aCommand = String::CreateFromAscii( ".uno:MacroDialog" );
String aDisplayName = RetrieveLabelFromCommand( aCommand );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index abb263497854..f965d38f6b46 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -517,7 +517,47 @@ void ToolBarManager::UpdateControllers()
}
m_bUpdateControllers = sal_False;
}
+//for update toolbar controller via Support Visible by shizhoubo
+void ToolBarManager::UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController)
+{
+ RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::UpdateControllers" );
+
+ if ( !m_bUpdateControllers )
+ {
+ m_bUpdateControllers = sal_True;
+ try
+ { if(xController.is())
+ {
+ Reference< XUpdatable > xUpdatable( xController, UNO_QUERY );
+ if ( xUpdatable.is() )
+ xUpdatable->update();
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+
+ /* m_bUpdateControllers = sal_True;
+ ToolBarControllerMap::iterator pIter = m_aControllerMap.begin();
+ while ( pIter != m_aControllerMap.end() )
+ {
+ try
+ {
+ Reference< XUpdatable > xUpdatable( pIter->second, UNO_QUERY );
+ if ( xUpdatable.is() )
+ xUpdatable->update();
+ }
+ catch ( Exception& )
+ {
+ }
+ ++pIter;
+ }*/
+
+ }
+ m_bUpdateControllers = sal_False;
+}
+//end
void ToolBarManager::frameAction( const FrameActionEvent& Action )
throw ( RuntimeException )
{
@@ -1072,6 +1112,19 @@ void ToolBarManager::CreateControllers()
Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
xInit->initialize( aArgs );
+ //for Support Visiblitly by shizhoubo
+ if (pController)
+ {
+ // rtl::OUString aCommandURL = pController->m_aCommandURL;
+ if(aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SwitchXFormsDesignMode" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ViewDataSourceBrowser" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaLeftToRight" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaRightToLeft" ))
+ )
+ pController->setFastPropertyValue_NoBroadcast(1,makeAny(sal_True));
+ }
+
+ //end
}
// Request a item window from the toolbar controller and set it at the VCL toolbar
@@ -1092,6 +1145,31 @@ void ToolBarManager::CreateControllers()
}
}
}
+ //for update Controller via support visiable state by shizhoubo
+ Reference< XPropertySet > xPropSet( xController, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ try
+ {
+ sal_Bool bSupportVisiable = sal_True;
+ Any a( xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SupportsVisiable" ))) );
+ a >>= bSupportVisiable;
+ if ( bSupportVisiable )
+ {
+ Reference< XToolbarController > xTbxController( xController, UNO_QUERY );
+ UpdateController(xTbxController);
+ }
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+ //end
+
}
AddFrameActionListener();