[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 23 commits - canvas/source chart2/source comphelper/inc comphelper/source connectivity/source dbaccess/source dbaccess/util external_deps.lst framework/inc framework/source graphite/graphite-2.3.1_stlportemu.patch graphite/makefile.mk offapi/com officecfg/registry pyuno/source RepositoryFixes.mk sal/osl sc/source sd/source sfx2/inc sfx2/source solenv/gbuild solenv/inc svtools/inc svtools/source svx/inc svx/source sw/inc sw/source vcl/inc vcl/win xmloff/source
Herbert Dürr
hdu at apache.org
Tue May 28 07:47:30 PDT 2013
RepositoryFixes.mk | 20 +
canvas/source/vcl/impltools.cxx | 3
chart2/source/tools/InternalData.cxx | 1
chart2/source/tools/exports.flt | 1
chart2/source/view/exports.flt | 1
comphelper/inc/comphelper/namedvaluecollection.hxx | 12
comphelper/source/misc/numberedcollection.cxx | 1
connectivity/source/commontools/TSkipDeletedSet.cxx | 1
connectivity/source/drivers/ado/AColumns.cxx | 2
connectivity/source/drivers/mozab/makefile_mozab.mk | 6
dbaccess/source/ui/control/makefile.mk | 1
dbaccess/source/ui/control/statusbarontroller.cxx | 46 ---
dbaccess/source/ui/inc/statusbarontroller.hxx | 58 ----
dbaccess/source/ui/misc/uiservices.cxx | 2
dbaccess/util/dbu.component | 3
external_deps.lst | 6
framework/inc/uielement/popuptoolbarcontroller.hxx | 3
framework/inc/uielement/statusbarmanager.hxx | 15 -
framework/source/uielement/popuptoolbarcontroller.cxx | 42 +++
framework/source/uielement/statusbarmanager.cxx | 124 ++++------
graphite/graphite-2.3.1_stlportemu.patch | 50 ++++
graphite/makefile.mk | 6
offapi/com/sun/star/frame/XStatusbarController.idl | 9
officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 44 ---
officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu | 12
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 3
pyuno/source/module/pyuno.flt | 1
sal/osl/all/debugbase.cxx | 1
sc/source/core/data/bcaslot.cxx | 6
sc/source/core/data/global.cxx | 4
sc/source/core/inc/bcaslot.hxx | 2
sc/source/filter/excel/xeescher.cxx | 3
sc/source/ui/drawfunc/drawsh2.cxx | 26 +-
sc/source/ui/inc/drawsh.hxx | 4
sd/source/ui/inc/DrawViewShell.hxx | 5
sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx | 2
sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 18 -
sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx | 8
sd/source/ui/view/drviews1.cxx | 10
sd/source/ui/view/drviewsa.cxx | 36 +-
sd/source/ui/view/outlnvsh.cxx | 2
sd/source/ui/view/viewshel.cxx | 2
sfx2/inc/sfx2/shell.hxx | 15 +
sfx2/inc/sfx2/sidebar/EnumContext.hxx | 1
sfx2/source/control/shell.cxx | 24 -
sfx2/source/sidebar/EnumContext.cxx | 8
solenv/gbuild/gbuild.mk | 6
solenv/gbuild/platform/windows.mk | 10
solenv/inc/lldb4aoo.py | 17 +
solenv/inc/wntmsci11.mk | 16 +
svtools/inc/svtools/statusbarcontroller.hxx | 1
svtools/inc/svtools/toolboxcontroller.hxx | 23 +
svtools/source/uno/toolboxcontroller.cxx | 19 -
svx/inc/svx/sidebar/SelectionAnalyzer.hxx | 16 -
svx/inc/svx/sidebar/SelectionChangeHandler.hxx | 4
svx/source/sidebar/SelectionAnalyzer.cxx | 54 ++--
svx/source/sidebar/SelectionChangeHandler.cxx | 5
svx/source/sidebar/text/TextPropertyPanel.cxx | 37 ++
svx/source/sidebar/text/TextPropertyPanel.hxx | 9
sw/inc/SwNumberTree.hxx | 6
sw/source/core/SwNumberTree/SwNodeNum.cxx | 2
sw/source/core/SwNumberTree/SwNumberTree.cxx | 38 +--
sw/source/core/layout/paintfrm.cxx | 2
sw/source/core/unocore/unochart.cxx | 8
vcl/inc/win/salbmp.h | 10
vcl/win/source/gdi/salbmp.cxx | 16 +
xmloff/source/style/xmlnumfe.cxx | 4
67 files changed, 524 insertions(+), 429 deletions(-)
New commits:
commit 6609cc4401c34c53dd4f4233b2031b599ee09df8
Author: Herbert Dürr <hdu at apache.org>
Date: Tue May 28 10:01:59 2013 +0000
#i122378# support graphite on system-STL based AOO on Windows
diff --git a/graphite/graphite-2.3.1_stlportemu.patch b/graphite/graphite-2.3.1_stlportemu.patch
new file mode 100644
index 0000000..9900528
--- /dev/null
+++ b/graphite/graphite-2.3.1_stlportemu.patch
@@ -0,0 +1,50 @@
+--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.cpp 2013-05-27 11:54:18.432327600 +0200
++++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.cpp 2013-05-27 11:52:02.662562100 +0200
+@@ -869,7 +869,7 @@
+
+ } // namespace gr
+
+-template stdext::hash_map<
++template hashmap_ns::hash_map<
+ gr::WinFont::LogFontWrapper,
+ gr::WinFont::FontHandleCache::FontCacheValue,
+ gr::WinFont::LogFontHashFuncs>;
+--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.h 2013-05-27 11:56:04.110372100 +0200
++++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.h 2013-05-27 11:55:56.412931800 +0200
+@@ -28,8 +28,12 @@
+ #include "Font.h"
+ #include <map>
+
+-#ifdef _STLPORT_VERSION
+-namespace stdext = _STLP_STD;
++#ifdef SYSTEM_STL_HASHMAP
++namespace hashmap_ns = std;
++#elif defined(_STLPORT_VERSION)
++namespace hashmap_ns = _STLP_STD;
++#else
++namespace hashmap_ns = stdext;
+ #endif
+
+ namespace gr
+@@ -212,7 +216,7 @@
+ FontCacheValue GetCache(LOGFONT & lf);
+ void DeleteFont(HFONT hfont);
+
+- typedef stdext::hash_map<LogFontWrapper, FontCacheValue, LogFontHashFuncs> FontHandleHashMap;
++ typedef hashmap_ns::hash_map<LogFontWrapper, FontCacheValue, LogFontHashFuncs> FontHandleHashMap;
+
+ protected:
+ FontHandleHashMap m_hmlffcv;
+--- misc/silgraphite-2.3.1/engine/include/graphite/GrCommon.h 2013-05-27 15:10:31.799725700 +0200
++++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrCommon.h 2013-05-27 15:10:19.387015800 +0200
+@@ -18,8 +18,8 @@
+ #ifndef GRCOMMON_INCLUDED
+ #define GRCOMMON_INCLUDED
+
+-#define _SECURE_SCL 0 // to allow GlyphSetIterator to work, which points off the end of a vector
+-#define _HAS_ITERATOR_DEBUGGING 0
++//#define _SECURE_SCL 0 // to allow GlyphSetIterator to work, which points off the end of a vector
++//#define _HAS_ITERATOR_DEBUGGING 0
+
+ // Standard Headers.
+
diff --git a/graphite/makefile.mk b/graphite/makefile.mk
index a0d44a7..438f632 100644
--- a/graphite/makefile.mk
+++ b/graphite/makefile.mk
@@ -50,7 +50,7 @@ all:
TARFILE_NAME=silgraphite-2.3.1
TARFILE_MD5=d35724900f6a4105550293686688bbb3
-PATCH_FILES=graphite-2.3.1.patch graphite-2.3.1_debug.patch
+PATCH_FILES=graphite-2.3.1.patch graphite-2.3.1_debug.patch graphite-2.3.1_stlportemu.patch
# convert line-endings to avoid problems when patching
CONVERTFILES=\
@@ -71,8 +71,10 @@ VCNUM=7
.ELSE
VCNUM=8
.ENDIF
+.IF "$(USE_SYSTEM_STL)"!="YES"
# make use of stlport headerfiles
EXT_USE_STLPORT=TRUE
+.ENDIF
BUILD_ACTION=nmake VERBOSE=1
.IF "x$(debug)"!="x"
BUILD_FLAGS= "CFG=DEBUG"
@@ -173,4 +175,4 @@ OUT2INC=wrappers$/win32$/WinFont.h
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
-.ENDIF
\ No newline at end of file
+.ENDIF
commit 47204c74d9e52f54f6983af19b66af2a96b42e61
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Tue May 28 10:01:32 2013 +0000
Add missing copy&paste of SfxAppToolBoxControl_Impl::Select
diff --git a/framework/inc/uielement/popuptoolbarcontroller.hxx b/framework/inc/uielement/popuptoolbarcontroller.hxx
index f42adbd..f6b1ae0 100644
--- a/framework/inc/uielement/popuptoolbarcontroller.hxx
+++ b/framework/inc/uielement/popuptoolbarcontroller.hxx
@@ -82,7 +82,10 @@ namespace framework
private:
void functionExecuted( const rtl::OUString &rCommand );
void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& rEvent ) throw ( ::com::sun::star::uno::RuntimeException );
+ void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
void setItemImage( const rtl::OUString &rCommand );
+
+ rtl::OUString m_aLastURL;
};
class WizardsToolbarController : public PopupMenuToolbarController
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index a5e97b0..87bf920 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -23,6 +23,8 @@
#include "precompiled_framework.hxx"
#include <uielement/popuptoolbarcontroller.hxx>
+#include <framework/menuconfiguration.hxx>
+#include <toolkit/awt/vclxmenu.hxx>
#include <comphelper/processfactory.hxx>
#include <svtools/imagemgr.hxx>
#include <svtools/miscopt.hxx>
@@ -35,9 +37,10 @@
#include <com/sun/star/awt/PopupMenuDirection.hpp>
#include <com/sun/star/frame/PopupMenuControllerFactory.hpp>
-
+#include <com/sun/star/frame/XDispatchProvider.hpp>
#define UNO_COMMAND_RECENT_FILE_LIST ".uno:RecentFileList"
+#define SFX_REFERER_USER "private:user"
using rtl::OUString;
namespace css = ::com::sun::star;
@@ -278,6 +281,39 @@ NewToolbarController::statusChanged(
enable( rEvent.IsEnabled );
}
+void SAL_CALL
+NewToolbarController::execute( sal_Int16 /*KeyModifier*/ )
+ throw ( css::uno::RuntimeException )
+{
+ osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_aLastURL.getLength() )
+ return;
+
+ OUString aTarget( RTL_CONSTASCII_USTRINGPARAM( "_default" ) );
+ if ( m_xPopupMenu.is() )
+ {
+ // TODO investigate how to wrap Get/SetUserValue in css::awt::XMenu
+ MenuConfiguration::Attributes* pMenuAttributes( 0 );
+ VCLXPopupMenu* pTkPopupMenu = dynamic_cast< VCLXPopupMenu * >(
+ VCLXMenu::GetImplementation( m_xPopupMenu ) );
+
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ PopupMenu* pVCLPopupMenu = dynamic_cast< PopupMenu * >( pTkPopupMenu->GetMenu() );
+ if ( pVCLPopupMenu )
+ pMenuAttributes = reinterpret_cast< MenuConfiguration::Attributes* >(
+ pVCLPopupMenu->GetUserValue( pVCLPopupMenu->GetCurItemId() ) );
+
+ if ( pMenuAttributes )
+ aTarget = pMenuAttributes->aTargetFrame;
+ }
+
+ css::uno::Sequence< css::beans::PropertyValue > aArgs( 1 );
+ aArgs[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Referer" ));
+ aArgs[0].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( SFX_REFERER_USER ) );
+
+ dispatchCommand( m_aLastURL, aArgs, aTarget );
+}
+
void NewToolbarController::functionExecuted( const OUString &rCommand )
{
setItemImage( rCommand );
@@ -409,6 +445,8 @@ void NewToolbarController::setItemImage( const OUString &rCommand )
}
else
pToolBox->SetItemImage( m_nToolBoxId, aImage );
+
+ m_aLastURL = aURL;
}
diff --git a/svtools/inc/svtools/toolboxcontroller.hxx b/svtools/inc/svtools/toolboxcontroller.hxx
index a6c44c8..73c021a 100644
--- a/svtools/inc/svtools/toolboxcontroller.hxx
+++ b/svtools/inc/svtools/toolboxcontroller.hxx
@@ -56,8 +56,6 @@ class ToolBox;
namespace svt
{
-struct DispatchInfo;
-
class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusListener,
public ::com::sun::star::frame::XToolbarController,
public ::com::sun::star::lang::XInitialization,
@@ -126,12 +124,10 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
const rtl::OUString& getCommandURL() const { return m_aCommandURL; }
const rtl::OUString& getModuleName() const { return m_sModuleName; }
- void dispatchCommand( const ::rtl::OUString& sCommandURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
+ void dispatchCommand( const ::rtl::OUString& sCommandURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs, const rtl::OUString &sTarget = rtl::OUString() );
void enable( bool bEnable );
- DECL_STATIC_LINK( ToolboxController, ExecuteHdl_Impl, DispatchInfo* );
-
protected:
bool getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox );
void setSupportVisiableProperty(sal_Bool bValue); //shizhoubo
@@ -144,6 +140,23 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
};
+ struct DispatchInfo
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > mxDispatch;
+ const ::com::sun::star::util::URL maURL;
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > maArgs;
+
+ DispatchInfo( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& xDispatch,
+ const ::com::sun::star::util::URL& rURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs )
+ : mxDispatch( xDispatch )
+ , maURL( rURL )
+ , maArgs( rArgs )
+ {}
+ };
+
+ DECL_STATIC_LINK( ToolboxController, ExecuteHdl_Impl, DispatchInfo* );
+
typedef ::std::hash_map< ::rtl::OUString,
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >,
::rtl::OUStringHash,
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index a1192a7..7b473d8 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -56,16 +56,6 @@ using namespace ::com::sun::star::frame;
namespace svt
{
-struct DispatchInfo
-{
- Reference< XDispatch > mxDispatch;
- const URL maURL;
- const Sequence< PropertyValue > maArgs;
-
- DispatchInfo( const Reference< XDispatch >& xDispatch, const URL& rURL, const Sequence< PropertyValue >& rArgs )
- : mxDispatch( xDispatch ), maURL( rURL ), maArgs( rArgs ) {}
-};
-
ToolboxController::ToolboxController(
const Reference< XMultiServiceFactory >& rServiceManager,
@@ -724,7 +714,7 @@ Reference< ::com::sun::star::awt::XWindow > ToolboxController::getParent() const
return m_xParentWindow;
}
-void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequence< PropertyValue >& rArgs )
+void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequence< PropertyValue >& rArgs, const OUString &sTarget )
{
try
{
@@ -733,9 +723,12 @@ void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequ
aURL.Complete = sCommandURL;
getURLTransformer()->parseStrict( aURL );
- Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, OUString(), 0 ), UNO_QUERY_THROW );
+ Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, sTarget, 0 ), UNO_QUERY_THROW );
- Application::PostUserEvent( STATIC_LINK(0, ToolboxController, ExecuteHdl_Impl), new DispatchInfo( xDispatch, aURL, rArgs ) );
+ DispatchInfo *pDispatchInfo = new DispatchInfo( xDispatch, aURL, rArgs );
+ if ( !Application::PostUserEvent( STATIC_LINK(0, ToolboxController, ExecuteHdl_Impl),
+ pDispatchInfo ) )
+ delete pDispatchInfo;
}
catch( Exception& )
commit 83bf5a7b85a0e3430cc807415e081a10a1775f9f
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Tue May 28 10:01:22 2013 +0000
Remove dbaui::OStatusbarController
It actually does not override any method in svt::StatusbarController, so
there is no point in keeping it.
diff --git a/dbaccess/source/ui/control/makefile.mk b/dbaccess/source/ui/control/makefile.mk
index 942ed9b..cd32af5 100644
--- a/dbaccess/source/ui/control/makefile.mk
+++ b/dbaccess/source/ui/control/makefile.mk
@@ -44,7 +44,6 @@ SRC1FILES = \
# ... exception files .........................
EXCEPTIONSFILES=\
- $(SLO)$/statusbarontroller.obj \
$(SLO)$/RelationControl.obj \
$(SLO)$/toolboxcontroller.obj \
$(SLO)$/tabletree.obj \
diff --git a/dbaccess/source/ui/control/statusbarontroller.cxx b/dbaccess/source/ui/control/statusbarontroller.cxx
deleted file mode 100644
index 6b82ec1..0000000
--- a/dbaccess/source/ui/control/statusbarontroller.cxx
+++ /dev/null
@@ -1,46 +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_dbaccess.hxx"
-#include "statusbarontroller.hxx"
-#ifndef _DBU_REGHELPER_HXX_
-#include "dbu_reghelper.hxx"
-#endif
-
-extern "C" void SAL_CALL createRegistryInfo_OStatusbarController()
-{
- static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OStatusbarController> aAutoRegistration;
-}
-namespace dbaui
-{
- using namespace svt;
- using namespace com::sun::star::uno;
- using namespace com::sun::star::beans;
- using namespace com::sun::star::lang;
- using namespace ::com::sun::star::frame;
- using namespace ::com::sun::star::util;
-
- IMPLEMENT_SERVICE_INFO1_STATIC(OStatusbarController,"com.sun.star.sdb.ApplicationStatusbarController","com.sun.star.frame.StatusbarController")
- IMPLEMENT_FORWARD_XINTERFACE2(OStatusbarController,StatusbarController,OStatusbarController_BASE)
-}
diff --git a/dbaccess/source/ui/inc/statusbarontroller.hxx b/dbaccess/source/ui/inc/statusbarontroller.hxx
deleted file mode 100644
index 718c259..0000000
--- a/dbaccess/source/ui/inc/statusbarontroller.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 DBAUI_STATUSBARCONTROLLER_HXX
-#define DBAUI_STATUSBARCONTROLLER_HXX
-
-#ifndef _SVTOOLS_STATUSBARCONTROLLER_HXX
-#include <svtools/statusbarcontroller.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
-#include <comphelper/uno3.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
-#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
-#include <cppuhelper/implbase1.hxx>
-#endif
-
-namespace dbaui
-{
- typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XServiceInfo> OStatusbarController_BASE;
- class OStatusbarController : public ::svt::StatusbarController,
- public OStatusbarController_BASE
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
- public:
- OStatusbarController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB):m_xORB(_rxORB){}
-
- DECLARE_XINTERFACE()
- // ::com::sun::star::lang::XServiceInfo
- DECLARE_SERVICE_INFO_STATIC();
- };
-}
-#endif // DBAUI_STATUSBARCONTROLLER_HXX
-
diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx
index a979715..173945d 100644
--- a/dbaccess/source/ui/misc/uiservices.cxx
+++ b/dbaccess/source/ui/misc/uiservices.cxx
@@ -70,7 +70,6 @@ extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialogSetup();
extern "C" void SAL_CALL createRegistryInfo_OColumnControlModel();
extern "C" void SAL_CALL createRegistryInfo_OColumnControl();
extern "C" void SAL_CALL createRegistryInfo_OToolboxController();
-extern "C" void SAL_CALL createRegistryInfo_OStatusbarController();
extern "C" void SAL_CALL createRegistryInfo_CopyTableWizard();
extern "C" void SAL_CALL createRegistryInfo_OTextConnectionSettingsDialog();
@@ -102,7 +101,6 @@ extern "C" void SAL_CALL createRegistryInfo_DBU()
createRegistryInfo_OColumnControlModel();
createRegistryInfo_OColumnControl();
createRegistryInfo_OToolboxController();
- createRegistryInfo_OStatusbarController();
createRegistryInfo_CopyTableWizard();
createRegistryInfo_OTextConnectionSettingsDialog();
bInit = sal_True;
diff --git a/dbaccess/util/dbu.component b/dbaccess/util/dbu.component
index 43fffb2..9cc7d0d 100644
--- a/dbaccess/util/dbu.component
+++ b/dbaccess/util/dbu.component
@@ -47,9 +47,6 @@
<implementation name="com.sun.star.comp.sdb.DirectSQLDialog">
<service name="org.openoffice.comp.dbu.DirectSqlDialog"/>
</implementation>
- <implementation name="com.sun.star.sdb.ApplicationStatusbarController">
- <service name="com.sun.star.frame.StatusbarController"/>
- </implementation>
<implementation name="com.sun.star.sdb.ApplicationToolboxController">
<service name="com.sun.star.frame.ToolboxController"/>
</implementation>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 6b00240..5a20a7f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -447,50 +447,6 @@
</node>
</node>
<node oor:name="StatusBar">
- <node oor:name="c1" oor:op="replace">
- <prop oor:name="Command">
- <value>.uno:DBStatusType</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.sdb.OfficeDatabaseDocument</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.sdb.ApplicationStatusbarController</value>
- </prop>
- </node>
- <node oor:name="c2" oor:op="replace">
- <prop oor:name="Command">
- <value>.uno:DBStatusDBName</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.sdb.OfficeDatabaseDocument</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.sdb.ApplicationStatusbarController</value>
- </prop>
- </node>
- <node oor:name="c3" oor:op="replace">
- <prop oor:name="Command">
- <value>.uno:DBStatusUserName</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.sdb.OfficeDatabaseDocument</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.sdb.ApplicationStatusbarController</value>
- </prop>
- </node>
- <node oor:name="c4" oor:op="replace">
- <prop oor:name="Command">
- <value>.uno:DBStatusHostName</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.sdb.OfficeDatabaseDocument</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.sdb.ApplicationStatusbarController</value>
- </prop>
- </node>
<node oor:name="c5" oor:op="replace">
<prop oor:name="Command">
<value>.uno:LanguageStatus</value>
commit 0b373b3e4c45d09c40a8949e9366adb9b991de4b
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Tue May 28 10:01:09 2013 +0000
Silence warning C4706
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 53530b3..a5e97b0 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -320,7 +320,7 @@ static sal_Bool Impl_ExistURLInMenu(
{
sal_Bool bValidFallback( sal_False );
sal_uInt16 nCount( 0 );
- if ( rPopupMenu.is() && ( nCount = rPopupMenu->getItemCount() ) && sURL.getLength() )
+ if ( rPopupMenu.is() && ( nCount = rPopupMenu->getItemCount() ) != 0 && sURL.getLength() )
{
for ( sal_uInt16 n = 0; n < nCount; ++n )
{
commit 66710ce4a2fd0c4e0f1b376d7c5da35d0ab2056f
Author: Armin Le Grand <alg at apache.org>
Date: Tue May 28 10:00:27 2013 +0000
i122350 Corrected buffering when alpha changed
diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index 4604c9a..baf3d6f 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -43,7 +43,7 @@ typedef boost::shared_ptr< Gdiplus::Bitmap > GdiPlusBmpPtr;
class WinSalBitmap : public SalBitmap
{
private:
- friend class GdiPlusBuffer; // allow buffer to remove maGdiPlusBitmap eventually
+ friend class GdiPlusBuffer; // allow buffer to remove maGdiPlusBitmap and mpAssociatedAlpha eventually
Size maSize;
HGLOBAL mhDIB;
@@ -51,8 +51,14 @@ private:
// the buffered evtl. used Gdiplus::Bitmap instance. It is managed by
// GdiPlusBuffer. To make this safe, it is only handed out as shared
- // pointer; the GdiPlusBuffer may delete the local instance
+ // pointer; the GdiPlusBuffer may delete the local instance.
+ //
+ // mpAssociatedAlpha holds the last WinSalBitmap used to construct an
+ // evtl. buffered GdiPlusBmp. This is needed since the GdiPlusBmp is a single
+ // instance and remembered only on the content-WinSalBitmap, not on the
+ // alpha-WinSalBitmap.
GdiPlusBmpPtr maGdiPlusBitmap;
+ const WinSalBitmap* mpAssociatedAlpha;
sal_uInt16 mnBitCount;
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index 20e60e8..4d87af4 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -161,6 +161,7 @@ public:
if(pSource->maGdiPlusBitmap.get())
{
pSource->maGdiPlusBitmap.reset();
+ pSource->mpAssociatedAlpha = 0;
}
}
}
@@ -186,6 +187,7 @@ WinSalBitmap::WinSalBitmap()
mhDIB(0),
mhDDB(0),
maGdiPlusBitmap(),
+ mpAssociatedAlpha(0),
mnBitCount(0)
{
}
@@ -219,6 +221,16 @@ void WinSalBitmap::Destroy()
GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSource) const
{
+ WinSalBitmap* pThat = const_cast< WinSalBitmap* >(this);
+
+ if(maGdiPlusBitmap.get() && pAlphaSource != mpAssociatedAlpha)
+ {
+ // #122350# if associated alpha with which the GDIPlus was constructed has changed
+ // it is necessary to remove it from buffer, reset reference to it and reconstruct
+ pThat->maGdiPlusBitmap.reset();
+ aGdiPlusBuffer.remEntry(const_cast< WinSalBitmap& >(*this));
+ }
+
if(maGdiPlusBitmap.get())
{
aGdiPlusBuffer.touchEntry(const_cast< WinSalBitmap& >(*this));
@@ -227,15 +239,15 @@ GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSourc
{
if(maSize.Width() > 0 && maSize.Height() > 0)
{
- WinSalBitmap* pThat = const_cast< WinSalBitmap* >(this);
-
if(pAlphaSource)
{
pThat->maGdiPlusBitmap.reset(pThat->ImplCreateGdiPlusBitmap(*pAlphaSource));
+ pThat->mpAssociatedAlpha = pAlphaSource;
}
else
{
pThat->maGdiPlusBitmap.reset(pThat->ImplCreateGdiPlusBitmap());
+ pThat->mpAssociatedAlpha = 0;
}
if(maGdiPlusBitmap.get())
commit a599e5242751057537c3de6eb58ceff2a173580e
Author: Herbert Dürr <hdu at apache.org>
Date: Tue May 28 09:52:00 2013 +0000
#i122378# avoid non-iterator bound std::transform() in namedvaluecollection.hxx
in some build environments the use of std::transform() with plain pointers as
input iterators results in many warnings about how unsafe such a construct is.
The warnings could be suppressed e.g. on MSVC with the SCL_SECURE_NO_WARNINGS
define. Open coding the construct makes it cleaner and more debugable though.
diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx b/comphelper/inc/comphelper/namedvaluecollection.hxx
index 04386ec..d22446b 100644
--- a/comphelper/inc/comphelper/namedvaluecollection.hxx
+++ b/comphelper/inc/comphelper/namedvaluecollection.hxx
@@ -353,12 +353,12 @@ namespace comphelper
::com::sun::star::uno::Sequence< VALUE_TYPE > aValues;
*this >>= aValues;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aWrappedValues( aValues.getLength() );
- ::std::transform(
- aValues.getConstArray(),
- aValues.getConstArray() + aValues.getLength(),
- aWrappedValues.getArray(),
- ::com::sun::star::uno::makeAny< VALUE_TYPE >
- );
+
+ ::com::sun::star::uno::Any* pO = aWrappedValues.getArray();
+ const VALUE_TYPE* pV = aValues.getConstArray();
+ const sal_Int32 nLen = aValues.getLength();
+ for( sal_Int32 i = 0; i < nLen; ++i )
+ *(pO++) = ::com::sun::star::uno::makeAny<VALUE_TYPE>( *(pV++) );
return aWrappedValues;
}
};
commit 5ed6de1d9a29e061d115bca0805680d4ecd66518
Author: Herbert Dürr <hdu at apache.org>
Date: Tue May 28 09:45:12 2013 +0000
#i122208# const XMLOFF containers cannot provide non-const iterators
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 791c7cd..cc1a43b 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -156,13 +156,13 @@ void SvXMLNumUsedList_Impl::SetUsed( sal_uInt32 nKey )
sal_Bool SvXMLNumUsedList_Impl::IsUsed( sal_uInt32 nKey ) const
{
- SvXMLuInt32Set::iterator aItr = aUsed.find(nKey);
+ SvXMLuInt32Set::const_iterator aItr = aUsed.find(nKey);
return (aItr != aUsed.end());
}
sal_Bool SvXMLNumUsedList_Impl::IsWasUsed( sal_uInt32 nKey ) const
{
- SvXMLuInt32Set::iterator aItr = aWasUsed.find(nKey);
+ SvXMLuInt32Set::const_iterator aItr = aWasUsed.find(nKey);
return (aItr != aWasUsed.end());
}
commit 62767e15a477277839649cdba55898b2302e3017
Author: Herbert Dürr <hdu at apache.org>
Date: Tue May 28 09:36:03 2013 +0000
#i122396# prevent boost from using typeids in connectivity's no-rtti parts
fixes a build breaker in some environments where boost's tr1 is used as STL.
The dependence of rtti-less parts of the connectivity module on rtti-enabled
comphelper headers which in turn uses STL in both modes explores the limits
of compilers and runtime environments for little gain and is thus quite sick...
diff --git a/connectivity/source/drivers/mozab/makefile_mozab.mk b/connectivity/source/drivers/mozab/makefile_mozab.mk
index b3c1317..7a94ea4 100644
--- a/connectivity/source/drivers/mozab/makefile_mozab.mk
+++ b/connectivity/source/drivers/mozab/makefile_mozab.mk
@@ -69,7 +69,7 @@ MOZINC = . \
.IF "$(COM)" == "GCC"
INCPOST += $(MOZINC)
CFLAGSCXX += \
- -fno-rtti \
+ -fno-rtti -DBOOST_NO_TYPEID \
-Wall \
-Wconversion \
-Wpointer-arith \
@@ -95,7 +95,7 @@ MOZINC = . \
CFLAGS += -fPIC -g
CDEFS += -DOJI
CFLAGSCXX += \
- -fno-rtti \
+ -fno-rtti -DBOOST_NO_TYPEID \
-Wconversion \
-Wpointer-arith \
-Wcast-align \
@@ -107,7 +107,7 @@ MOZINC = . \
.ELIF "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX"
CFLAGS += -fPIC
CFLAGSCXX += \
- -fno-rtti \
+ -fno-rtti -DBOOST_NO_TYPEID \
-Wconversion \
-Wpointer-arith \
-Wcast-align \
commit 62d255d91af52b734a24959a84b20d4cb232f270
Author: Herbert Dürr <hdu at apache.org>
Date: Tue May 28 07:38:02 2013 +0000
added the ALv2 license header to the LLDB helper script
diff --git a/solenv/inc/lldb4aoo.py b/solenv/inc/lldb4aoo.py
index 3f64058..e380e61 100644
--- a/solenv/inc/lldb4aoo.py
+++ b/solenv/inc/lldb4aoo.py
@@ -1,3 +1,20 @@
+# 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.
+
# to activate the AOO-LLDB helper script type the line below into LLDB
# command script import path-to-script/lldb4aoo.py
# or activate it automatically by adding the line to ~/.lldbinit
commit f68dfc2cc8754d9cf72ae1b09f119e683ad44124
Author: Pavel JanÃk <paveljanik at apache.org>
Date: Mon May 27 20:01:41 2013 +0000
Unname unused argument to prevent compiler warnings.
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 1d7914b..e00f079 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -312,7 +312,7 @@ void TextPropertyPanel::HandleContextChange (
void TextPropertyPanel::UpdateFontColorToolbox (
- const ::sfx2::sidebar::EnumContext aContext)
+ const ::sfx2::sidebar::EnumContext /* aContext */)
{
bool bIsWriterFontColor (false);
if (maContext.GetApplication_DI() == sfx2::sidebar::EnumContext::Application_WriterVariants)
commit 5406664926f5c86b20aa4f68c22611a852968d11
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 16:04:49 2013 +0000
#i122378# filter symbols from win's native tr1 from reexport
diff --git a/chart2/source/tools/exports.flt b/chart2/source/tools/exports.flt
index 376659c..38fcdb9 100644
--- a/chart2/source/tools/exports.flt
+++ b/chart2/source/tools/exports.flt
@@ -1,3 +1,4 @@
_real@
_TI1
_TI2
+_TI3
diff --git a/chart2/source/view/exports.flt b/chart2/source/view/exports.flt
index 56fa90f..8d28b44 100644
--- a/chart2/source/view/exports.flt
+++ b/chart2/source/view/exports.flt
@@ -2,3 +2,4 @@ lcl_
_real@
_TI1
_TI2
+_TI3
diff --git a/pyuno/source/module/pyuno.flt b/pyuno/source/module/pyuno.flt
index f4b498a..c0605cb 100755
--- a/pyuno/source/module/pyuno.flt
+++ b/pyuno/source/module/pyuno.flt
@@ -11,4 +11,5 @@
__CT??_R0?AVbad_alloc at std@@@8??0bad_alloc at std@@QAE at ABV01@@Z12
__CT??_R0?AVexception@@@8??0exception@@QAE at ABV0@@Z12
__CTA2?AVbad_alloc at std@@
+__CTA3?
__CT??
commit a2859e37a3fc343541fd879d9a581d5cd0e65563
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 15:58:29 2013 +0000
#i122378# allow linking against MSVC TR1's STL libraries instead of stlport
the standard C++ library on MSVC is available in LIBCPMT.LIB and MSVCPRT.LIB
(the static and dynamic C++ runtime libraries for multithreaded environments).
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index abbd70c..1a6f361 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -74,11 +74,21 @@ gb_Library_FILENAMES := $(patsubst xml2:ixml2%,xml2:libxml2$(gb_Library_IARCEXT)
gb_Library_FILENAMES := $(patsubst xslt:ixslt%,xslt:libxslt.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
+
+ifeq ($(USE_SYSTEM_STL),YES)
+ifeq ($(gb_PRODUCT),$(true))
+gb_Library_FILENAMES := $(patsubst stl:istl%,stl:msvcprt%,$(gb_Library_FILENAMES))
+else
+gb_Library_FILENAMES := $(patsubst stl:istl%,stl:msvcprtd%,$(gb_Library_FILENAMES))
+endif
+else
ifeq ($(gb_PRODUCT),$(true))
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
else
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71_stldebug%,$(gb_Library_FILENAMES))
endif
+endif
+
gb_Library_NOILIBFILENAMES:=\
icule \
icuuc \
@@ -124,11 +134,21 @@ gb_Library_FILENAMES := $(patsubst xslt:ixslt%,xslt:libxslt%,$(gb_Library_FILENA
gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
gb_StaticLibrary_FILENAMES := $(patsubst graphite:graphite%,graphite:graphite_dll%,$(gb_StaticLibrary_FILENAMES))
+
+ifeq ($(USE_SYSTEM_STL),YES)
+ifeq ($(gb_PRODUCT),$(true))
+gb_Library_FILENAMES := $(patsubst stl:istl%,stl:msvcprt%,$(gb_Library_FILENAMES))
+else
+gb_Library_FILENAMES := $(patsubst stl:istl%,stl:msvcprtd%,$(gb_Library_FILENAMES))
+endif
+else
ifeq ($(gb_PRODUCT),$(true))
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
else
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71_stldebug%,$(gb_Library_FILENAMES))
endif
+endif
+
gb_Library_NOILIBFILENAMES:=\
advapi32 \
gdi32 \
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index b2e72c63..6205687 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -157,13 +157,17 @@ gb_GLOBALDEFS := \
-DENABLE_LAYOUT=0 \
-DOSL_DEBUG_LEVEL=$(gb_DEBUGLEVEL) \
-DSOLAR_JAVA \
- -DSTLPORT_VERSION=$(STLPORT_VER) \
-DSUPD=$(UPD) \
-DVCL \
$(gb_OSDEFS) \
$(gb_COMPILERDEFS) \
$(gb_CPUDEFS) \
+ifneq ($(USE_SYSTEM_STL),YES)
+gb_GLOBALDEFS += \
+ -DSTLPORT_VERSION=$(STLPORT_VER)
+endif
+
ifeq ($(gb_PRODUCT),$(true))
gb_GLOBALDEFS += \
-DPRODUCT \
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index e01f908..09efdcf 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -479,11 +479,21 @@ gb_Library_FILENAMES :=\
gb_Library_DLLEXT := .dll
gb_Library_MAJORVER := 3
gb_Library_RTEXT := MSC$(gb_Library_DLLEXT)
+
+ifeq ($(USE_SYSTEM_STL),YES)
+ifeq ($(gb_PRODUCT),$(true))
+gb_Library_STLEXT := msvcprt.lib
+else
+gb_Library_STLEXT := msvcprtd.lib
+endif
+else
ifeq ($(gb_PRODUCT),$(true))
gb_Library_STLEXT := port_vc7145$(gb_Library_DLLEXT)
else
gb_Library_STLEXT := port_vc7145_stldebug$(gb_Library_DLLEXT)
endif
+endif
+
gb_Library_OOOEXT := $(gb_Library_DLLEXT)
gb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
gb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
diff --git a/solenv/inc/wntmsci11.mk b/solenv/inc/wntmsci11.mk
index e620618..c7e7687 100644
--- a/solenv/inc/wntmsci11.mk
+++ b/solenv/inc/wntmsci11.mk
@@ -309,6 +309,21 @@ STDLIBCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
STDSHLGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
STDSHLCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
+.IF "$(USE_SYSTEM_STL)" == "YES"
+.IF "$(DYNAMIC_CRT)"!=""
+.IF "$(USE_STLP_DEBUG)" != ""
+LIBCMT+= msvcprtd.lib
+.ELSE
+LIBCMT+= msvcprt.lib
+.ENDIF
+.ELSE # "$(DYNAMIC_CRT)"==""
+.IF "$(USE_STLP_DEBUG)" != ""
+LIBCMT+= libcpmtd.lib
+.ELSE
+LIBCMT+= libcpmt.lib
+.ENDIF "$(USE_STLP_DEBUG)" == ""
+.ENDIF # "$(DYNAMIC_CRT)"!=""
+.ELSE # !USE_SYSTEM_STL
.IF "$(USE_STLP_DEBUG)" != ""
LIBSTLPORT=stlport_vc71_stldebug.lib
LIBSTLPORTST=stlport_vc71_stldebug_static.lib
@@ -316,6 +331,7 @@ LIBSTLPORTST=stlport_vc71_stldebug_static.lib
LIBSTLPORT=stlport_vc71.lib
LIBSTLPORTST=stlport_vc71_static.lib
.ENDIF
+.ENDIF
.IF "$(PROF_EDITION)" == ""
ATL_INCLUDE*=$(COMPATH)/PlatformSDK/include/atl
commit 24e288fb170c7558580877ab632395d7accbb0f7
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 15:52:27 2013 +0000
#i122362# omit fetching of stlport4 tarballs if possible
it doesn't make sense to download them if they are not used
diff --git a/external_deps.lst b/external_deps.lst
index 6fbfbae..9924501 100644
--- a/external_deps.lst
+++ b/external_deps.lst
@@ -168,20 +168,20 @@ if ( true )
URL1 = http://archive.apache.org/dist/apr/$(name)
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if ( true )
+if ( USE_SYSTEM_STL != YES )
MD5 = c441926f3a552ed3e5b274b62e86af16
name = STLport-4.0.tar.gz
# This seems to be the original host, but the MD5 sum does not match.
# URL1 = http://sourceforge.net/projects/stlport/files/STLport%20archive/STLport%204/STLport-4.0.tar.gz/download
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if ( true )
+if ( USE_SYSTEM_STL != YES )
MD5 = 18f577b374d60b3c760a3a3350407632
name = STLport-4.5.tar.gz
URL1 = http://sourceforge.net/projects/stlport/files/STLport%20archive/STLport%204/STLport-4.5.tar.gz/download
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if ( true )
+if ( USE_SYSTEM_STL != YES )
MD5 = 7376930b0d3f3d77a685d94c4a3acda8
name = STLport-4.5-0119.tar.gz
URL1 = $(OOO_EXTRAS)$(MD5)-$(name)
commit 1f68b968b8cb93cbde556dcc3ed6c2a40b5242ff
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 15:46:35 2013 +0000
#i122208# include <algorithm> explicitly if functions from <algorithm> are used
most STLs include relevant parts of it indirectly, but
one can not depend on it (seen with MSVC's tr1 headers)
diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
index b23f0ba..5008c0e 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -30,6 +30,7 @@
#include "macros.hxx"
#include <rtl/math.hxx>
+#include <algorithm>
using ::com::sun::star::uno::Sequence;
using ::rtl::OUString;
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index 73a45cb..b6a1e1e 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -25,6 +25,7 @@
#include "precompiled_comphelper.hxx"
#include <comphelper/numberedcollection.hxx>
+#include <algorithm>
//_______________________________________________
// includes
diff --git a/connectivity/source/commontools/TSkipDeletedSet.cxx b/connectivity/source/commontools/TSkipDeletedSet.cxx
index 297e05b..a1185f6 100644
--- a/connectivity/source/commontools/TSkipDeletedSet.cxx
+++ b/connectivity/source/commontools/TSkipDeletedSet.cxx
@@ -26,6 +26,7 @@
#include "TSkipDeletedSet.hxx"
#include <osl/diagnose.h>
#include <rtl/logfile.hxx>
+#include <algorithm>
using namespace connectivity;
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx
index 9398409..2102443 100644
--- a/connectivity/source/drivers/ado/AColumns.cxx
+++ b/connectivity/source/drivers/ado/AColumns.cxx
@@ -34,9 +34,7 @@
#include <comphelper/property.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbexception.hxx>
-#ifdef __MINGW32__
#include <algorithm>
-#endif
#include "resource/ado_res.hrc"
using namespace connectivity::ado;
diff --git a/sal/osl/all/debugbase.cxx b/sal/osl/all/debugbase.cxx
index f525a08..1315a87 100644
--- a/sal/osl/all/debugbase.cxx
+++ b/sal/osl/all/debugbase.cxx
@@ -31,6 +31,7 @@
#include "osl/diagnose.hxx"
#include "boost/bind.hpp"
#include <vector>
+#include <algorithm>
// define own ones, independent of OSL_DEBUG_LEVEL:
#define DEBUGBASE_ENSURE_(c, f, l, m) \
commit 08159967126946849906827ceadd802053d132c0
Author: Andre Fischer <af at apache.org>
Date: Mon May 27 12:55:37 2013 +0000
122387: Use the right tool box for font color in text sidebar.
diff --git a/sfx2/inc/sfx2/sidebar/EnumContext.hxx b/sfx2/inc/sfx2/sidebar/EnumContext.hxx
index ad53d87..02199ac 100644
--- a/sfx2/inc/sfx2/sidebar/EnumContext.hxx
+++ b/sfx2/inc/sfx2/sidebar/EnumContext.hxx
@@ -133,6 +133,7 @@ public:
Application GetApplication_DI (void) const;
const ::rtl::OUString& GetContextName (void) const;
+ Context GetContext (void) const;
bool operator == (const EnumContext aOther);
bool operator != (const EnumContext aOther);
diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx
index 89968d9..d8332a3 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -142,6 +142,14 @@ const ::rtl::OUString& EnumContext::GetContextName (void) const
+EnumContext::Context EnumContext::GetContext (void) const
+{
+ return meContext;
+}
+
+
+
+
bool EnumContext::operator== (const EnumContext aOther)
{
return meApplication==aOther.meApplication
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 808b0e8..1d7914b 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -161,9 +161,12 @@ TextPropertyPanel::TextPropertyPanel (
mpToolBoxFontColorBackground(ControlFactory::CreateToolBoxBackground(this)),
mpToolBoxFontColor(ControlFactory::CreateToolBox(
mpToolBoxFontColorBackground.get(),
- rContext.GetApplication_DI() == sfx2::sidebar::EnumContext::Application_WriterVariants
- ? SVX_RES(TB_FONTCOLOR_SW)
- : SVX_RES(TB_FONTCOLOR),
+ SVX_RES(TB_FONTCOLOR),
+ rxFrame)),
+ mpToolBoxFontColorBackgroundSW(ControlFactory::CreateToolBoxBackground(this)),
+ mpToolBoxFontColorSW(ControlFactory::CreateToolBox(
+ mpToolBoxFontColorBackgroundSW.get(),
+ SVX_RES(TB_FONTCOLOR_SW),
rxFrame)),
mpToolBoxHighlightBackground(ControlFactory::CreateToolBoxBackground(this)),
mpToolBoxHighlight(ControlFactory::CreateToolBox(
@@ -199,6 +202,8 @@ TextPropertyPanel::TextPropertyPanel (
Initialize();
FreeResource();
+
+ UpdateFontColorToolbox(rContext);
}
@@ -213,6 +218,7 @@ TextPropertyPanel::~TextPropertyPanel (void)
mpToolBoxIncDec.reset();
mpToolBoxFont.reset();
mpToolBoxFontColor.reset();
+ mpToolBoxFontColorSW.reset();
mpToolBoxScript.reset();
mpToolBoxScriptSw.reset();
mpToolBoxSpacing.reset();
@@ -222,6 +228,7 @@ TextPropertyPanel::~TextPropertyPanel (void)
mpToolBoxIncDecBackground.reset();
mpToolBoxFontBackground.reset();
mpToolBoxFontColorBackground.reset();
+ mpToolBoxFontColorBackgroundSW.reset();
mpToolBoxScriptBackground.reset();
mpToolBoxScriptSwBackground.reset();
mpToolBoxSpacingBackground.reset();
@@ -297,6 +304,30 @@ void TextPropertyPanel::HandleContextChange (
default:
break;
}
+
+ UpdateFontColorToolbox(aContext);
+}
+
+
+
+
+void TextPropertyPanel::UpdateFontColorToolbox (
+ const ::sfx2::sidebar::EnumContext aContext)
+{
+ bool bIsWriterFontColor (false);
+ if (maContext.GetApplication_DI() == sfx2::sidebar::EnumContext::Application_WriterVariants)
+ if (maContext.GetContext() != sfx2::sidebar::EnumContext::Context_DrawText)
+ bIsWriterFontColor = true;
+ if (bIsWriterFontColor)
+ {
+ mpToolBoxFontColor->Hide();
+ mpToolBoxFontColorSW->Show();
+ }
+ else
+ {
+ mpToolBoxFontColor->Show();
+ mpToolBoxFontColorSW->Hide();
+ }
}
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index c7487aa..40c0aae 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -101,6 +101,8 @@ private:
::boost::scoped_ptr<ToolBox> mpToolBoxSpacing;
::boost::scoped_ptr<Window> mpToolBoxFontColorBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxFontColor;
+ ::boost::scoped_ptr<Window> mpToolBoxFontColorBackgroundSW;
+ ::boost::scoped_ptr<ToolBox> mpToolBoxFontColorSW;
::boost::scoped_ptr<Window> mpToolBoxHighlightBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxHighlight;
::boost::scoped_ptr<ToolboxButtonColorUpdater> mpFontColorUpdater;
@@ -177,6 +179,13 @@ private:
DECL_LINK(ToolBoxScriptSelectHdl, ToolBox *);
void UpdateItem (const sal_uInt16 nSlotId);
+
+ /** Depending on the given context make one of the toolboxes
+ mpToolBoxFontColor and mpToolBoxFontColorSW visible. Both
+ occupy the same space.
+ */
+ void UpdateFontColorToolbox (
+ const ::sfx2::sidebar::EnumContext aContext);
};
} } // end of namespace ::svx::sidebar
commit 6cac4f8af5df4fe4d972a9fcef9b6ee4227a3ada
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 11:34:50 2013 +0000
#i122378# replace std::iota() with open code
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 63ca62f..e95ee4b 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -297,7 +297,8 @@ namespace vclcanvas
{
// source already has alpha channel - 1:1 mapping,
// i.e. aAlphaMap[0]=0,...,aAlphaMap[255]=255.
- ::std::iota( aAlphaMap, &aAlphaMap[256], 0 );
+ sal_uInt8* p = aAlphaMap;
+ for( int n = 0; n < 256; ++n) *(p++) = n;
}
else
{
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 8642c30..79a98c6 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -1680,7 +1680,9 @@ void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArgumen
if (!bHasSuppressedArgs || !pDefArgFlags)
{
_rArguments.resize( nArgCount);
- ::std::iota( _rArguments.begin(), _rArguments.end(), 0);
+ ::std::vector<sal_uInt16>::iterator it = _rArguments.begin();
+ for( sal_uInt16 n = 0; n < nArgCount; ++n, ++it )
+ *it = n;
}
_rArguments.reserve( nArgCount);
commit 94e218303cdf0fad2862de16bb97063064846059
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 11:30:17 2013 +0000
#i122208# fix sd::TransferableData::Representative's assignment operator
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
index c498d7b..a5034f6 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
@@ -50,7 +50,7 @@ public:
: maBitmap(rBitmap), mbIsExcluded(bIsExcluded) {}
Representative (const Representative& rOther)
: maBitmap(rOther.maBitmap), mbIsExcluded(rOther.mbIsExcluded) {}
- Representative operator= (Representative& rOther)
+ Representative operator=( const Representative& rOther)
{ if (&rOther != this) {maBitmap = rOther.maBitmap; mbIsExcluded = rOther.mbIsExcluded; }
return *this;
}
commit 7bae0d96274fa1c57834281495f5710ef3343dc1
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 11:29:06 2013 +0000
#i122208# const SD containers cannot provide non-const iterators
diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
index bec36e2..0e6e7de 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
@@ -154,7 +154,7 @@ private:
view::Layouter& rLayouter,
const InsertPosition& rInsertPosition,
const bool bCreate = true);
- RunContainer::iterator FindRun (const sal_Int32 nRunIndex) const;
+ RunContainer::const_iterator FindRun (const sal_Int32 nRunIndex) const;
};
@@ -247,7 +247,7 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun (
if (nRow < 0)
return SharedPageObjectRun();
- RunContainer::iterator iRun (maRuns.end());
+ RunContainer::const_iterator iRun (maRuns.end());
if (rLayouter.GetColumnCount() == 1)
{
// There is only one run that contains all slides.
@@ -288,7 +288,7 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun (
-InsertAnimator::Implementation::RunContainer::iterator
+InsertAnimator::Implementation::RunContainer::const_iterator
InsertAnimator::Implementation::FindRun (const sal_Int32 nRunIndex) const
{
return std::find_if(
@@ -326,7 +326,7 @@ void InsertAnimator::Implementation::RemoveRun (const ::boost::shared_ptr<PageOb
// Do not remove runs that show the space for the insertion indicator.
if (pRun->mnLocalInsertIndex == -1)
{
- InsertAnimator::Implementation::RunContainer::iterator iRun (FindRun(pRun->mnRunIndex));
+ InsertAnimator::Implementation::RunContainer::const_iterator iRun (FindRun(pRun->mnRunIndex));
if (iRun != maRuns.end())
{
OSL_ASSERT(*iRun == pRun);
commit c6f4bbfa54bd0fbef6bbc048cbd930c2781b2137
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 11:27:43 2013 +0000
#i122208# const SC containers cannot provide non-const iterators
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 967eea2..3485dd6 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -232,7 +232,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange,
DBG_ASSERT(pListener, "EndListeningArea: pListener Null");
if ( !rpArea )
{
- ScBroadcastAreas::iterator aIter( FindBroadcastArea( rRange));
+ ScBroadcastAreas::const_iterator aIter( FindBroadcastArea( rRange));
if (aIter == aBroadcastAreaTbl.end())
return;
rpArea = *aIter;
@@ -251,7 +251,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange,
{
if ( !rpArea->GetBroadcaster().HasListeners() )
{
- ScBroadcastAreas::iterator aIter( FindBroadcastArea( rRange));
+ ScBroadcastAreas::const_iterator aIter( FindBroadcastArea( rRange));
if (aIter == aBroadcastAreaTbl.end())
return;
DBG_ASSERT( *aIter == rpArea, "EndListeningArea: area pointer mismatch");
@@ -266,7 +266,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange,
}
-ScBroadcastAreas::iterator ScBroadcastAreaSlot::FindBroadcastArea(
+ScBroadcastAreas::const_iterator ScBroadcastAreaSlot::FindBroadcastArea(
const ScRange& rRange ) const
{
aTmpSeekBroadcastArea.UpdateRange( rRange);
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index b06ea04..dd3cee5 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -128,7 +128,7 @@ private:
ScDocument* pDoc;
ScBroadcastAreaSlotMachine* pBASM;
- ScBroadcastAreas::iterator FindBroadcastArea( const ScRange& rRange ) const;
+ ScBroadcastAreas::const_iterator FindBroadcastArea( const ScRange& rRange ) const;
/**
More hypothetical (memory would probably be doomed anyway) check
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index ca403e7..5a41d1a 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1149,12 +1149,13 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
rComments->endElement( XML_authors );
rComments->startElement( XML_commentList, FSEND );
+ Authors::const_iterator aAuthorsBegin = aAuthors.begin();
for( size_t i = 0; i < nNotes; ++i )
{
XclExpNoteList::RecordRefType xNote = mrNotes.GetRecord( i );
Authors::const_iterator aAuthor = aAuthors.find(
XclXmlUtils::ToOUString( xNote->GetAuthor() ) );
- sal_Int32 nAuthorId = distance( aAuthors.begin(), aAuthor );
+ sal_Int32 nAuthorId = distance( aAuthorsBegin, aAuthor );
xNote->WriteXml( nAuthorId, rStrm );
}
commit fd7b9adac0907a2874686aa7387804ffe4bdcbd4
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 27 11:25:44 2013 +0000
#i122208# const SW containers cannot provide non-const iterators
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index 7ad687e..61aa457 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -478,7 +478,7 @@ protected:
than or equal to the referenced child are valid. All children
greater than the referenced child are invalid.
*/
- mutable tSwNumberTreeChildren::iterator mItLastValid;
+ mutable tSwNumberTreeChildren::const_iterator mItLastValid;
#ifdef DBG_UTIL
/**
@@ -547,7 +547,7 @@ protected:
- false only set if aItLastValid is preceeding
the current last valid node
*/
- void SetLastValid(tSwNumberTreeChildren::iterator aItLastValid,
+ void SetLastValid(tSwNumberTreeChildren::const_iterator aItLastValid,
bool bValidating = false) const;
/**
@@ -711,7 +711,7 @@ protected:
*/
void ClearObsoletePhantoms();
- tSwNumberTreeChildren::iterator GetIterator(const SwNumberTreeNode * pChild) const;
+ tSwNumberTreeChildren::const_iterator GetIterator(const SwNumberTreeNode * pChild) const;
/**
Moves all children to a given destination node.
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index d3b0fe0f..c495cf2 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -223,7 +223,7 @@ bool SwNodeNum::HasCountedChildren() const
{
bool bResult = false;
- tSwNumberTreeChildren::iterator aIt;
+ tSwNumberTreeChildren::const_iterator aIt;
for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
{
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index d6fdbbf..b341077 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -148,14 +148,14 @@ void SwNumberTreeNode::ClearObsoletePhantoms()
void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) const
{
- tSwNumberTreeChildren::iterator aValidateIt =
+ tSwNumberTreeChildren::const_iterator aValidateIt =
GetIterator(pNode);
if (aValidateIt != mChildren.end())
{
ASSERT((*aValidateIt)->mpParent == this, "wrong parent");
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
// --> OD 2005-10-19 #126009#
// improvement:
@@ -214,7 +214,7 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons
if ( !(*aIt)->IsRestart() &&
GetParent() && !bParentCounted )
{
- tSwNumberTreeChildren::iterator aParentChildIt =
+ tSwNumberTreeChildren::const_iterator aParentChildIt =
GetParent()->GetIterator( this );
while ( aParentChildIt != GetParent()->mChildren.begin() )
{
@@ -280,7 +280,7 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons
void SwNumberTreeNode::ValidateContinuous(const SwNumberTreeNode * pNode) const
{
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
SwNumberTree::tSwNumTreeNumber nTmpNumber = 0;
@@ -684,7 +684,7 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
return;
}
- tSwNumberTreeChildren::iterator aRemoveIt = GetIterator(pChild);
+ tSwNumberTreeChildren::const_iterator aRemoveIt = GetIterator(pChild);
if (aRemoveIt != mChildren.end())
{
@@ -692,7 +692,7 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
pRemove->mpParent = NULL;
- tSwNumberTreeChildren::iterator aItPred = mChildren.end();
+ tSwNumberTreeChildren::const_iterator aItPred = mChildren.end();
if (aRemoveIt == mChildren.begin())
{
@@ -876,7 +876,7 @@ bool SwNumberTreeNode::HasPhantomCountedParent() const
bool SwNumberTreeNode::IsFirst(const SwNumberTreeNode * pNode) const
{
- tSwNumberTreeChildren::iterator aIt = mChildren.begin();
+ tSwNumberTreeChildren::const_iterator aIt = mChildren.begin();
if ((*aIt)->IsPhantom())
aIt++;
@@ -1050,10 +1050,10 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
}
#endif // __SW_NUMBER_TREE_SANITY_CHECK
-SwNumberTreeNode::tSwNumberTreeChildren::iterator
+SwNumberTreeNode::tSwNumberTreeChildren::const_iterator
SwNumberTreeNode::GetIterator(const SwNumberTreeNode * pChild) const
{
- tSwNumberTreeChildren::iterator aItResult =
+ tSwNumberTreeChildren::const_iterator aItResult =
mChildren.find(const_cast<SwNumberTreeNode *>(pChild));
ASSERT( aItResult != mChildren.end(),
@@ -1116,7 +1116,7 @@ bool SwNumberTreeNodeLessThan(const SwNumberTreeNode * pA,
SwNumberTreeNode * SwNumberTreeNode::GetLastDescendant() const
{
SwNumberTreeNode * pResult = NULL;
- tSwNumberTreeChildren::reverse_iterator aIt = mChildren.rbegin();
+ tSwNumberTreeChildren::const_reverse_iterator aIt = mChildren.rbegin();
if (aIt != mChildren.rend())
{
@@ -1140,7 +1140,7 @@ SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
if (mpParent)
{
- tSwNumberTreeChildren::iterator aIt =
+ tSwNumberTreeChildren::const_iterator aIt =
mpParent->GetIterator(this);
if ( aIt == mpParent->mChildren.begin() )
@@ -1168,7 +1168,7 @@ SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
}
void SwNumberTreeNode::SetLastValid
- ( SwNumberTreeNode::tSwNumberTreeChildren::iterator aItValid,
+ ( SwNumberTreeNode::tSwNumberTreeChildren::const_iterator aItValid,
bool bValidating ) const
{
ASSERT( (aItValid == mChildren.end() || GetIterator(*aItValid) != mChildren.end()),
@@ -1186,7 +1186,7 @@ void SwNumberTreeNode::SetLastValid
// counted is needed
if ( GetParent() )
{
- tSwNumberTreeChildren::iterator aParentChildIt =
+ tSwNumberTreeChildren::const_iterator aParentChildIt =
GetParent()->GetIterator( this );
++aParentChildIt;
if ( aParentChildIt != GetParent()->mChildren.end() )
@@ -1204,7 +1204,7 @@ void SwNumberTreeNode::SetLastValid
{
if (IsContinuous())
{
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
if (aIt != mChildren.end())
aIt++;
@@ -1227,7 +1227,7 @@ void SwNumberTreeNode::SetLastValid(bool bValidating) const
{
if (mpParent)
{
- tSwNumberTreeChildren::iterator aIt = mpParent->GetIterator(this);
+ tSwNumberTreeChildren::const_iterator aIt = mpParent->GetIterator(this);
mpParent->SetLastValid(aIt, bValidating);
}
@@ -1238,7 +1238,7 @@ void SwNumberTreeNode::InvalidateTree() const
// do not call SetInvalid, would cause loop !!!
mItLastValid = mChildren.end();
- tSwNumberTreeChildren::iterator aIt;
+ tSwNumberTreeChildren::const_iterator aIt;
for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
(*aIt)->InvalidateTree();
@@ -1248,7 +1248,7 @@ void SwNumberTreeNode::Invalidate(SwNumberTreeNode * pChild)
{
if (pChild->IsValid())
{
- tSwNumberTreeChildren::iterator aIt = GetIterator(pChild);
+ tSwNumberTreeChildren::const_iterator aIt = GetIterator(pChild);
if (aIt != mChildren.begin())
aIt--;
@@ -1290,7 +1290,7 @@ void SwNumberTreeNode::NotifyInvalidChildren()
{
if (IsNotifiable())
{
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
if (aIt == mChildren.end())
aIt = mChildren.begin();
@@ -1307,7 +1307,7 @@ void SwNumberTreeNode::NotifyInvalidChildren()
// is also needed.
if ( GetParent() )
{
- tSwNumberTreeChildren::iterator aParentChildIt =
+ tSwNumberTreeChildren::const_iterator aParentChildIt =
GetParent()->GetIterator( this );
++aParentChildIt;
if ( aParentChildIt != GetParent()->mChildren.end() )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index fa36609..83df988 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2274,7 +2274,7 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
break;
const SwLineEntrySet& rEntrySet = (*aIter).second;
- SwLineEntrySetIter aSetIter = rEntrySet.begin();
+ SwLineEntrySetConstIter aSetIter = rEntrySet.begin();
while ( aSetIter != rEntrySet.end() )
{
const SwLineEntry& rEntry = *aSetIter;
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 6515647..696ed77 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1619,7 +1619,7 @@ void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
pTable->GetFrmFmt()->GetDoc()->GetChartControllerHelper().StartOrContinueLocking();
const Set_DataSequenceRef_t &rSet = aDataSequences[ pTable ];
- Set_DataSequenceRef_t::iterator aIt( rSet.begin() );
+ Set_DataSequenceRef_t::const_iterator aIt( rSet.begin() );
while (aIt != rSet.end())
{
// uno::Reference< util::XModifiable > xRef( uno::Reference< chart2::data::XDataSequence >(*aIt), uno::UNO_QUERY );
@@ -1712,8 +1712,8 @@ void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
//! would become invalid.
const Set_DataSequenceRef_t aSet( aDataSequences[ pTable ] );
- Set_DataSequenceRef_t::iterator aIt( aSet.begin() );
- Set_DataSequenceRef_t::iterator aEndIt( aSet.end() );
+ Set_DataSequenceRef_t::const_iterator aIt( aSet.begin() );
+ Set_DataSequenceRef_t::const_iterator aEndIt( aSet.end() );
while (aIt != aEndIt)
{
// uno::Reference< lang::XComponent > xRef( uno::Reference< chart2::data::XDataSequence >(*aIt), uno::UNO_QUERY );
@@ -1792,7 +1792,7 @@ void SwChartDataProvider::AddRowCols(
// iterate over all data-sequences for the table
const Set_DataSequenceRef_t &rSet = aDataSequences[ &rTable ];
- Set_DataSequenceRef_t::iterator aIt( rSet.begin() );
+ Set_DataSequenceRef_t::const_iterator aIt( rSet.begin() );
while (aIt != rSet.end())
{
// uno::Reference< chart2::data::XTextualDataSequence > xRef( uno::Reference< chart2::data::XDataSequence >(*aIt), uno::UNO_QUERY );
commit 604502e2a4b53f35aedbf0205598a9b691c0d532
Author: Andre Fischer <af at apache.org>
Date: Mon May 27 11:18:04 2013 +0000
122332: Don't change sidebar context when switching to other application window.
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index d697b79..d8ccda0 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -43,6 +43,7 @@
#include <svx/fontworkbar.hxx>
#include <svx/sidebar/SelectionChangeHandler.hxx>
#include <svx/sidebar/SelectionAnalyzer.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
#include "drawsh.hxx"
#include "drawview.hxx"
@@ -69,7 +70,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) :
SfxShell(pData->GetViewShell()),
pViewData( pData ),
mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
- ::boost::bind(&ScDrawShell::GetContextForSelection, this),
+ ::boost::bind(&ScDrawShell::GetSidebarContextName, this),
GetFrame()->GetFrame().GetController(),
sfx2::sidebar::EnumContext::Context_Cell))
{
@@ -408,8 +409,25 @@ void ScDrawShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet )
}
}
-sfx2::sidebar::EnumContext::Context ScDrawShell::GetContextForSelection (void)
+
+
+
+void ScDrawShell::Activate (const sal_Bool bMDI)
+{
+ (void)bMDI;
+
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ GetFrame()->GetFrame().GetController(),
+ ::sfx2::sidebar::EnumContext::GetContextEnum(
+ GetSidebarContextName()));
+}
+
+
+
+
+::rtl::OUString ScDrawShell::GetSidebarContextName (void)
{
- return ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SC(
- GetDrawView()->GetMarkedObjectList());
+ return sfx2::sidebar::EnumContext::GetContextName(
+ ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SC(
+ GetDrawView()->GetMarkedObjectList()));
}
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index f9c5c91..5bc2279 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -27,7 +27,6 @@
#include <sfx2/shell.hxx>
#include "shellids.hxx"
#include <sfx2/module.hxx>
-#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/svdmark.hxx>
#include <tools/link.hxx>
#include <rtl/ref.hxx>
@@ -51,6 +50,7 @@ class ScDrawShell : public SfxShell
#endif
protected:
+ virtual void Activate(sal_Bool bMDI);
ScViewData* GetViewData() { return pViewData; }
public:
@@ -89,7 +89,7 @@ public:
sal_Bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark);
void GetDrawAttrStateForIFBX( SfxItemSet& rSet );
- ::sfx2::sidebar::EnumContext::Context GetContextForSelection (void);
+ ::rtl::OUString GetSidebarContextName (void);
};
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 7dc873b..da735cf 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -28,7 +28,6 @@
#include "tools/AsynchronousCall.hxx"
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
-#include <sfx2/sidebar/EnumContext.hxx>
#include "TabControl.hxx"
#include "pres.hxx"
#include <svx/sidebar/SelectionChangeHandler.hxx>
@@ -371,6 +370,8 @@ public:
*/
virtual bool RelocateToParentWindow (::Window* pParentWindow);
+ ::rtl::OUString GetSidebarContextName (void) const;
+
protected:
DrawView* mpDrawView;
SdPage* mpActualPage;
@@ -495,8 +496,6 @@ private:
const sal_uInt16 nSnapLineIndex,
const Point& rMouseLocation);
- ::sfx2::sidebar::EnumContext::Context GetContextForSelection (void) const;
-
using ViewShell::Notify;
::std::auto_ptr< AnnotationManager > mpAnnotationManager;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index cec62e8..0bed381 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -56,6 +56,7 @@
#include "SdUnoSlideView.hxx"
#include "ViewShellManager.hxx"
#include "Window.hxx"
+#include "drawview.hxx"
#include <sfx2/app.hxx>
#include <sfx2/msg.hxx>
#include <sfx2/objface.hxx>
@@ -67,6 +68,7 @@
#include <svx/svxids.hrc>
#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
+#include <svx/sidebar/SelectionAnalyzer.hxx>
#include <com/sun/star/drawing/framework/XControllerManager.hpp>
#include <com/sun/star/drawing/framework/ResourceId.hpp>
#include <cppuhelper/bootstrap.hxx>
@@ -563,23 +565,20 @@ void SlideSorterViewShell::Activate (sal_Bool bIsMDIActivate)
switch (eMainViewShellType)
{
case ViewShell::ST_IMPRESS:
+ case ViewShell::ST_SLIDE_SORTER:
+ case ViewShell::ST_NOTES:
eContext = EnumContext::Context_DrawPage;
if (pMainViewShell->ISA(DrawViewShell))
{
- DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(pMainViewShell.get());
- if (pDrawViewShell && (pDrawViewShell->GetEditMode()== EM_MASTERPAGE))
- eContext = EnumContext::Context_MasterPage;
+ DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get());
+ if (pDrawViewShell != NULL)
+ eContext = EnumContext::GetContextEnum(pDrawViewShell->GetSidebarContextName());
}
break;
- case ViewShell::ST_SLIDE_SORTER:
eContext = EnumContext::Context_SlidesorterPage;
break;
- case ViewShell::ST_NOTES:
- eContext = EnumContext::Context_NotesPage;
- break;
-
default:
break;
}
@@ -593,9 +592,6 @@ void SlideSorterViewShell::Activate (sal_Bool bIsMDIActivate)
void SlideSorterViewShell::Deactivate (sal_Bool bIsMDIActivate)
{
- ContextChangeEventMultiplexer::NotifyContextChange(
- &GetViewShellBase(),
- EnumContext::Context_Default);
}
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 4bc9851..56343c5 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -148,7 +148,7 @@ void DrawViewShell::UIDeactivated( SfxInPlaceClient* pCli )
void DrawViewShell::Deactivate(sal_Bool bIsMDIActivate)
{
- ViewShell::Deactivate(bIsMDIActivate);
+ // Do not forward to ViewShell::Deactivate() to prevent a context change.
}
namespace
@@ -517,13 +517,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
Invalidate( SID_NOTES_MASTERPAGE );
Invalidate( SID_HANDOUT_MASTERPAGE );
- if (meEditMode == EM_PAGE)
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawPage));
- else if (mePageKind == PK_HANDOUT)
-
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_HandoutPage));
- else
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_MasterPage));
+ SetContextName(GetSidebarContextName());
}
}
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 8cb2297..71c44b3 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -143,7 +143,7 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
, maTabControl(this, pParentWindow)
, mbIsInSwitchPage(false),
mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
- ::boost::bind(&DrawViewShell::GetContextForSelection, this),
+ ::boost::bind(&DrawViewShell::GetSidebarContextName, this),
uno::Reference<frame::XController>(&rViewShellBase.GetDrawController()),
sfx2::sidebar::EnumContext::Context_Default))
@@ -156,12 +156,7 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
mpSelectionChangeHandler->Connect();
- if (mpFrameView->GetViewShEditMode(mePageKind) == EM_PAGE)
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawPage));
- else if (mePageKind == PK_HANDOUT)
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_HandoutPage));
- else
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_MasterPage));
+ SetContextName(GetSidebarContextName());
}
/*************************************************************************
@@ -875,13 +870,28 @@ void DrawViewShell::GetAnnotationState (SfxItemSet& rItemSet )
-EnumContext::Context DrawViewShell::GetContextForSelection (void) const
+::rtl::OUString DrawViewShell::GetSidebarContextName (void) const
{
- return ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SD(
- mpDrawView->GetMarkedObjectList(),
- meEditMode == EM_MASTERPAGE,
- mePageKind == PK_HANDOUT,
- mePageKind == PK_NOTES);
+ ::svx::sidebar::SelectionAnalyzer::ViewType eViewType (::svx::sidebar::SelectionAnalyzer::VT_Standard);
+ switch (mePageKind)
+ {
+ case PK_HANDOUT:
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Handout;
+ break;
+ case PK_NOTES:
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Notes;
+ break;
+ case PK_STANDARD:
+ if (meEditMode == EM_MASTERPAGE)
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Master;
+ else
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Standard;
+ break;
+ }
+ return EnumContext::GetContextName(
+ ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SD(
+ mpDrawView->GetMarkedObjectList(),
+ eViewType));
}
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 37ac166..bf901ca 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -398,6 +398,8 @@ void OutlineViewShell::Activate( sal_Bool bIsMDIActivate )
}
ViewShell::Activate( bIsMDIActivate );
+ SfxShell::BroadcastContextForActivation(true);
+
pOlView->SetLinks();
pOlView->ConnectToApplication();
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index bc497936..80f8290 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -329,7 +329,7 @@ void ViewShell::Exit (void)
void ViewShell::Activate(sal_Bool bIsMDIActivate)
{
- SfxShell::Activate(bIsMDIActivate);
+ // Do not forward to SfxShell::Activate()
// Laut MI darf keiner GrabFocus rufen, der nicht genau weiss von
// welchem Window der Focus gegrabt wird. Da Activate() vom SFX teilweise
diff --git a/sfx2/inc/sfx2/shell.hxx b/sfx2/inc/sfx2/shell.hxx
index f1b06fd..a358020 100644
--- a/sfx2/inc/sfx2/shell.hxx
+++ b/sfx2/inc/sfx2/shell.hxx
@@ -254,7 +254,20 @@ public:
virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
- void SetContextName (const ::rtl::OUString& rsContextName);
+ /** Set the name of the sidebar context that is broadcast on calls
+ to Activation().
+ */
+ void SetContextName (const ::rtl::OUString& rsContextName);
+
+ /** Broadcast a sidebar context change.
+ This method is typically called from Activate() or
+ Deactivate().
+ @param bIsActivated
+ When <TRUE/> then broadcast the context name that was
+ defined with an earlier call to SetContextName().
+ When <FALSE/> then broadcast the 'default' context.
+ */
+ void BroadcastContextForActivation (const bool bIsActivated);
#ifndef _SFXSH_HXX
SAL_DLLPRIVATE bool CanExecuteSlot_Impl( const SfxSlot &rSlot );
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 55f26c1..b71bc46 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -761,17 +761,12 @@ void SfxShell::Activate
wird, um den Subclasses die Gelegenheit zu geben, auf das Aktivieren
zu reagieren.
- Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
-
-
[Querverweise]
StarView SystemWindow::Activate(sal_Bool)
*/
{
- SfxViewFrame* pViewFrame = GetFrame();
- if (pViewFrame != NULL)
- pImp->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
+ BroadcastContextForActivation(true);
}
//--------------------------------------------------------------------
@@ -797,19 +792,15 @@ void SfxShell::Deactivate
wird, um den Subclasses die Gelegenheit zu geben, auf das Deaktivieren
zu reagieren.
- Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
-
-
[Querverweise]
StarView SystemWindow::Dectivate(sal_Bool)
*/
{
- SfxViewFrame* pViewFrame = GetFrame();
- if (pViewFrame != NULL)
- pImp->maContextChangeBroadcaster.Deactivate(pViewFrame->GetFrame().GetFrameInterface());
+ BroadcastContextForActivation(false);
}
+
void SfxShell::ParentActivate
(
)
@@ -1298,3 +1289,12 @@ void SfxShell::SetViewShell_Impl( SfxViewShell* pView )
+void SfxShell::BroadcastContextForActivation (const bool bIsActivated)
+{
+ SfxViewFrame* pViewFrame = GetFrame();
+ if (pViewFrame != NULL)
+ if (bIsActivated)
+ pImp->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
+ else
+ pImp->maContextChangeBroadcaster.Deactivate(pViewFrame->GetFrame().GetFrameInterface());
+}
diff --git a/svx/inc/svx/sidebar/SelectionAnalyzer.hxx b/svx/inc/svx/sidebar/SelectionAnalyzer.hxx
index 0702a0a..72bebcf 100644
--- a/svx/inc/svx/sidebar/SelectionAnalyzer.hxx
+++ b/svx/inc/svx/sidebar/SelectionAnalyzer.hxx
@@ -41,19 +41,25 @@ class SVX_DLLPUBLIC SelectionAnalyzer
public :
static sfx2::sidebar::EnumContext::Context GetContextForSelection_SC (
const SdrMarkList& rMarkList);
+
+ enum ViewType
+ {
+ VT_Standard,
+ VT_Master,
+ VT_Handout,
+ VT_Notes,
+ VT_Outline
+ };
static sfx2::sidebar::EnumContext::Context GetContextForSelection_SD (
const SdrMarkList& rMarkList,
- const bool bIsMasterPage,
- const bool bIsHandoutPage,
- const bool bIsNotesPage);
+ const ViewType eViewType);
private:
static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SC (
const sal_uInt16 nObjectId);
static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SD (
const sal_uInt16 nObjectId,
- const bool bIsHandoutPage,
- const bool bIsNotesPage);
+ const ViewType eViewType);
static sal_uInt32 GetInventorTypeFromMark (
const SdrMarkList& rMarkList);
static sal_uInt16 GetObjectTypeFromMark (
diff --git a/svx/inc/svx/sidebar/SelectionChangeHandler.hxx b/svx/inc/svx/sidebar/SelectionChangeHandler.hxx
index 1815414..962c025 100644
--- a/svx/inc/svx/sidebar/SelectionChangeHandler.hxx
+++ b/svx/inc/svx/sidebar/SelectionChangeHandler.hxx
@@ -57,7 +57,7 @@ class SVX_DLLPUBLIC SelectionChangeHandler
{
public:
SelectionChangeHandler (
- const boost::function<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback,
+ const boost::function<rtl::OUString(void)>& rSelectionChangeCallback,
const cssu::Reference<css::frame::XController>& rxController,
const sfx2::sidebar::EnumContext::Context eDefaultContext);
virtual ~SelectionChangeHandler (void);
@@ -75,7 +75,7 @@ public:
void Disconnect (void);
private:
- const boost::function<sfx2::sidebar::EnumContext::Context(void)> maSelectionChangeCallback;
+ const boost::function<rtl::OUString(void)> maSelectionChangeCallback;
cssu::Reference<css::frame::XController> mxController;
const sfx2::sidebar::EnumContext::Context meDefaultContext;
bool mbIsConnected;
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index 3039fec..86a6c07 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -98,9 +98,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
const SdrMarkList& rMarkList,
- const bool bIsMasterPage,
- const bool bIsHandoutPage,
- const bool bIsNotesPage)
+ const ViewType eViewType)
{
EnumContext::Context eContext = EnumContext::Context_Unknown;
@@ -109,14 +107,24 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
switch (rMarkList.GetMarkCount())
{
case 0:
- if (bIsHandoutPage)
- eContext = EnumContext::Context_HandoutPage;
- else if (bIsNotesPage)
- eContext = EnumContext::Context_NotesPage;
- else if (bIsMasterPage)
- eContext = EnumContext::Context_MasterPage;
- else
- eContext = EnumContext::Context_DrawPage;
+ switch(eViewType)
+ {
+ case VT_Standard:
+ eContext = EnumContext::Context_DrawPage;
+ break;
+ case VT_Master:
+ eContext = EnumContext::Context_MasterPage;
+ break;
+ case VT_Handout:
+ eContext = EnumContext::Context_HandoutPage;
+ break;
+ case VT_Notes:
+ eContext = EnumContext::Context_NotesPage;
+ break;
+ case VT_Outline:
+ eContext = EnumContext::Context_OutlineText;
+ break;
+ }
break;
case 1:
@@ -146,7 +154,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
if (nObjId == 0)
nObjId = OBJ_GRUP;
}
- eContext = GetContextForObjectId_SD(nObjId, bIsHandoutPage, bIsNotesPage);
+ eContext = GetContextForObjectId_SD(nObjId, eViewType);
}
else if (nInv == E3dInventor)
{
@@ -170,7 +178,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
if (nObjId == 0)
eContext = EnumContext::Context_MultiObject;
else
- eContext = GetContextForObjectId_SD(nObjId, bIsHandoutPage, bIsNotesPage);
+ eContext = GetContextForObjectId_SD(nObjId, eViewType);
break;
}
@@ -243,8 +251,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt
EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
const sal_uInt16 nObjectId,
- const bool bIsHandoutPage,
- const bool bIsNotesPage)
+ const ViewType eViewType)
{
switch (nObjectId)
{
@@ -286,12 +293,17 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
return EnumContext::Context_Table;
case OBJ_PAGE:
- if (bIsHandoutPage)
- return EnumContext::Context_HandoutPage;
- else if (bIsNotesPage)
- return EnumContext::Context_NotesPage;
- else
- return EnumContext::Context_Unknown;
+ switch (eViewType)
+ {
+ case VT_Handout:
+ return EnumContext::Context_HandoutPage;
+ case VT_Notes:
+ return EnumContext::Context_NotesPage;
+ case VT_Outline:
+ return EnumContext::Context_OutlineText;
+ default:
+ return EnumContext::Context_Unknown;
+ }
default:
return EnumContext::Context_Unknown;
diff --git a/svx/source/sidebar/SelectionChangeHandler.cxx b/svx/source/sidebar/SelectionChangeHandler.cxx
index fb0ff01..e1cc307 100644
--- a/svx/source/sidebar/SelectionChangeHandler.cxx
+++ b/svx/source/sidebar/SelectionChangeHandler.cxx
@@ -36,7 +36,7 @@ using namespace sfx2::sidebar;
namespace svx { namespace sidebar {
SelectionChangeHandler::SelectionChangeHandler (
- const boost::function<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback,
+ const boost::function<rtl::OUString(void)>& rSelectionChangeCallback,
const Reference<frame::XController>& rxController,
const EnumContext::Context eDefaultContext)
: SelectionChangeHandlerInterfaceBase(m_aMutex),
@@ -62,7 +62,8 @@ void SAL_CALL SelectionChangeHandler::selectionChanged (const lang::EventObject&
{
if (maSelectionChangeCallback)
{
- const EnumContext::Context eContext (maSelectionChangeCallback());
+ const EnumContext::Context eContext (
+ EnumContext::GetContextEnum(maSelectionChangeCallback()));
ContextChangeEventMultiplexer::NotifyContextChange(
mxController,
eContext==EnumContext::Context_Unknown
commit f3dc398e002926792a0c6160691d46eb75cad236
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Mon May 27 05:46:18 2013 +0000
css::frame::XStatusbarController: add missing interface
Added ::com::sun::star::lang::XComponent. IDL documentation taken from
http://wiki.openoffice.org/wiki/Framework/Tutorial/Statusbar_Controller#Status_bar_controller_service
diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx
index 4711111..266dbe1 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -19,26 +19,16 @@
*
*************************************************************/
-
-
#ifndef __FRAMEWORK_UIELEMENT_STATUSBARMANAGER_HXX_
#define __FRAMEWORK_UIELEMENT_STATUSBARMANAGER_HXX_
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <stdtypes.h>
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
#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/XUIControllerFactory.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
@@ -46,9 +36,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -118,7 +105,7 @@ class StatusBarManager : public ::com::sun::star::frame::XFrameActionListener
void MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL ::com::sun::star::frame::XStatusbarController::*_pMethod )(const ::com::sun::star::awt::MouseEvent&));
protected:
- typedef std::map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > StatusBarControllerMap;
+ typedef std::map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusbarController > > StatusBarControllerMap;
sal_Bool m_bDisposed : 1,
m_bFrameActionRegistered : 1,
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 060c100..3f4e6bb 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -43,15 +43,13 @@
#include <helper/mischelper.hxx>
#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>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Command.hpp>
-#include <com/sun/star/ui/XStatusbarItem.hdl>
+#include <com/sun/star/ui/XStatusbarItem.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <toolkit/helper/vclunohelper.hxx>
@@ -97,9 +95,8 @@ struct lcl_UpdateController : public std::unary_function< typename MAP::value_ty
{
try
{
- uno::Reference< util::XUpdatable > xUpdatable( rElement.second, uno::UNO_QUERY );
- if ( xUpdatable.is() )
- xUpdatable->update();
+ if ( rElement.second.is() )
+ rElement.second->update();
}
catch ( uno::Exception& )
{
@@ -114,9 +111,8 @@ struct lcl_RemoveController : public std::unary_function< typename MAP::value_ty
{
try
{
- uno::Reference< lang::XComponent > xComponent( rElement.second, uno::UNO_QUERY );
- if ( xComponent.is() )
- xComponent->dispose();
+ if ( rElement.second.is() )
+ rElement.second->dispose();
}
catch ( uno::Exception& )
{
@@ -382,51 +378,54 @@ void StatusBarManager::CreateControllers()
if ( nId == 0 )
continue;
- rtl::OUString aCommandURL( m_pStatusBar->GetItemCommand( nId ));
- sal_Bool bInit( sal_True );
- uno::Reference< frame::XStatusListener > xController;
+ rtl::OUString aCommandURL( m_pStatusBar->GetItemCommand( nId ));
+ sal_Bool bInit( sal_True );
+ uno::Reference< frame::XStatusbarController > xController;
AddonStatusbarItemData *pItemData = static_cast< AddonStatusbarItemData *>( m_pStatusBar->GetItemData( nId ) );
uno::Reference< ui::XStatusbarItem > xStatusbarItem(
static_cast< cppu::OWeakObject *>( new StatusbarItem( m_pStatusBar, pItemData, nId, aCommandURL ) ),
uno::UNO_QUERY );
- svt::StatusbarController* pController( 0 );
+ beans::PropertyValue aPropValue;
+ std::vector< uno::Any > aPropVector;
- // 1º) UNO Statusbar controllers, registered in Controllers.xcu
- if ( m_xStatusbarControllerFactory.is() &&
- m_xStatusbarControllerFactory->hasController( aCommandURL, m_aModuleIdentifier ))
- {
- beans::PropertyValue aPropValue;
- std::vector< uno::Any > aPropVector;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CommandURL" ));
+ aPropValue.Value <<= aCommandURL;
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
- 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( "ModuleIdentifier" ));
+ aPropValue.Value <<= 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 ) );
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
+ aPropValue.Value <<= 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 ) );
+ // TODO remove this
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
+ aPropValue.Value <<= 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 ) );
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
+ aPropValue.Value <<= 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 ) );
+ // TODO still needing with the css::ui::XStatusbarItem?
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" ));
+ aPropValue.Value <<= nId;
+ aPropVector.push_back( uno::makeAny( aPropValue ) );
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusbarItem" ));
- aPropValue.Value <<= xStatusbarItem;
- 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 >(
+ uno::Sequence< uno::Any > aArgs( comphelper::containerToSequence( aPropVector ) );
+
+ // 1º) UNO Statusbar controllers, registered in Controllers.xcu
+ if ( m_xStatusbarControllerFactory.is() &&
+ m_xStatusbarControllerFactory->hasController( aCommandURL, m_aModuleIdentifier ))
+ {
+ xController = uno::Reference< frame::XStatusbarController >(
m_xStatusbarControllerFactory->createInstanceWithArgumentsAndContext(
aCommandURL, aArgs, xComponentContext ),
uno::UNO_QUERY );
@@ -435,6 +434,8 @@ void StatusBarManager::CreateControllers()
if ( !xController.is() )
{
+ svt::StatusbarController* pController( 0 );
+
// 2º) Old SFX2 Statusbar controllers
pController = CreateStatusBarController( m_xFrame, m_pStatusBar, nId, aCommandURL );
if ( !pController )
@@ -455,40 +456,15 @@ void StatusBarManager::CreateControllers()
}
if ( pController )
- xController = uno::Reference< frame::XStatusListener >(
+ xController = uno::Reference< frame::XStatusbarController >(
static_cast< ::cppu::OWeakObject *>( pController ),
uno::UNO_QUERY );
}
m_aControllerMap[nId] = xController;
- uno::Reference< lang::XInitialization > xInit( xController, uno::UNO_QUERY );
-
- if ( xInit.is() )
+ if ( bInit )
{
- if ( bInit )
- {
- beans::PropertyValue aPropValue;
- uno::Sequence< uno::Any > aArgs( 6 );
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- aPropValue.Value = uno::makeAny( m_xFrame );
- aArgs[0] = uno::makeAny( aPropValue );
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CommandURL" ));
- aPropValue.Value = uno::makeAny( aCommandURL );
- aArgs[1] = uno::makeAny( aPropValue );
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
- aPropValue.Value = uno::makeAny( m_xServiceManager );
- aArgs[2] = uno::makeAny( aPropValue );
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
- aPropValue.Value = uno::makeAny( xStatusbarWindow );
- aArgs[3] = uno::makeAny( aPropValue );
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" ));
- aPropValue.Value = uno::makeAny( nId );
- aArgs[4] = uno::makeAny( aPropValue );
- aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusbarItem" ));
- aPropValue.Value <<= xStatusbarItem;
- aArgs[5] = uno::makeAny( aPropValue );
- xInit->initialize( aArgs );
- }
+ xController->initialize( aArgs );
}
}
@@ -673,7 +649,7 @@ void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt )
StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
if (( nId > 0 ) && ( it != m_aControllerMap.end() ))
{
- uno::Reference< frame::XStatusbarController > xController( it->second, uno::UNO_QUERY );
+ uno::Reference< frame::XStatusbarController > xController( it->second );
if ( xController.is() && rUDEvt.GetDevice() )
{
uno::Reference< awt::XGraphics > xGraphics =
@@ -703,7 +679,7 @@ void StatusBarManager::Command( const CommandEvent& rEvt )
StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
if (( nId > 0 ) && ( it != m_aControllerMap.end() ))
{
- uno::Reference< frame::XStatusbarController > xController( it->second, uno::UNO_QUERY );
+ uno::Reference< frame::XStatusbarController > xController( it->second );
if ( xController.is() )
{
awt::Point aPos;
@@ -732,7 +708,7 @@ void StatusBarManager::MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list