[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 29 commits - chart2/source cppuhelper/source dbaccess/source default_images/sc default_images/svx filter/source forms/source framework/inc framework/Library_fwk.mk framework/source framework/test framework/util icu/makefile.mk jvmfwk/distributions jvmfwk/plugins offapi/com officecfg/registry pyuno/source reportdesign/source rsc/source sc/inc sc/source sd/source sfx2/source svtools/source svx/inc svx/source testtools/source unotools/source writerfilter/source
Ariel Constenla-Haile
arielch at apache.org
Fri Apr 26 16:36:40 PDT 2013
chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx | 3
cppuhelper/source/makefile.mk | 1
cppuhelper/source/primeweak.cxx | 21
dbaccess/source/filter/xml/xmlHelper.cxx | 2
dev/null |binary
filter/source/graphicfilter/icgm/bitmap.cxx | 2
filter/source/graphicfilter/ipict/shape.cxx | 51 +
filter/source/msfilter/msdffimp.cxx | 2
forms/source/xforms/model.hxx | 2
framework/Library_fwk.mk | 4
framework/inc/pch/precompiled_framework.hxx | 2
framework/inc/services.h | 2
framework/inc/uielement/menubarmanager.hxx | 4
framework/inc/uielement/statusbarmanager.hxx | 4
framework/inc/uielement/toolbarmanager.hxx | 4
framework/inc/uifactory/factoryconfiguration.hxx | 1
framework/inc/uifactory/popupmenucontrollerfactory.hxx | 63 --
framework/inc/uifactory/statusbarcontrollerfactory.hxx | 58 --
framework/inc/uifactory/toolbarcontrollerfactory.hxx | 87 ---
framework/inc/uifactory/uicontrollerfactory.hxx | 101 +++
framework/source/layoutmanager/layoutmanager.cxx | 1
framework/source/register/registerservices.cxx | 4
framework/source/uielement/addonstoolbarmanager.cxx | 62 +-
framework/source/uielement/menubarmanager.cxx | 91 +--
framework/source/uielement/popupmenucontroller.cxx | 2
framework/source/uielement/statusbarmanager.cxx | 86 +--
framework/source/uielement/toolbarmanager.cxx | 74 +-
framework/source/uifactory/factoryconfiguration.cxx | 1
framework/source/uifactory/popupmenucontrollerfactory.cxx | 89 ---
framework/source/uifactory/statusbarcontrollerfactory.cxx | 87 ---
framework/source/uifactory/toolbarcontrollerfactory.cxx | 258 ---------
framework/source/uifactory/uicontrollerfactory.cxx | 274 ++++++++++
framework/source/unotypes/fwk.xml | 2
framework/test/typecfg/xml2xcd.cxx | 2
framework/util/fwk.component | 2
icu/makefile.mk | 9
jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml | 8
jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx | 5
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 1
offapi/com/sun/star/frame/PopupMenuControllerFactory.idl | 41 -
offapi/com/sun/star/frame/StatusbarControllerFactory.idl | 46 -
offapi/com/sun/star/frame/ToolbarControllerFactory.idl | 47 +
offapi/com/sun/star/frame/XUIControllerFactory.idl | 76 ++
offapi/com/sun/star/frame/makefile.mk | 18
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 3
pyuno/source/module/pyuno_runtime.cxx | 2
reportdesign/source/filter/xml/xmlHelper.cxx | 2
rsc/source/rsc/rsc.cxx | 2
sc/inc/charthelper.hxx | 2
sc/inc/dpglobal.hxx | 1
sc/source/filter/xml/xmlstyle.cxx | 2
sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 30 -
sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc | 5
sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx | 7
sc/source/ui/sidebar/NumberFormatPropertyPanel.src | 20
sd/source/ui/view/sdview.cxx | 8
sfx2/source/sidebar/Theme.cxx | 10
svtools/source/uno/toolboxcontroller.cxx | 2
svx/inc/float3d.hrc | 3
svx/inc/svx/dialogs.hrc | 5
svx/source/engine3d/float3d.src | 4
svx/source/sidebar/SelectionAnalyzer.cxx | 59 +-
svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 168 ++----
svx/source/sidebar/paragraph/ParaPropertyPanel.hrc | 10
svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 15
svx/source/sidebar/paragraph/ParaPropertyPanel.src | 77 --
svx/source/svdraw/svdedxv.cxx | 4
testtools/source/bridgetest/bridgetest.cxx | 6
testtools/source/bridgetest/cppobj.cxx | 4
unotools/source/config/inetoptions.cxx | 21
writerfilter/source/dmapper/ConversionHelper.cxx | 3
71 files changed, 917 insertions(+), 1258 deletions(-)
New commits:
commit eb15aa364708f091c4c59a66f9c3f43e35dafd31
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Fri Apr 26 21:56:47 2013 +0000
Fix build breaker: declare missing member variable
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
index f808eec..5da3f48 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
@@ -205,6 +205,7 @@ private:
::sfx2::sidebar::ControllerItem maBulletNumRuleIndex;
::sfx2::sidebar::ControllerItem maNumNumRuleIndex;
+ cssu::Reference<css::frame::XFrame> mxFrame;
::sfx2::sidebar::EnumContext maContext;
SfxBindings* mpBindings;
ParaLineSpacingPopup maLineSpacePopup;
commit 2f116e91d1960503589ce10b726a5383dead800f
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Fri Apr 26 21:56:36 2013 +0000
Fix build breaker: remove missing images
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.src b/svx/source/sidebar/paragraph/ParaPropertyPanel.src
index 71c538f..9d60c6e 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.src
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.src
@@ -264,20 +264,12 @@ Control RID_SIDEBAR_PARA_PANEL
Identifier = BT_TBX_INDENT_INC ;
HelpID = HID_PPROPERTYPANEL_PARA_TBI_INDENT_INC ;
Text [ en-US ] = "Increase Indent" ;
- ItemBitmap = Bitmap
- {
- File = "symphony/Indent_16x16.png";
- };
};
ToolBoxItem
{
Identifier = BT_TBX_INDENT_DEC ;
HelpID = HID_PPROPERTYPANEL_PARA_TBI_INDENT_DEC ;
Text [ en-US ] = "Decrease Indent" ;
- ItemBitmap = Bitmap
- {
- File = "symphony/Outdent_16x16.png";
- };
};
ToolBoxItem
{
@@ -306,20 +298,12 @@ Control RID_SIDEBAR_PARA_PANEL
Identifier = BT_TBX_INDENT_PROMOTE ;
HelpID = HID_PPROPERTYPANEL_PARA_TBI_INDENTP_INC ;
Text [ en-US ] = "Increase Indent" ;
- ItemBitmap = Bitmap
- {
- File = "symphony/Indent_16x16.png";
- };
};
ToolBoxItem
{
Identifier = BT_TBX_INDENT_DEMOTE ;
HelpID = HID_PPROPERTYPANEL_PARA_TBI_INDENTP_DEC ;
Text [ en-US ] = "Decrease Indent" ;
- ItemBitmap = Bitmap
- {
- File = "symphony/Outdent_16x16.png";
- };
};
ToolBoxItem
{
commit 6c76752527a8906a7cebed1c3318408725b531db
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Fri Apr 26 21:56:29 2013 +0000
Fix resource identifier for STR_COLOR_LIGHT_PRE
diff --git a/svx/inc/float3d.hrc b/svx/inc/float3d.hrc
index 55c0d14..ed8d3ab 100644
--- a/svx/inc/float3d.hrc
+++ b/svx/inc/float3d.hrc
@@ -177,6 +177,3 @@
#define BMP_TEX_CIRCLE_H 159
#define BMP_TEX_FILTER_H 160
#define BMP_COLORDLG_H 161
-// IAccessibility2 implementation 2009. ------
-#define STR_COLOR_LIGHT_PRE 162
-// ------ IAccessibility2 implementation 2009.
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index 0d93616..d27ceb6 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -1099,10 +1099,9 @@
#define OFA_TP_TABPROPERTIES_TEXT (RID_OFA_START + 245)
#define OFA_TP_HELPERPROG (RID_OFA_START + 249)
-// IAccessibility2 implementation 2009. ------
+
#define STR_COLORTABLE (RID_OFA_START + 257)
#define STR_SWITCH (RID_OFA_START + 258)
-// ------ IAccessibility2 implementation 2009.
+#define STR_COLOR_LIGHT_PRE (RID_OFA_START + 259)
#endif
-
diff --git a/svx/source/engine3d/float3d.src b/svx/source/engine3d/float3d.src
index d171452..b5b42be 100644
--- a/svx/source/engine3d/float3d.src
+++ b/svx/source/engine3d/float3d.src
@@ -1434,10 +1434,8 @@ String RID_SVXFLOAT3D_FIX_B
Text [ en-US ] = "B:";
};
-// IAccessibility2 implementation 2009. ------
+
String STR_COLOR_LIGHT_PRE
{
Text [ en-US ] = "Color Light Preview";
};
-// ------ IAccessibility2 implementation 2009.
-
commit d389674108dbae28a8f5577bcf44449f188d2dd0
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Fri Apr 26 21:56:19 2013 +0000
Fix build breaker.
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
index 8ba5bbc..9fa5bb4 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
@@ -44,6 +44,9 @@ enum tSeriesOrDiagramPropertyType
DIAGRAM
};
+extern bool operator!=( const ::com::sun::star::awt::Size & rSize1,
+ const ::com::sun::star::awt::Size & rSize2 );
+
//PROPERTYTYPE is the type of the outer property
template< typename PROPERTYTYPE >
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index de0c96f..b490dcd 100755
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -94,6 +94,12 @@ public:
virtual ~WrappedSymbolBitmapURLProperty();
};
+// this operator is not defined by default
+bool operator!=( const awt::Size & rSize1, const awt::Size & rSize2 )
+{
+ return (rSize1.Width != rSize2.Width) || (rSize1.Height != rSize2.Height);
+}
+
class WrappedSymbolSizeProperty : public WrappedSeriesOrDiagramProperty< awt::Size >
{
public:
commit 52a0a12e677e96ae0df70a710c3e10f00c8abf4b
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Fri Apr 26 21:56:09 2013 +0000
Specify an icon for ".uno:ExtendedHelp"
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index ccdf149..411613b 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -1742,6 +1742,9 @@
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">What's This?</value>
</prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
</node>
<node oor:name=".uno:Extrusion3DColor" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
commit acc7fed28f54f836b0923180431a0c180f91e98c
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Fri Apr 26 21:55:57 2013 +0000
UI Controller Factory fixes
- "ModuleName" --> "ModuleIdentifier": the IDL definition for
css::frame::PopupMenuControllerFactory and
css::frame::StatusbarControllerFactory tells to use a property named
"ModuleIdentifier", but in the code it is named "ModuleName"
- Undocumented css::frame::ToolbarControllerFactory
- Fix service name of ToolbarControllerFactory (ToolbarControllerFactory
instead of ToolBarControllerFactory)
- Convert the three service factories to new style, and use these
new-style services in the source code
- Implement multiple inheritance: added new css::frame::XUIControllerFactory
- Added a (true) base class and implemented the three factories in a
single file
diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk
index 31e32d6..db55c57 100644
--- a/framework/Library_fwk.mk
+++ b/framework/Library_fwk.mk
@@ -174,10 +174,8 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\
framework/source/uifactory/addonstoolboxfactory \
framework/source/uifactory/factoryconfiguration \
framework/source/uifactory/menubarfactory \
- framework/source/uifactory/popupmenucontrollerfactory \
- framework/source/uifactory/statusbarcontrollerfactory \
framework/source/uifactory/statusbarfactory \
- framework/source/uifactory/toolbarcontrollerfactory \
+ framework/source/uifactory/uicontrollerfactory \
framework/source/uifactory/toolboxfactory \
framework/source/uifactory/uielementfactorymanager \
framework/source/uifactory/windowcontentfactorymanager \
diff --git a/framework/inc/pch/precompiled_framework.hxx b/framework/inc/pch/precompiled_framework.hxx
index 644cd27..ceac8cf 100644
--- a/framework/inc/pch/precompiled_framework.hxx
+++ b/framework/inc/pch/precompiled_framework.hxx
@@ -176,7 +176,7 @@
#include "com/sun/star/frame/XTasksSupplier.hpp"
#include "com/sun/star/frame/XTerminateListener.hpp"
#include "com/sun/star/frame/XToolbarController.hpp"
-#include "com/sun/star/frame/XUIControllerRegistration.hpp"
+#include "com/sun/star/frame/XUIControllerFactory.hpp"
#include "com/sun/star/frame/XWindowArranger.hpp"
#include "com/sun/star/frame/status/FontHeight.hpp"
#include "com/sun/star/frame/status/ItemState.hpp"
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 217edb7..7741220 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -102,7 +102,7 @@ namespace framework{
#define SERVICENAME_TEMPFILE DECLARE_ASCII("com.sun.star.io.TempFile" )
#define SERVICENAME_PACKAGESTRUCTURECREATOR DECLARE_ASCII("com.sun.star.embed.PackageStructureCreator" )
#define SERVICENAME_TOOLBARFACTORY DECLARE_ASCII("com.sun.star.ui.ToolBarFactory" )
-#define SERVICENAME_TOOLBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.ToolBarControllerFactory" )
+#define SERVICENAME_TOOLBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.ToolbarControllerFactory" )
#define SERVICENAME_LICENSE SERVICENAME_JOB
#define SERVICENAME_AUTORECOVERY DECLARE_ASCII("com.sun.star.frame.AutoRecovery" )
#define SERVICENAME_GLOBALEVENTBROADCASTER DECLARE_ASCII("com.sun.star.frame.GlobalEventBroadcaster" )
diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx
index bef403d..1d8ef3f 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -51,7 +51,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/frame/XUIControllerRegistration.hpp>
+#include <com/sun/star/frame/XUIControllerFactory.hpp>
#include <com/sun/star/ui/XUIConfigurationListener.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
@@ -253,7 +253,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
Menu* m_pVCLMenu;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XUIControllerRegistration > m_xPopupMenuControllerRegistration;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XUIControllerFactory > m_xPopupMenuControllerFactory;
::std::vector< MenuItemHandler* > m_aMenuItemHandlerVector;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx
index b579ba2..4711111 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -40,7 +40,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/frame/XUIControllerFactory.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -132,7 +132,7 @@ class StatusBarManager : public ::com::sun::star::frame::XFrameActionListener
StatusBarControllerMap m_aControllerMap;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XUIControllerRegistration > m_xStatusbarControllerRegistration;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XUIControllerFactory > m_xStatusbarControllerFactory;
};
}
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 284c126..64edf01 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -46,7 +46,7 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/XUIControllerRegistration.hpp>
+#include <com/sun/star/frame/XUIControllerFactory.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
@@ -230,7 +230,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
ToolBarControllerMap m_aControllerMap;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XUIControllerRegistration > m_xToolbarControllerRegistration;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XUIControllerFactory > m_xToolbarControllerFactory;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XImageManager > m_xModuleImageManager;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XImageManager > m_xDocImageManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xImageOrientationListener;
diff --git a/framework/inc/uifactory/factoryconfiguration.hxx b/framework/inc/uifactory/factoryconfiguration.hxx
index a3d21b4..4feb429 100644
--- a/framework/inc/uifactory/factoryconfiguration.hxx
+++ b/framework/inc/uifactory/factoryconfiguration.hxx
@@ -38,7 +38,6 @@
#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
diff --git a/framework/inc/uifactory/popupmenucontrollerfactory.hxx b/framework/inc/uifactory/popupmenucontrollerfactory.hxx
deleted file mode 100644
index c4bd8c6..0000000
--- a/framework/inc/uifactory/popupmenucontrollerfactory.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-#ifndef __FRAMEWORK_UIFACTORY_POPUPMENUCONTROLLERFACTORY_HXX_
-#define __FRAMEWORK_UIFACTORY_POPUPMENUCONTROLLERFACTORY_HXX_
-
-/** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
- with solaris headers ...
-*/
-#include <vector>
-#include <list>
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-#include <macros/xserviceinfo.hxx>
-#include <stdtypes.h>
-#include <uifactory/toolbarcontrollerfactory.hxx>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-
-namespace framework
-{
-
-class ConfigurationAccess_ControllerFactory;
-class PopupMenuControllerFactory : public ToolbarControllerFactory
-{
- public:
- PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
-
- // XInterface, XTypeProvider, XServiceInfo
- DECLARE_XSERVICEINFO
-};
-
-} // namespace framework
-
-#endif // __FRAMEWORK_SERVICES_POPUPMENUCONTROLLERFACTORY_HXX_
diff --git a/framework/inc/uifactory/statusbarcontrollerfactory.hxx b/framework/inc/uifactory/statusbarcontrollerfactory.hxx
deleted file mode 100644
index b65f3dc..0000000
--- a/framework/inc/uifactory/statusbarcontrollerfactory.hxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-#ifndef __FRAMEWORK_UIFACTORY_STATUSBARCONTROLLERFACTORY_HXX_
-#define __FRAMEWORK_UIFACTORY_STATUSBARCONTROLLERFACTORY_HXX_
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-#include <macros/xserviceinfo.hxx>
-#include <uifactory/toolbarcontrollerfactory.hxx>
-#include <stdtypes.h>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-
-
-namespace framework
-{
-
-class ConfigurationAccess_ControllerFactory;
-class StatusbarControllerFactory : public ToolbarControllerFactory
-{
- public:
- StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
-
- // XInterface, XTypeProvider, XServiceInfo
- DECLARE_XSERVICEINFO
-};
-
-} // namespace framework
-
-#endif // __FRAMEWORK_SERVICES_STATUSBARCONTROLLERFACTORY_HXX_
diff --git a/framework/inc/uifactory/toolbarcontrollerfactory.hxx b/framework/inc/uifactory/uicontrollerfactory.hxx
similarity index 64%
rename from framework/inc/uifactory/toolbarcontrollerfactory.hxx
rename to framework/inc/uifactory/uicontrollerfactory.hxx
index 0761737..c058f5a 100644
--- a/framework/inc/uifactory/toolbarcontrollerfactory.hxx
+++ b/framework/inc/uifactory/uicontrollerfactory.hxx
@@ -19,14 +19,8 @@
*
*************************************************************/
-
-
-#ifndef __FRAMEWORK_UIFACTORY_TOOLBARCONTROLLERFACTORY_HXX_
-#define __FRAMEWORK_UIFACTORY_TOOLBARCONTROLLERFACTORY_HXX_
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
+#ifndef __FRAMEWORK_UICONTROLLERFACTORY_HXX_
+#define __FRAMEWORK_UICONTROLLERFACTORY_HXX_
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
@@ -35,35 +29,28 @@
#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>
+#include <com/sun/star/frame/XUIControllerFactory.hpp>
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-#include <cppuhelper/implbase3.hxx>
-#include <rtl/ustring.hxx>
+#include <cppuhelper/implbase2.hxx>
namespace framework
{
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>
+class UIControllerFactory : 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::frame::XUIControllerFactory >
{
public:
- ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
- virtual ~ToolbarControllerFactory();
+ virtual ~UIControllerFactory();
- // XInterface, XTypeProvider, XServiceInfo
- DECLARE_XSERVICEINFO
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0;
// 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);
@@ -76,12 +63,39 @@ class ToolbarControllerFactory : protected ThreadHelpBase
virtual void SAL_CALL deregisterController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
protected:
- ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool );
+ UIControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager, const rtl::OUString &rUINode );
sal_Bool m_bConfigRead;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
ConfigurationAccess_ControllerFactory* m_pConfigAccess;
};
-} // namespace framework
+class PopupMenuControllerFactory : public UIControllerFactory
+{
+ public:
+ PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+
+ // XInterface, XTypeProvider, XServiceInfo
+ DECLARE_XSERVICEINFO
+};
+
+class ToolbarControllerFactory : public UIControllerFactory
+{
+ public:
+ ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+
+ // XInterface, XTypeProvider, XServiceInfo
+ DECLARE_XSERVICEINFO
+};
+
+class StatusbarControllerFactory : public UIControllerFactory
+{
+ public:
+ StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+
+ // XInterface, XTypeProvider, XServiceInfo
+ DECLARE_XSERVICEINFO
+};
+
+}
-#endif // __FRAMEWORK_SERVICES_TOOLBARCONTROLLERFACTORY_HXX_
+#endif // __FRAMEWORK_UICONTROLLERFACTORY_HXX_
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 03a8fdb..20b18fc 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -48,7 +48,6 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/FrameAction.hpp>
-#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XSystemDependentMenuPeer.hpp>
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index 813cf48..f7ef107 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -58,7 +58,7 @@
#include <services/backingcomp.hxx>
#include <services/layoutmanager.hxx>
#include <uifactory/uielementfactorymanager.hxx>
-#include <uifactory/popupmenucontrollerfactory.hxx>
+#include <uifactory/uicontrollerfactory.hxx>
#include <uielement/objectmenucontroller.hxx>
#include <uielement/controlmenucontroller.hxx>
#include <uielement/uicommanddescription.hxx>
@@ -72,8 +72,6 @@
#include <uifactory/toolboxfactory.hxx>
#include <uifactory/addonstoolboxfactory.hxx>
#include "uiconfiguration/windowstateconfiguration.hxx"
-#include "uifactory/toolbarcontrollerfactory.hxx"
-#include "uifactory/statusbarcontrollerfactory.hxx"
#include <services/autorecovery.hxx>
#include <helper/statusindicatorfactory.hxx>
#include <uielement/recentfilesmenucontroller.hxx>
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 9b2fd5e..d7f7d19 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -262,7 +262,6 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
{
}
- Reference< XMultiComponentFactory > xToolbarControllerFactory( m_xToolbarControllerRegistration, UNO_QUERY );
Reference< XComponentContext > xComponentContext;
Reference< XPropertySet > xProps( m_xServiceManager, UNO_QUERY );
@@ -327,41 +326,38 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
sal_Bool bMustBeInit( sal_True );
// Support external toolbar controller for add-ons!
- if ( m_xToolbarControllerRegistration.is() &&
- m_xToolbarControllerRegistration->hasController( aURL, m_aModuleIdentifier ))
+ if ( m_xToolbarControllerFactory.is() &&
+ m_xToolbarControllerFactory->hasController( aURL, m_aModuleIdentifier ))
{
- if ( xToolbarControllerFactory.is() )
+ Sequence< Any > aArgs(5);
+ PropertyValue aPropValue;
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
+ aPropValue.Value <<= m_aModuleIdentifier;
+ aArgs[0] <<= aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
+ aPropValue.Value <<= m_xFrame;
+ aArgs[1] <<= aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
+ aPropValue.Value <<= m_xServiceManager;
+ aArgs[2] <<= aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
+ aPropValue.Value <<= xToolbarWindow;
+ aArgs[3] <<= aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ItemId" ));
+ aPropValue.Value = makeAny( sal_Int32( nId ));
+ aArgs[4] <<= aPropValue;
+
+ try
+ {
+ xController = Reference< XStatusListener >( m_xToolbarControllerFactory->createInstanceWithArgumentsAndContext(
+ aURL, aArgs, xComponentContext ),
+ UNO_QUERY );
+ }
+ catch ( uno::Exception& )
{
- Sequence< Any > aArgs(5);
- PropertyValue aPropValue;
-
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
- aPropValue.Value <<= m_aModuleIdentifier;
- aArgs[0] <<= aPropValue;
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- aPropValue.Value <<= m_xFrame;
- aArgs[1] <<= aPropValue;
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
- aPropValue.Value <<= m_xServiceManager;
- aArgs[2] <<= aPropValue;
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
- aPropValue.Value <<= xToolbarWindow;
- aArgs[3] <<= aPropValue;
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ItemId" ));
- aPropValue.Value = makeAny( sal_Int32( nId ));
- aArgs[4] <<= aPropValue;
-
- try
- {
- xController = Reference< XStatusListener >( xToolbarControllerFactory->createInstanceWithArgumentsAndContext(
- aURL, aArgs, xComponentContext ),
- UNO_QUERY );
- }
- catch ( uno::Exception& )
- {
- }
- bMustBeInit = sal_False; // factory called init already!
}
+ bMustBeInit = sal_False; // factory called init already!
}
else
{
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 46863f0..759da39 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -57,7 +57,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
-#include <com/sun/star/frame/XUIControllerRegistration.hpp>
+#include <com/sun/star/frame/PopupMenuControllerFactory.hpp>
#ifndef _COM_SUN_STAR_LANG_XSYSTEMDEPENDENT_HPP_
#include <com/sun/star/lang/SystemDependent.hpp>
#endif
@@ -221,9 +221,8 @@ MenuBarManager::MenuBarManager(
, m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen at sun.com", "MenuBarManager::MenuBarManager" );
- m_xPopupMenuControllerRegistration = Reference< ::com::sun::star::frame::XUIControllerRegistration >(
- getServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.PopupMenuControllerFactory" ))),
- UNO_QUERY );
+ m_xPopupMenuControllerFactory = frame::PopupMenuControllerFactory::create(
+ ::comphelper::getProcessComponentContext() );
FillMenuManager( pMenu, rFrame, rDispatchProvider, rModuleIdentifier, bDelete, bDeleteChildren );
}
@@ -429,7 +428,7 @@ void SAL_CALL MenuBarManager::dispose() throw( RuntimeException )
m_xModuleAcceleratorManager.clear();
m_xDocAcceleratorManager.clear();
m_xUICommandLabels.clear();
- m_xPopupMenuControllerRegistration.clear();
+ m_xPopupMenuControllerFactory.clear();
mxServiceFactory.clear();
}
}
@@ -980,7 +979,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
sal_Bool bPopupMenu( sal_False );
if ( !pMenuItemHandler->xPopupMenuController.is() &&
- m_xPopupMenuControllerRegistration->hasController( aItemCommand, rtl::OUString() ))
+ m_xPopupMenuControllerFactory->hasController( aItemCommand, rtl::OUString() ))
{
bPopupMenu = CreatePopupMenuController( pMenuItemHandler );
}
@@ -1222,39 +1221,38 @@ sal_Bool MenuBarManager::CreatePopupMenuController( MenuItemHandler* pMenuItemHa
rtl::OUString aItemCommand( pMenuItemHandler->aMenuItemURL );
// Try instanciate a popup menu controller. It is stored in the menu item handler.
- Reference< XMultiComponentFactory > xPopupMenuControllerFactory( m_xPopupMenuControllerRegistration, UNO_QUERY );
- if ( xPopupMenuControllerFactory.is() )
+ if ( !m_xPopupMenuControllerFactory.is() )
+ return sal_False;
+
+ Sequence< Any > aSeq( 2 );
+ PropertyValue aPropValue;
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
+ aPropValue.Value <<= m_aModuleIdentifier;
+ aSeq[0] <<= aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
+ aPropValue.Value <<= m_xFrame;
+ aSeq[1] <<= aPropValue;
+
+ Reference< XComponentContext > xComponentContext;
+ Reference< XPropertySet > xProps( getServiceFactory(), UNO_QUERY );
+
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>=
+ xComponentContext;
+
+ Reference< XPopupMenuController > xPopupMenuController(
+ m_xPopupMenuControllerFactory->createInstanceWithArgumentsAndContext(
+ aItemCommand,
+ aSeq,
+ xComponentContext ),
+ UNO_QUERY );
+
+ if ( xPopupMenuController.is() )
{
- Sequence< Any > aSeq( 2 );
- PropertyValue aPropValue;
-
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
- aPropValue.Value <<= m_aModuleIdentifier;
- aSeq[0] <<= aPropValue;
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- aPropValue.Value <<= m_xFrame;
- aSeq[1] <<= aPropValue;
-
- Reference< XComponentContext > xComponentContext;
- Reference< XPropertySet > xProps( getServiceFactory(), UNO_QUERY );
-
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>=
- xComponentContext;
-
- Reference< XPopupMenuController > xPopupMenuController(
- xPopupMenuControllerFactory->createInstanceWithArgumentsAndContext(
- aItemCommand,
- aSeq,
- xComponentContext ),
- UNO_QUERY );
-
- if ( xPopupMenuController.is() )
- {
- // Provide our awt popup menu to the popup menu controller
- pMenuItemHandler->xPopupMenuController = xPopupMenuController;
- xPopupMenuController->setPopupMenu( pMenuItemHandler->xPopupMenu );
- return sal_True;
- }
+ // Provide our awt popup menu to the popup menu controller
+ pMenuItemHandler->xPopupMenuController = xPopupMenuController;
+ xPopupMenuController->setPopupMenu( pMenuItemHandler->xPopupMenu );
+ return sal_True;
}
return sal_False;
@@ -1348,9 +1346,9 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
pMenu->SetHelpCommand( nItemId, aEmpty );
}
- if ( m_xPopupMenuControllerRegistration.is() &&
+ if ( m_xPopupMenuControllerFactory.is() &&
pPopup->GetItemCount() == 0 &&
- m_xPopupMenuControllerRegistration->hasController( aItemCommand, rtl::OUString() )
+ m_xPopupMenuControllerFactory->hasController( aItemCommand, rtl::OUString() )
)
{
// Check if we have to create a popup menu for a uno based popup menu controller.
@@ -1487,8 +1485,8 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
MenuItemHandler* pItemHandler = new MenuItemHandler( nItemId, xStatusListener, xDispatch );
pItemHandler->aMenuItemURL = aItemCommand;
- if ( m_xPopupMenuControllerRegistration.is() &&
- m_xPopupMenuControllerRegistration->hasController( aItemCommand, rtl::OUString() ))
+ if ( m_xPopupMenuControllerFactory.is() &&
+ m_xPopupMenuControllerFactory->hasController( aItemCommand, rtl::OUString() ))
{
// Check if we have to create a popup menu for a uno based popup menu controller.
// We have to set an empty popup menu into our menu structure so the controller also
@@ -2070,9 +2068,8 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen
m_bIsBookmarkMenu = sal_True;
rtl::OUString aModuleIdentifier;
- m_xPopupMenuControllerRegistration = Reference< ::com::sun::star::frame::XUIControllerRegistration >(
- getServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.PopupMenuControllerFactory" ))),
- UNO_QUERY );
+ m_xPopupMenuControllerFactory = frame::PopupMenuControllerFactory::create(
+ ::comphelper::getProcessComponentContext());
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_bWasHiContrast = rSettings.GetHighContrastMode();
@@ -2123,8 +2120,8 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen
// Check if we have to create a popup menu for a uno based popup menu controller.
// We have to set an empty popup menu into our menu structure so the controller also
// works with inplace OLE.
- if ( m_xPopupMenuControllerRegistration.is() &&
- m_xPopupMenuControllerRegistration->hasController( aItemCommand, rtl::OUString() ))
+ if ( m_xPopupMenuControllerFactory.is() &&
+ m_xPopupMenuControllerFactory->hasController( aItemCommand, rtl::OUString() ))
{
VCLXPopupMenu* pVCLXPopupMenu = new VCLXPopupMenu;
PopupMenu* pCtlPopupMenu = (PopupMenu *)pVCLXPopupMenu->GetMenu();
diff --git a/framework/source/uielement/popupmenucontroller.cxx b/framework/source/uielement/popupmenucontroller.cxx
index 4709a59..2b9e24a 100644
--- a/framework/source/uielement/popupmenucontroller.cxx
+++ b/framework/source/uielement/popupmenucontroller.cxx
@@ -168,7 +168,7 @@ bool PopupMenuController::CreatePopupMenuController() throw (Exception)
Sequence< Any > aSeq( 2 );
PropertyValue aPropValue;
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
aPropValue.Value <<= getModuleName();
aSeq[0] <<= aPropValue;
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 93079fa..060c100 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
+#include <com/sun/star/frame/StatusbarControllerFactory.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/ui/ItemType.hpp>
@@ -56,6 +57,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/statusbarcontroller.hxx>
+#include <comphelper/processfactory.hxx>
#include <vcl/status.hxx>
#include <vcl/svapp.hxx>
@@ -188,10 +190,8 @@ StatusBarManager::StatusBarManager(
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen at sun.com", "StatusBarManager::StatusBarManager" );
- if ( m_xServiceManager.is() )
- m_xStatusbarControllerRegistration = uno::Reference< css::frame::XUIControllerRegistration >(
- m_xServiceManager->createInstance( SERVICENAME_STATUSBARCONTROLLERFACTORY ),
- uno::UNO_QUERY );
+ m_xStatusbarControllerFactory = frame::StatusbarControllerFactory::create(
+ ::comphelper::getProcessComponentContext());
m_pStatusBar->SetClickHdl( LINK( this, StatusBarManager, Click ) );
m_pStatusBar->SetDoubleClickHdl( LINK( this, StatusBarManager, DoubleClick ) );
@@ -369,7 +369,6 @@ rtl::OUString StatusBarManager::RetrieveLabelFromCommand( const rtl::OUString& a
void StatusBarManager::CreateControllers()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen at sun.com", "StatusBarManager::CreateControllers" );
- uno::Reference< lang::XMultiComponentFactory > xStatusbarControllerFactory( m_xStatusbarControllerRegistration, uno::UNO_QUERY );
uno::Reference< uno::XComponentContext > xComponentContext;
uno::Reference< beans::XPropertySet > xProps( m_xServiceManager, uno::UNO_QUERY );
uno::Reference< awt::XWindow > xStatusbarWindow = VCLUnoHelper::GetInterface( m_pStatusBar );
@@ -394,47 +393,44 @@ void StatusBarManager::CreateControllers()
svt::StatusbarController* pController( 0 );
// 1º) UNO Statusbar controllers, registered in Controllers.xcu
- if ( m_xStatusbarControllerRegistration.is() &&
- m_xStatusbarControllerRegistration->hasController( aCommandURL, m_aModuleIdentifier ))
+ if ( m_xStatusbarControllerFactory.is() &&
+ m_xStatusbarControllerFactory->hasController( aCommandURL, m_aModuleIdentifier ))
{
- if ( xStatusbarControllerFactory.is() )
- {
- beans::PropertyValue aPropValue;
- std::vector< uno::Any > aPropVector;
-
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
- aPropValue.Value = uno::makeAny( m_aModuleIdentifier );
- aPropVector.push_back( uno::makeAny( aPropValue ) );
-
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- aPropValue.Value = uno::makeAny( m_xFrame );
- aPropVector.push_back( uno::makeAny( aPropValue ) );
-
- // TODO remove this
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
- aPropValue.Value = uno::makeAny( m_xServiceManager );
- aPropVector.push_back( uno::makeAny( aPropValue ) );
-
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
- aPropValue.Value = uno::makeAny( xStatusbarWindow );
- aPropVector.push_back( uno::makeAny( aPropValue ) );
-
- // TODO still needing with the css::ui::XStatusbarItem?
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" ));
- aPropValue.Value = uno::makeAny( nId );
- aPropVector.push_back( uno::makeAny( aPropValue ) );
-
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusbarItem" ));
- aPropValue.Value <<= xStatusbarItem;
- aPropVector.push_back( uno::makeAny( aPropValue ) );
-
- uno::Sequence< uno::Any > aArgs( comphelper::containerToSequence( aPropVector ) );
- xController = uno::Reference< frame::XStatusListener >(
- xStatusbarControllerFactory->createInstanceWithArgumentsAndContext(
- aCommandURL, aArgs, xComponentContext ),
- uno::UNO_QUERY );
- bInit = sal_False; // Initialization is done through the factory service
- }
+ beans::PropertyValue aPropValue;
+ std::vector< uno::Any > aPropVector;
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
+ aPropValue.Value = uno::makeAny( m_aModuleIdentifier );
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
+ aPropValue.Value = uno::makeAny( m_xFrame );
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+ // TODO remove this
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
+ aPropValue.Value = uno::makeAny( m_xServiceManager );
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
+ aPropValue.Value = uno::makeAny( xStatusbarWindow );
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+ // TODO still needing with the css::ui::XStatusbarItem?
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" ));
+ aPropValue.Value = uno::makeAny( nId );
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusbarItem" ));
+ aPropValue.Value <<= xStatusbarItem;
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+ uno::Sequence< uno::Any > aArgs( comphelper::containerToSequence( aPropVector ) );
+ xController = uno::Reference< frame::XStatusListener >(
+ m_xStatusbarControllerFactory->createInstanceWithArgumentsAndContext(
+ aCommandURL, aArgs, xComponentContext ),
+ uno::UNO_QUERY );
+ bInit = sal_False; // Initialization is done through the factory service
}
if ( !xController.is() )
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 5919ce4..c65e0e0 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -64,6 +64,7 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/frame/ToolbarControllerFactory.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
@@ -84,6 +85,7 @@
#include <toolkit/unohlp.hxx>
#endif
#include <comphelper/mediadescriptor.hxx>
+#include <comphelper/processfactory.hxx>
#include <svtools/miscopt.hxx>
#include <svl/imageitm.hxx>
#include <svtools/framestatuslistener.hxx>
@@ -269,15 +271,13 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic
if ( pWindow )
((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( m_pToolBar );
- if ( m_xServiceManager.is() )
+ Reference< XComponentContext > xContext(::comphelper::getProcessComponentContext());
+ if ( xContext.is() )
{
- m_xToolbarControllerRegistration = Reference< XUIControllerRegistration >(
- m_xServiceManager->createInstance( SERVICENAME_TOOLBARCONTROLLERFACTORY ),
- UNO_QUERY );
+ m_xToolbarControllerFactory = frame::ToolbarControllerFactory::create( xContext );
- m_xURLTransformer.set( m_xServiceManager->createInstance(
- SERVICENAME_URLTRANSFORMER),
- UNO_QUERY );
+ m_xURLTransformer.set( xContext->getServiceManager()->createInstanceWithContext(
+ SERVICENAME_URLTRANSFORMER, xContext), UNO_QUERY );
}
m_pToolBar->SetSelectHdl( LINK( this, ToolBarManager, Select) );
@@ -928,7 +928,6 @@ void ToolBarManager::CreateControllers()
{
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::CreateControllers" );
- Reference< XMultiComponentFactory > xToolbarControllerFactory( m_xToolbarControllerRegistration, UNO_QUERY );
Reference< XComponentContext > xComponentContext;
Reference< XPropertySet > xProps( m_xServiceManager, UNO_QUERY );
Reference< XWindow > xToolbarWindow = VCLUnoHelper::GetInterface( m_pToolBar );
@@ -968,40 +967,37 @@ void ToolBarManager::CreateControllers()
}
}
- if ( m_xToolbarControllerRegistration.is() &&
- m_xToolbarControllerRegistration->hasController( aCommandURL, m_aModuleIdentifier ))
+ if ( m_xToolbarControllerFactory.is() &&
+ m_xToolbarControllerFactory->hasController( aCommandURL, m_aModuleIdentifier ))
{
- if ( xToolbarControllerFactory.is() )
+ PropertyValue aPropValue;
+ std::vector< Any > aPropertyVector;
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
+ aPropValue.Value <<= m_aModuleIdentifier;
+ aPropertyVector.push_back( makeAny( aPropValue ));
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
+ aPropValue.Value <<= m_xFrame;
+ aPropertyVector.push_back( makeAny( aPropValue ));
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
+ aPropValue.Value <<= m_xServiceManager;
+ aPropertyVector.push_back( makeAny( aPropValue ));
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
+ aPropValue.Value <<= xToolbarWindow;
+ aPropertyVector.push_back( makeAny( aPropValue ));
+
+ if ( nWidth > 0 )
{
- PropertyValue aPropValue;
- std::vector< Any > aPropertyVector;
-
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
- aPropValue.Value <<= m_aModuleIdentifier;
- aPropertyVector.push_back( makeAny( aPropValue ));
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- aPropValue.Value <<= m_xFrame;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ));
+ aPropValue.Value <<= nWidth;
aPropertyVector.push_back( makeAny( aPropValue ));
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
- aPropValue.Value <<= m_xServiceManager;
- aPropertyVector.push_back( makeAny( aPropValue ));
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
- aPropValue.Value <<= xToolbarWindow;
- aPropertyVector.push_back( makeAny( aPropValue ));
-
- if ( nWidth > 0 )
- {
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ));
- aPropValue.Value <<= nWidth;
- aPropertyVector.push_back( makeAny( aPropValue ));
- }
-
- Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
- xController = Reference< XStatusListener >( xToolbarControllerFactory->createInstanceWithArgumentsAndContext(
- aCommandURL, aArgs, xComponentContext ),
- UNO_QUERY );
- bInit = sal_False; // Initialization is done through the factory service
}
+
+ Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
+ xController = Reference< XStatusListener >( m_xToolbarControllerFactory->createInstanceWithArgumentsAndContext(
+ aCommandURL, aArgs, xComponentContext ),
+ UNO_QUERY );
+ bInit = sal_False; // Initialization is done through the factory service
}
if (( aCommandURL == aLoadURL ) && ( !m_pToolBar->IsItemVisible(nId)))
@@ -1098,7 +1094,7 @@ void ToolBarManager::CreateControllers()
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
aPropValue.Value <<= xToolbarWindow;
aPropertyVector.push_back( makeAny( aPropValue ));
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
aPropValue.Value <<= m_aModuleIdentifier;
aPropertyVector.push_back( makeAny( aPropValue ));
diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx
index 1a32d0f..3495405 100644
--- a/framework/source/uifactory/factoryconfiguration.cxx
+++ b/framework/source/uifactory/factoryconfiguration.cxx
@@ -56,7 +56,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
-using namespace ::com::sun::star::frame;
//_________________________________________________________________________________________________________________
// Namespace
diff --git a/framework/source/uifactory/popupmenucontrollerfactory.cxx b/framework/source/uifactory/popupmenucontrollerfactory.cxx
deleted file mode 100644
index 85331522..0000000
--- a/framework/source/uifactory/popupmenucontrollerfactory.cxx
+++ /dev/null
@@ -1,89 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-#include "uifactory/popupmenucontrollerfactory.hxx"
-#include <threadhelp/resetableguard.hxx>
-#include "services.h"
-#include "uifactory/factoryconfiguration.hxx"
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/XContainer.hpp>
-
-//_________________________________________________________________________________________________________________
-// includes of other projects
-//_________________________________________________________________________________________________________________
-#include <rtl/ustrbuf.hxx>
-#include <cppuhelper/weak.hxx>
-#include <rtl/logfile.hxx>
-
-//_________________________________________________________________________________________________________________
-// Defines
-//_________________________________________________________________________________________________________________
-//
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::container;
-using namespace ::com::sun::star::frame;
-
-//_________________________________________________________________________________________________________________
-// Namespace
-//_________________________________________________________________________________________________________________
-//
-
-namespace framework
-{
-
-//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
-//*****************************************************************************************************************
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( PopupMenuControllerFactory ,
- ::cppu::OWeakObject ,
- SERVICENAME_POPUPMENUCONTROLLERFACTORY ,
- IMPLEMENTATIONNAME_POPUPMENUCONTROLLERFACTORY
- )
-
-DEFINE_INIT_SERVICE ( PopupMenuControllerFactory, {} )
-
-PopupMenuControllerFactory::PopupMenuControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
- ToolbarControllerFactory(xServiceManager,true)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen at sun.com", "PopupMenuControllerFactory::PopupMenuControllerFactory" );
- m_pConfigAccess = new ConfigurationAccess_ControllerFactory( m_xServiceManager,rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Controller/Registered/PopupMenu" )) );
- m_pConfigAccess->acquire();
-}
-
-} // namespace framework
diff --git a/framework/source/uifactory/statusbarcontrollerfactory.cxx b/framework/source/uifactory/statusbarcontrollerfactory.cxx
deleted file mode 100644
index dcc3caf..0000000
--- a/framework/source/uifactory/statusbarcontrollerfactory.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-#include "uifactory/statusbarcontrollerfactory.hxx"
-#include "uifactory/factoryconfiguration.hxx"
-#include <threadhelp/resetableguard.hxx>
-#include "services.h"
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/XContainer.hpp>
-
-//_________________________________________________________________________________________________________________
-// includes of other projects
-//_________________________________________________________________________________________________________________
-#include <rtl/ustrbuf.hxx>
-#include <cppuhelper/weak.hxx>
-
-//_________________________________________________________________________________________________________________
-// Defines
-//_________________________________________________________________________________________________________________
-//
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::container;
-using namespace ::com::sun::star::frame;
-
-//_________________________________________________________________________________________________________________
-// Namespace
-//_________________________________________________________________________________________________________________
-//
-
-namespace framework
-{
-//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
-//*****************************************************************************************************************
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( StatusbarControllerFactory ,
- ::cppu::OWeakObject ,
- SERVICENAME_STATUSBARCONTROLLERFACTORY ,
- IMPLEMENTATIONNAME_STATUSBARCONTROLLERFACTORY
- )
-
-DEFINE_INIT_SERVICE ( StatusbarControllerFactory, {} )
-
-StatusbarControllerFactory::StatusbarControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
- ToolbarControllerFactory(xServiceManager,true)
-{
- m_pConfigAccess = new ConfigurationAccess_ControllerFactory( m_xServiceManager,rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Controller/Registered/StatusBar" )),true );
- m_pConfigAccess->acquire();
-}
-
-
-} // namespace framework
diff --git a/framework/source/uifactory/toolbarcontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
similarity index 71%
rename from framework/source/uifactory/toolbarcontrollerfactory.cxx
rename to framework/source/uifactory/uicontrollerfactory.cxx
index 0edd673..10791e3 100644
--- a/framework/source/uifactory/toolbarcontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -24,77 +24,48 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_framework.hxx"
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-#include "uifactory/toolbarcontrollerfactory.hxx"
-#include "uifactory/factoryconfiguration.hxx"
+#include <uifactory/uicontrollerfactory.hxx>
+#include <uifactory/factoryconfiguration.hxx>
#include <threadhelp/resetableguard.hxx>
#include "services.h"
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XContainer.hpp>
-//_________________________________________________________________________________________________________________
-// includes of other projects
-//_________________________________________________________________________________________________________________
#include <rtl/ustrbuf.hxx>
#include <cppuhelper/weak.hxx>
-//_________________________________________________________________________________________________________________
-// Defines
-//_________________________________________________________________________________________________________________
-//
-
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
using namespace ::com::sun::star::frame;
-//_________________________________________________________________________________________________________________
-// Namespace
-//_________________________________________________________________________________________________________________
-//
-
namespace framework
{
-//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
-//*****************************************************************************************************************
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( ToolbarControllerFactory ,
- ::cppu::OWeakObject ,
- SERVICENAME_TOOLBARCONTROLLERFACTORY ,
- IMPLEMENTATIONNAME_TOOLBARCONTROLLERFACTORY
- )
-
-DEFINE_INIT_SERVICE ( ToolbarControllerFactory, {} )
-
-ToolbarControllerFactory::ToolbarControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
- ThreadHelpBase(),
- m_bConfigRead( sal_False ),
- m_xServiceManager( xServiceManager )
+UIControllerFactory::UIControllerFactory(
+ const Reference< XMultiServiceFactory >& xServiceManager,
+ const rtl::OUString &rConfigurationNode )
+ : ThreadHelpBase()
+ , m_bConfigRead( sal_False )
+ , m_xServiceManager( xServiceManager )
+ , m_pConfigAccess()
{
- m_pConfigAccess = new ConfigurationAccess_ControllerFactory( m_xServiceManager,rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Controller/Registered/ToolBar" )) );
+ rtl::OUStringBuffer aBuffer;
+ aBuffer.appendAscii(
+ RTL_CONSTASCII_STRINGPARAM(
+ "/org.openoffice.Office.UI.Controller/Registered/" ) );
+ aBuffer.append( rConfigurationNode );
+ m_pConfigAccess = new ConfigurationAccess_ControllerFactory(
+ m_xServiceManager, aBuffer.makeStringAndClear() );
m_pConfigAccess->acquire();
}
-ToolbarControllerFactory::ToolbarControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager,bool ) :
- ThreadHelpBase(),
- m_bConfigRead( sal_False ),
- m_xServiceManager( xServiceManager )
-{
- m_pConfigAccess = NULL;
-}
-
-ToolbarControllerFactory::~ToolbarControllerFactory()
+UIControllerFactory::~UIControllerFactory()
{
ResetableGuard aLock( m_aLock );
@@ -103,7 +74,7 @@ ToolbarControllerFactory::~ToolbarControllerFactory()
}
// XMultiComponentFactory
-Reference< XInterface > SAL_CALL ToolbarControllerFactory::createInstanceWithContext(
+Reference< XInterface > SAL_CALL UIControllerFactory::createInstanceWithContext(
const ::rtl::OUString& aServiceSpecifier,
const Reference< XComponentContext >& )
throw (Exception, RuntimeException)
@@ -125,13 +96,13 @@ throw (Exception, RuntimeException)
// SAFE
}
-Reference< XInterface > SAL_CALL ToolbarControllerFactory::createInstanceWithArgumentsAndContext(
+Reference< XInterface > SAL_CALL UIControllerFactory::createInstanceWithArgumentsAndContext(
const ::rtl::OUString& ServiceSpecifier,
const Sequence< Any >& Arguments,
const Reference< XComponentContext >& )
throw (Exception, RuntimeException)
{
- const rtl::OUString aPropModuleName( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
+ const rtl::OUString aPropModuleName( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
const rtl::OUString aPropValueName( RTL_CONSTASCII_USTRINGPARAM( "Value" ));
rtl::OUString aPropName;
@@ -187,7 +158,6 @@ throw (Exception, RuntimeException)
aLock.unlock();
// SAFE
-
if ( aServiceName.getLength() > 0 )
return xServiceManager->createInstanceWithArguments( aServiceName, aNewArgs );
else
@@ -195,14 +165,14 @@ throw (Exception, RuntimeException)
}
}
-Sequence< ::rtl::OUString > SAL_CALL ToolbarControllerFactory::getAvailableServiceNames()
+Sequence< ::rtl::OUString > SAL_CALL UIControllerFactory::getAvailableServiceNames()
throw (RuntimeException)
{
return Sequence< ::rtl::OUString >();
}
// XUIControllerRegistration
-sal_Bool SAL_CALL ToolbarControllerFactory::hasController(
+sal_Bool SAL_CALL UIControllerFactory::hasController(
const ::rtl::OUString& aCommandURL,
const rtl::OUString& aModuleName )
throw (::com::sun::star::uno::RuntimeException)
@@ -218,7 +188,7 @@ throw (::com::sun::star::uno::RuntimeException)
return ( m_pConfigAccess->getServiceFromCommandModule( aCommandURL, aModuleName ).getLength() > 0 );
}
-void SAL_CALL ToolbarControllerFactory::registerController(
+void SAL_CALL UIControllerFactory::registerController(
const ::rtl::OUString& aCommandURL,
const ::rtl::OUString& aModuleName,
const ::rtl::OUString& aControllerImplementationName )
@@ -237,7 +207,7 @@ throw (RuntimeException)
// SAFE
}
-void SAL_CALL ToolbarControllerFactory::deregisterController(
+void SAL_CALL UIControllerFactory::deregisterController(
const ::rtl::OUString& aCommandURL,
const rtl::OUString& aModuleName )
throw (RuntimeException)
@@ -255,4 +225,50 @@ throw (RuntimeException)
// SAFE
}
+
+DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( PopupMenuControllerFactory ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_POPUPMENUCONTROLLERFACTORY ,
+ IMPLEMENTATIONNAME_POPUPMENUCONTROLLERFACTORY
+ )
+
+DEFINE_INIT_SERVICE ( PopupMenuControllerFactory, {} )
+
+PopupMenuControllerFactory::PopupMenuControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
+ UIControllerFactory(
+ xServiceManager,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PopupMenu" )) )
+{
+}
+
+DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( ToolbarControllerFactory ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_TOOLBARCONTROLLERFACTORY ,
+ IMPLEMENTATIONNAME_TOOLBARCONTROLLERFACTORY
+ )
+
+DEFINE_INIT_SERVICE ( ToolbarControllerFactory, {} )
+
+ToolbarControllerFactory::ToolbarControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
+ UIControllerFactory(
+ xServiceManager,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToolBar" )))
+{
+}
+
+DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( StatusbarControllerFactory ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_STATUSBARCONTROLLERFACTORY ,
+ IMPLEMENTATIONNAME_STATUSBARCONTROLLERFACTORY
+ )
+
+DEFINE_INIT_SERVICE ( StatusbarControllerFactory, {} )
+
+StatusbarControllerFactory::StatusbarControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
+ UIControllerFactory(
+ xServiceManager,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusBar" )) )
+{
+}
+
} // namespace framework
diff --git a/framework/source/unotypes/fwk.xml b/framework/source/unotypes/fwk.xml
index 46c56d0..7305212 100644
--- a/framework/source/unotypes/fwk.xml
+++ b/framework/source/unotypes/fwk.xml
@@ -423,7 +423,7 @@
<loader-name> com.sun.star.loader.SharedLibrary </loader-name>
<language> c++ </language>
<status value="final"/>
- <supported-service> com.sun.star.frame.ToolBarControllerFactory </supported-service>
+ <supported-service> com.sun.star.frame.ToolbarControllerFactory </supported-service>
</component-description>
<component-description>
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index adc6071..c41c25b 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -110,7 +110,7 @@
<service name="com.sun.star.frame.TaskCreator"/>
</implementation>
<implementation name="com.sun.star.comp.framework.ToolBarControllerFactory">
- <service name="com.sun.star.frame.ToolBarControllerFactory"/>
+ <service name="com.sun.star.frame.ToolbarControllerFactory"/>
</implementation>
<implementation name="com.sun.star.comp.framework.ToolBarFactory">
<service name="com.sun.star.ui.ToolBarFactory"/>
diff --git a/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl b/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl
index 4ce72fa..5eccdc8 100644
--- a/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl
+++ b/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl
@@ -19,25 +19,13 @@
*
*************************************************************/
-
-
#ifndef __com_sun_star_frame_PopupMenuControllerFactory_idl__
#define __com_sun_star_frame_PopupMenuControllerFactory_idl__
-#ifndef __com_sun_star_lang_XMultiComponentFactory_idl__
-#include <com/sun/star/lang/XMultiComponentFactory.idl>
-#endif
-
-#ifndef __com_sun_star_frame_XUIControllerRegistration_idl__
-#include <com/sun/star/frame/XUIControllerRegistration.idl>
-#endif
-
-//=============================================================================
+#include <com/sun/star/frame/XUIControllerFactory.idl>
module com { module sun { module star { module frame {
-//=============================================================================
-
/** specifies a factory that creates instances of registered popup menu controller.
<p>
@@ -48,34 +36,13 @@ module com { module sun { module star { module frame {
@since OOo 2.0
*/
-
-service PopupMenuControllerFactory
+service PopupMenuControllerFactory : XUIControllerFactory
{
- /** this interface provides functions to create new instances of a registered popup menu controller.
-
- <p>
- Use <member scope="com.sun.star.lang">XMultiComponentFactory::createInstanceWithArguments()</member> to create
- a new popup menu controller instance. Use the CommandURL as the service specifier.
-
- This call supports the following arguments provided as <type scope="com::sun::star::beans">PropertyValue</type>:
- <ul>
- <li><b>Frame</b><br>specifies the <type scope="com::sun::star::frame">XFrame</type>
- instance to which the popup menu controller belongs to. This property must be provided to
- the popup menu controller, otherwise it cannot dispatch its internal commands.</li>
- <li><b>ModuleIdentifier</b><br>optional string that specifies in which module context the popup menu
- controller should be created.</li>
- </ul>
- </p>
+ /** service constructor
*/
- interface com::sun::star::lang::XMultiComponentFactory;
-
- /** provides functions to query for, register and deregister a popup menu controller.
- */
- interface com::sun::star::frame::XUIControllerRegistration;
+ create();
};
}; }; }; };
-//=============================================================================
-
#endif
diff --git a/offapi/com/sun/star/frame/StatusbarControllerFactory.idl b/offapi/com/sun/star/frame/StatusbarControllerFactory.idl
index 8df056b..46aff8d 100644
--- a/offapi/com/sun/star/frame/StatusbarControllerFactory.idl
+++ b/offapi/com/sun/star/frame/StatusbarControllerFactory.idl
@@ -19,25 +19,13 @@
*
*************************************************************/
-
-
#ifndef __com_sun_star_frame_StatusbarControllerFactory_idl__
#define __com_sun_star_frame_StatusbarControllerFactory_idl__
-#ifndef __com_sun_star_lang_XMultiComponentFactory_idl__
-#include <com/sun/star/lang/XMultiComponentFactory.idl>
-#endif
-
-#ifndef __com_sun_star_frame_XUIControllerRegistration_idl__
-#include <com/sun/star/frame/XUIControllerRegistration.idl>
-#endif
-
-//=============================================================================
+#include <com/sun/star/frame/XUIControllerFactory.idl>
module com { module sun { module star { module frame {
-//=============================================================================
-
/** specifies a factory that creates instances of registered status bar
controller.
@@ -49,39 +37,13 @@ module com { module sun { module star { module frame {
@since OOo 2.0
*/
-
-service StatusbarControllerFactory
+service StatusbarControllerFactory : XUIControllerFactory
{
- /** this interface provides functions to create new instances of a registered
- status bar controller.
-
- <p>
- Use <member scope="com.sun.star.lang">XMultiComponentFactory::createInstanceWithArguments()</member>
- to create a new status bar controller instance. Use the CommandURL as the
- service specifier.
-
- This call supports the following arguments provided as
- <type scope="com::sun::star::beans">PropertyValue</type>:
- <ul>
- <li><b>Frame</b><br>specifies the <type scope="com::sun::star::frame">XFrame</type>
- instance to which the status bar controller belongs to. This
- property must be provided to the status bar controller, otherwise it
- cannot dispatch its internal commands.</li>
- <li><b>ModuleIdentifier</b><br>optional string that specifies in which module
- context the status bar controller should be created.</li>
- </ul>
- </p>
+ /** service constructor
*/
- interface com::sun::star::lang::XMultiComponentFactory;
-
- /** provides functions to query for, register and deregister a status bar
- controller.
- */
- interface com::sun::star::frame::XUIControllerRegistration;
+ create();
};
}; }; }; };
-//=============================================================================
-
#endif
diff --git a/offapi/com/sun/star/frame/ToolbarControllerFactory.idl b/offapi/com/sun/star/frame/ToolbarControllerFactory.idl
new file mode 100644
index 0000000..f24bc03
--- /dev/null
+++ b/offapi/com/sun/star/frame/ToolbarControllerFactory.idl
@@ -0,0 +1,47 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_frame_ToolbarControllerFactory_idl__
+#define __com_sun_star_frame_ToolbarControllerFactory_idl__
+
+#include <com/sun/star/frame/XUIControllerFactory.idl>
+
+module com { module sun { module star { module frame {
+
+/** specifies a factory that creates instances of registered toolbar controller.
+
+ <p>
+ A toolbar controller can be registered for a command URL and a model service name.
+ </p>
+
+ @since OOo 2.0
+*/
+
+service ToolbarControllerFactory : XUIControllerFactory
+{
+ /** service constructor
+ */
+ create();
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/frame/XUIControllerFactory.idl b/offapi/com/sun/star/frame/XUIControllerFactory.idl
new file mode 100644
index 0000000..4e21a0a
--- /dev/null
+++ b/offapi/com/sun/star/frame/XUIControllerFactory.idl
@@ -0,0 +1,76 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_frame_XUIControllerFactory_idl__
+#define __com_sun_star_frame_XUIControllerFactory_idl__
+
+#include <com/sun/star/lang/XMultiComponentFactory.idl>
+#include <com/sun/star/frame/XUIControllerRegistration.idl>
+
+module com { module sun { module star { module frame {
+
+/** a factory to create User Interface controllers.
+
+ <p>
+ A user interface controller can be registered for a command URL. A certain user
+ interface controller will be created when a user interface element contains a
+ registered command URL.
+
+ @see PopupMenuControllerFactory
+ @see StatusbarControllerFactory
+ @see ToolbarControllerFactory
+ </p>
+
+ @since Apache OpenOffice 4.0
+ */
+interface XUIControllerFactory
+{
+ /** this interface provides functions to create new instances of a registered UI controller.
+
+ <p>
+ Use <member scope="com::sun::star::lang">XMultiComponentFactory::createInstanceWithArgumentsAndContext()</member> to create
+ a new UI controller instance. Use the CommandURL as the service specifier.
+
+ This call supports the following arguments provided as <type scope="com::sun::star::beans">PropertyValue</type>:
+ <ul>
+ <li>
+ <b>Frame</b><br>specifies the <type scope="com::sun::star::frame">XFrame</type>
+ instance to which the UI controller belongs to. This property must be provided to
+ the UI controller, otherwise it cannot dispatch its internal commands.
+ </li>
+ <li>
+ <b>ModuleIdentifier</b><br>optional string that specifies in which module context the UI
+ controller should be created.</br>The module identifier can be retrieved using the
+ <type>ModuleManager</type>.
+ </li>
+ </ul>
+ </p>
+ */
+ interface com::sun::star::lang::XMultiComponentFactory;
+
+ /** provides functions to query for, register and deregister a popup menu controller.
+ */
+ interface XUIControllerRegistration;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/frame/makefile.mk b/offapi/com/sun/star/frame/makefile.mk
index fed9fde..2704265 100644
--- a/offapi/com/sun/star/frame/makefile.mk
+++ b/offapi/com/sun/star/frame/makefile.mk
@@ -51,8 +51,8 @@ IDLFILES=\
DispatchProvider.idl\
DispatchRecorder.idl\
DispatchRecorderSupplier.idl\
- DispatchResultState.idl\
DispatchResultEvent.idl\
+ DispatchResultState.idl\
DispatchStatement.idl\
DocumentTemplates.idl\
DoubleInitializationException.idl\
@@ -63,8 +63,8 @@ IDLFILES=\
FrameControl.idl\
FrameLoader.idl\
FrameLoaderFactory.idl\
- FramesContainer.idl\
FrameSearchFlag.idl\
+ FramesContainer.idl\
IllegalArgumentIOException.idl\
LayoutManager.idl\
LayoutManagerEvents.idl\
@@ -75,14 +75,15 @@ IDLFILES=\
ProtocolHandler.idl\
SessionManager.idl\
Settings.idl\
- SynchronousFrameLoader.idl\
StatusbarController.idl\
StatusbarControllerFactory.idl\
+ SynchronousFrameLoader.idl\
Task.idl\
TemplateAccess.idl\
TerminationVetoException.idl\
TitleChangedEvent.idl\
ToolbarController.idl\
+ ToolbarControllerFactory.idl \
TransientDocumentsDocumentContentFactory.idl \
UnknownModuleException.idl\
WindowArrange.idl\
@@ -91,9 +92,9 @@ IDLFILES=\
XComponentLoader.idl\
XComponentRegistry.idl\
XConfigManager.idl\
+ XControlNotificationListener.idl\
XController.idl\
XController2.idl\
- XControlNotificationListener.idl\
XControllerBorder.idl\
XDesktop.idl\
XDesktopTask.idl\
@@ -113,16 +114,16 @@ IDLFILES=\
XFrameActionListener.idl\
XFrameLoader.idl\
XFrameLoaderQuery.idl\
- XFrames.idl\
XFrameSetModel.idl\
+ XFrames.idl\
XFramesSupplier.idl\
XInplaceLayout.idl\
XInterceptorInfo.idl\
XLayoutManager.idl\
XLayoutManagerEventBroadcaster.idl\
XLayoutManagerListener.idl\
- XLoadable.idl\
XLoadEventListener.idl\
+ XLoadable.idl\
XMenuBarAcceptor.idl\
XMenuBarMergingAcceptor.idl\
XModel.idl\
@@ -138,8 +139,8 @@ IDLFILES=\
XStatusListener.idl\
XStatusbarController.idl\
XStorable.idl\
- XSubToolbarController.idl\
XStorable2.idl\
+ XSubToolbarController.idl\
XSynchronousDispatch.idl\
XSynchronousFrameLoader.idl\
XTask.idl\
@@ -151,10 +152,11 @@ IDLFILES=\
XTitleChangeListener.idl\
XToolbarController.idl\
XTransientDocumentsDocumentContentFactory.idl\
+ XUIControllerFactory.idl\
XUIControllerRegistration.idl\
XUntitledNumbers.idl\
XUrlList.idl\
- XWindowArranger.idl
+ XWindowArranger.idl \
# ------------------------------------------------------------------
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index b3e4357..4016449 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -232,7 +232,7 @@ throw ( Exception, RuntimeException )
m_xServiceManager.set(aPropValue.Value,UNO_QUERY);
else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ParentWindow") ))
m_pImpl->m_xParentWindow.set(aPropValue.Value,UNO_QUERY);
- else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ModuleName" ) ) )
+ else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ModuleIdentifier" ) ) )
aPropValue.Value >>= m_pImpl->m_sModuleName;
}
}
commit 95d7d94c77d26f751998b1c5020e8e5220218d21
Author: Herbert Dürr <hdu at apache.org>
Date: Fri Apr 26 15:00:38 2013 +0000
inequality operator for awt::Size needs to be available before first usemain/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index b490dcd..de0c96f 100755
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -94,12 +94,6 @@ public:
virtual ~WrappedSymbolBitmapURLProperty();
};
-// this operator is not defined by default
-bool operator!=( const awt::Size & rSize1, const awt::Size & rSize2 )
-{
- return (rSize1.Width != rSize2.Width) || (rSize1.Height != rSize2.Height);
-}
-
class WrappedSymbolSizeProperty : public WrappedSeriesOrDiagramProperty< awt::Size >
{
public:
commit 7cc799bc7638fe15ca2fa68d2c15fb3c99c29585
Author: Herbert Dürr <hdu at apache.org>
Date: Fri Apr 26 14:20:16 2013 +0000
fix narrowing integer conversions in PictReaderShape*
diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx
index 29cc64b..c871078 100644
--- a/filter/source/graphicfilter/ipict/shape.cxx
+++ b/filter/source/graphicfilter/ipict/shape.cxx
@@ -41,7 +41,8 @@ Here, we choose:
#include "shape.hxx"
// a local helper to initialize double[2] arrays with long values
-#define L2D_ARY(l1,l2) { static_cast<double>(l1), static_cast<double>(l2) }
+#define L2I_ARY(a,b) { static_cast<int>(a), static_cast<int>(b) }
+#define L2D_ARY(a,b) { static_cast<double>(a), static_cast<double>(b) }
namespace PictReaderShapePrivate {
/** returns an inside rectangle knowing the penSize in order to obtain the ``correct'' position
@@ -51,8 +52,8 @@ namespace PictReaderShapePrivate {
int penSize=(pSize.Width()+pSize.Height())/2;
if (2*penSize > rect.Right()-rect.Left()) penSize = (rect.Right()-rect.Left()+1)/2;
if (2*penSize > rect.Bottom()-rect.Top()) penSize = (rect.Bottom()-rect.Top()+1)/2;
- int const X[2] = { rect.Left()+penSize/2, rect.Right()-(penSize+1)/2 };
- int const Y[2] = { rect.Top()+penSize/2, rect.Bottom()-(penSize+1)/2 };
+ int const X[2] = L2I_ARY( rect.Left()+penSize/2, rect.Right()-(penSize+1)/2);
+ int const Y[2] = L2I_ARY( rect.Top()+penSize/2, rect.Bottom()-(penSize+1)/2);
return Rectangle(Point(X[0],Y[0]), Point(X[1], Y[1]));
}
}
@@ -60,12 +61,13 @@ namespace PictReaderShapePrivate {
namespace PictReaderShape {
//--------- draws a horizontal/vertical/small line (by creating a "rectangle/polygon") ---------
bool drawLineHQ(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize) {
- int dir[2] = { dest.X()-orig.X(), dest.Y()-orig.Y() };
+ int dir[2] = L2I_ARY( dest.X()-orig.X(), dest.Y()-orig.Y() );
bool vertic = dir[0] == 0;
bool horiz = dir[1] == 0;
if (!horiz && !vertic && dir[0]*dir[0]+dir[1]*dir[1] > 25) return false;
- int X[2]={ orig.X(), dest.X() }, Y[2] = { orig.Y(), dest.Y() };
+ int X[2] = L2I_ARY( orig.X(), dest.X());
+ int Y[2] = L2I_ARY( orig.Y(), dest.Y());
using namespace basegfx;
B2DPolygon poly;
if (horiz || vertic) {
@@ -84,13 +86,15 @@ namespace PictReaderShape {
poly.append(B2DPoint(X[0], Y[0]));
}
else {
- int origPt[4][2] = { { orig.X(), orig.Y() }, { orig.X()+pSize.Width(), orig.Y() },
- { orig.X()+pSize.Width(), orig.Y()+pSize.Height() },
- { orig.X(), orig.Y()+pSize.Height() }};
+ int origPt[4][2] = { L2I_ARY( orig.X(), orig.Y()),
+ L2I_ARY( orig.X()+pSize.Width(), orig.Y()),
+ L2I_ARY( orig.X()+pSize.Width(), orig.Y()+pSize.Height() ),
+ L2I_ARY( orig.X(), orig.Y()+pSize.Height() )};
int origAvoid = dir[0] > 0 ? (dir[1] > 0 ? 2 : 1) : (dir[1] > 0 ? 3 : 0);
- int destPt[4][2] = { { dest.X(), dest.Y() }, { dest.X()+pSize.Width(), dest.Y() },
- { dest.X()+pSize.Width(), dest.Y()+pSize.Height() },
- { dest.X(), dest.Y()+pSize.Height() }};
+ int destPt[4][2] = { L2I_ARY( dest.X(), dest.Y()),
+ L2I_ARY( dest.X()+pSize.Width(), dest.Y()),
+ L2I_ARY( dest.X()+pSize.Width(), dest.Y()+pSize.Height()),
+ L2I_ARY( dest.X(), dest.Y()+pSize.Height())};
for (int w = origAvoid+1; w < origAvoid+4; w++) {
int wh = (w%4);
poly.append(B2DPoint(origPt[wh][0], origPt[wh][1]));
@@ -120,7 +124,7 @@ namespace PictReaderShape {
if (drawLineHQ(dev,orig,dest,pSize)) return;
int penSize=(pSize.Width()+pSize.Height())/2;
- int decal[2] = { pSize.Width()/2, pSize.Height()/2};
+ int decal[2] = L2I_ARY( pSize.Width()/2, pSize.Height()/2);
using namespace basegfx;
B2DPolygon poly;
@@ -226,7 +230,8 @@ namespace PictReaderShape {
//-------------------- draws a polygon --------------------
void drawPolygon(VirtualDevice *dev, bool drawFrame, Polygon const &orig, Size const &pSize) {
int penSize=(pSize.Width()+pSize.Height())/2;
- int decalTL[2] = {0, 0}, decalBR[2] = { pSize.Width(), pSize.Height()};
+ int decalTL[2] = L2I_ARY( 0, 0);
+ int decalBR[2] = L2I_ARY( pSize.Width(), pSize.Height());
if (drawFrame) {
decalTL[0] += penSize/2; decalTL[1] += penSize/2;
decalBR[0] -= (penSize+1)/2; decalBR[1] -= (penSize+1)/2;
@@ -234,7 +239,6 @@ namespace PictReaderShape {
// Quickdraw Drawing Reference 3-82: the pen size is only used for frame
else decalBR[0] = decalBR[1] = 0;
-
int numPt = orig.GetSize();
if (numPt <= 1) return;
commit af96695d49ddd01501a127266915279ff0efdeb0
Author: Herbert Dürr <hdu at apache.org>
Date: Fri Apr 26 14:15:52 2013 +0000
UNO bootstrapping requires some more comprehensive type-descriptions
diff --git a/cppuhelper/source/makefile.mk b/cppuhelper/source/makefile.mk
index 9311ee4..f21cd2c 100644
--- a/cppuhelper/source/makefile.mk
+++ b/cppuhelper/source/makefile.mk
@@ -64,6 +64,7 @@ UNOTYPES= \
com.sun.star.container.XEnumerationAccess \
com.sun.star.container.XHierarchicalNameAccess \
com.sun.star.container.XNameAccess \
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list