summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconnectivity/inc/connectivity/DriversConfig.hxx179
-rw-r--r--connectivity/inc/connectivity/dbmetadata.hxx6
-rwxr-xr-xconnectivity/source/commontools/DriversConfig.cxx60
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx16
-rw-r--r--connectivity/source/drivers/adabas/makefile.mk2
-rwxr-xr-xconnectivity/source/drivers/jdbc/jdbc.xcu2
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx16
-rw-r--r--connectivity/source/drivers/odbcbase/OConnection.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/OPreparedStatement.cxx16
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx6
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx14
-rw-r--r--connectivity/source/drivers/odbcbase/OStatement.cxx8
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx72
-rw-r--r--connectivity/source/inc/odbc/OFunctions.hxx44
-rw-r--r--connectivity/source/inc/odbc/OResultSet.hxx2
-rw-r--r--connectivity/source/inc/odbc/OResultSetMetaData.hxx4
-rw-r--r--connectivity/source/inc/odbc/OStatement.hxx2
-rw-r--r--connectivity/source/inc/odbc/OTools.hxx12
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx2
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx44
-rw-r--r--formula/prj/CVS/Entries4
-rw-r--r--formula/prj/CVS/Repository1
-rw-r--r--formula/prj/CVS/Root1
-rw-r--r--formula/prj/CVS/Tag1
-rw-r--r--formula/prj/CVS/Template42
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx14
-rw-r--r--fpicker/source/unx/kde4/KDE4FPEntry.cxx6
-rw-r--r--fpicker/source/unx/kde4/KDE4FilePicker.cxx114
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx41
-rw-r--r--framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx92
-rw-r--r--framework/inc/uiconfiguration/uiconfigurationmanager.hxx81
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx19
-rw-r--r--framework/source/jobs/job.cxx2
-rw-r--r--framework/source/loadenv/loadenv.cxx28
-rw-r--r--framework/source/services/backingwindow.cxx7
-rw-r--r--framework/source/services/backingwindow.hxx1
-rw-r--r--framework/source/uiconfiguration/makefile.mk1
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx1428
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx1157
-rwxr-xr-xframework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx8
-rw-r--r--framework/source/uifactory/windowcontentfactorymanager.cxx7
-rw-r--r--framework/util/makefile.mk1
-rw-r--r--idl/inc/command.hxx1
-rw-r--r--idl/inc/database.hxx7
-rw-r--r--idl/source/prj/command.cxx10
-rw-r--r--idl/source/prj/database.cxx6
-rw-r--r--idl/source/prj/svidl.cxx8
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu2
-rw-r--r--officecfg/registry/data/org/openoffice/VCL.xcu231
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs22
-rw-r--r--oovbaapi/ooo/vba/constants/makefile.mk2
-rw-r--r--oovbaapi/ooo/vba/makefile.mk3
-rwxr-xr-xreadlicense_oo/util/makefile.pmk3
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx1
-rw-r--r--sfx2/inc/sfx2/passwd.hxx4
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx3
-rw-r--r--sfx2/source/dialog/passwd.cxx28
-rw-r--r--sfx2/source/doc/objstor.cxx3
-rw-r--r--sfx2/source/view/viewimp.hxx10
-rw-r--r--sfx2/source/view/viewsh.cxx53
-rw-r--r--sfx2/util/makefile.mk1
-rw-r--r--shell/inc/systemshell.hxx53
-rw-r--r--shell/prj/build.lst3
-rw-r--r--shell/prj/d.lst4
-rw-r--r--shell/source/aqua/sysshell/makefile.mk61
-rw-r--r--shell/source/aqua/sysshell/systemshell.cxx133
-rw-r--r--shell/source/backends/kdebe/makefile.mk4
-rw-r--r--shell/source/os2/sysshell/makefile.mk47
-rw-r--r--shell/source/os2/sysshell/systemshell.cxx68
-rw-r--r--shell/source/unix/sysshell/makefile.mk4
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx1
-rw-r--r--shell/source/unix/sysshell/systemshell.cxx151
-rw-r--r--shell/source/win32/sysshell/makefile.mk50
-rw-r--r--shell/source/win32/sysshell/systemshell.cxx68
-rw-r--r--svx/inc/galobj.hxx6
-rw-r--r--svx/inc/svx/msdffimp.hxx1
-rw-r--r--svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx48
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx3
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx5
-rw-r--r--svx/inc/svx/svxids.hrc4
-rw-r--r--svx/prj/build.lst2
-rw-r--r--svx/sdi/svx.sdi2
-rw-r--r--svx/source/cui/optimprove2.cxx8
-rw-r--r--svx/source/fmcomp/gridctrl.cxx15
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx2
-rw-r--r--svx/source/msfilter/msdffimp.cxx70
-rw-r--r--svx/source/outliner/outliner.cxx27
-rw-r--r--svx/source/outliner/outlvw.cxx8
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx1
-rw-r--r--svx/source/sdr/contact/viewcontactofunocontrol.cxx40
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx161
-rw-r--r--svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx1
-rw-r--r--svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx5
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx6
-rw-r--r--svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx4
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx1
-rw-r--r--svx/source/sdr/primitive2d/sdrole2primitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx12
-rw-r--r--svx/source/svdraw/svdfppt.cxx12
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx41
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx2
-rw-r--r--svx/source/unodraw/unomod.cxx5
-rw-r--r--svx/source/unoedit/unofield.cxx30
-rw-r--r--svx/source/xml/xmltxtexp.cxx6
-rw-r--r--uui/source/ids.src4
-rw-r--r--xmlhelp/source/com/sun/star/help/makefile.mk7
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx5
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx1
-rw-r--r--xmloff/source/core/xmlimp.cxx20
-rw-r--r--xmloff/source/text/txtflde.cxx28
115 files changed, 3830 insertions, 1387 deletions
diff --git a/connectivity/inc/connectivity/DriversConfig.hxx b/connectivity/inc/connectivity/DriversConfig.hxx
index bd86e9ce4397..da68443bb68e 100755
--- a/connectivity/inc/connectivity/DriversConfig.hxx
+++ b/connectivity/inc/connectivity/DriversConfig.hxx
@@ -1,92 +1,95 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: makefile,v $
- *
- * $Revision: 1.1 $
- *
- * last change: $Author: st $ $Date: 2000/11/22 02:32:00 $
- *
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- ************************************************************************/
-#ifndef CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED
-#define CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED
-
-#include <comphelper/stl_types.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/uno/Sequence.h>
-#include "connectivity/dbtoolsdllapi.hxx"
-#include <salhelper/singletonref.hxx>
-#include <comphelper/namedvaluecollection.hxx>
-#include <unotools/confignode.hxx>
-
-namespace connectivity
-{
- typedef struct
- {
- ::comphelper::NamedValueCollection aProperties;
- ::comphelper::NamedValueCollection aFeatures;
- ::comphelper::NamedValueCollection aMetaData;
- ::rtl::OUString sDriverFactory;
- ::rtl::OUString sDriverTypeDisplayName;
- } TInstalledDriver;
- DECLARE_STL_USTRINGACCESS_MAP( TInstalledDriver, TInstalledDrivers);
-
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: makefile,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: st $ $Date: 2000/11/22 02:32:00 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+#ifndef CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED
+#define CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED
+
+#include <comphelper/stl_types.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include "connectivity/dbtoolsdllapi.hxx"
+#include <salhelper/singletonref.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <unotools/confignode.hxx>
+
+namespace connectivity
+{
+ typedef struct
+ {
+ ::comphelper::NamedValueCollection aProperties;
+ ::comphelper::NamedValueCollection aFeatures;
+ ::comphelper::NamedValueCollection aMetaData;
+ ::rtl::OUString sDriverFactory;
+ ::rtl::OUString sDriverTypeDisplayName;
+ } TInstalledDriver;
+ DECLARE_STL_USTRINGACCESS_MAP( TInstalledDriver, TInstalledDrivers);
+
class DriversConfigImpl
{
- ::utl::OConfigurationTreeRoot m_aInstalled;
+ mutable ::utl::OConfigurationTreeRoot m_aInstalled;
+ mutable TInstalledDrivers m_aDrivers;
+ void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) const;
public:
DriversConfigImpl();
- void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,TInstalledDrivers& _rDrivers);
- };
- //
- // Allows to access all driver which are located in the configuration
- //
- class OOO_DLLPUBLIC_DBTOOLS DriversConfig
- {
- typedef salhelper::SingletonRef<DriversConfigImpl> OSharedConfigNode;
-
- const ::comphelper::NamedValueCollection& impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const;
- public:
- DriversConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
- ~DriversConfig();
-
- DriversConfig( const DriversConfig& );
- DriversConfig& operator=( const DriversConfig& );
-
- ::rtl::OUString getDriverFactoryName(const ::rtl::OUString& _sUrl) const;
- ::rtl::OUString getDriverTypeDisplayName(const ::rtl::OUString& _sUrl) const;
- const ::comphelper::NamedValueCollection& getProperties(const ::rtl::OUString& _sURL) const;
- const ::comphelper::NamedValueCollection& getFeatures(const ::rtl::OUString& _sURL) const;
- const ::comphelper::NamedValueCollection& getMetaData(const ::rtl::OUString& _sURL) const;
- ::com::sun::star::uno::Sequence< ::rtl::OUString > getURLs() const;
- private:
- TInstalledDrivers m_aDrivers;
- OSharedConfigNode m_aNode;
- };
-}
-#endif // CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED
+
+ const TInstalledDrivers& getInstalledDrivers(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) const { Load(_rxORB); return m_aDrivers; }
+ };
+ //
+ // Allows to access all driver which are located in the configuration
+ //
+ class OOO_DLLPUBLIC_DBTOOLS DriversConfig
+ {
+ typedef salhelper::SingletonRef<DriversConfigImpl> OSharedConfigNode;
+
+ const ::comphelper::NamedValueCollection& impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const;
+ public:
+ DriversConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ~DriversConfig();
+
+ DriversConfig( const DriversConfig& );
+ DriversConfig& operator=( const DriversConfig& );
+
+ ::rtl::OUString getDriverFactoryName(const ::rtl::OUString& _sUrl) const;
+ ::rtl::OUString getDriverTypeDisplayName(const ::rtl::OUString& _sUrl) const;
+ const ::comphelper::NamedValueCollection& getProperties(const ::rtl::OUString& _sURL) const;
+ const ::comphelper::NamedValueCollection& getFeatures(const ::rtl::OUString& _sURL) const;
+ const ::comphelper::NamedValueCollection& getMetaData(const ::rtl::OUString& _sURL) const;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > getURLs() const;
+ private:
+ OSharedConfigNode m_aNode;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ };
+}
+#endif // CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED
diff --git a/connectivity/inc/connectivity/dbmetadata.hxx b/connectivity/inc/connectivity/dbmetadata.hxx
index 32662c5c157a..1ee1718247ae 100644
--- a/connectivity/inc/connectivity/dbmetadata.hxx
+++ b/connectivity/inc/connectivity/dbmetadata.hxx
@@ -177,6 +177,12 @@ namespace dbtools
/** determines whether in the application UI, empty table folders (aka catalogs/schemas) should be displayed
*/
bool displayEmptyTableFolders() const;
+
+ /** determines that threads are supported.
+ *
+ * \return <TRUE/> when threads are supported, otherwise <FALSE/>
+ */
+ bool supportsThreads() const;
};
//........................................................................
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index a72816d6427b..30c822b6f169 100755
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -112,32 +112,35 @@ DriversConfigImpl::DriversConfigImpl()
{
}
// -----------------------------------------------------------------------------
-void DriversConfigImpl::Load(const uno::Reference< lang::XMultiServiceFactory >& _rxORB,TInstalledDrivers& _rDrivers)
+void DriversConfigImpl::Load(const uno::Reference< lang::XMultiServiceFactory >& _rxORB) const
{
- if ( !m_aInstalled.isValid() )
+ if ( m_aDrivers.empty() )
{
- static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess.Drivers/Installed")); ///Installed
- m_aInstalled = ::utl::OConfigurationTreeRoot::createWithServiceFactory(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
- }
-
- if ( m_aInstalled.isValid() )
- {
- const uno::Sequence< ::rtl::OUString > aURLPatterns = m_aInstalled.getNodeNames();
- const ::rtl::OUString* pPatternIter = aURLPatterns.getConstArray();
- const ::rtl::OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength();
- for (;pPatternIter != pPatternEnd ; ++pPatternIter)
+ if ( !m_aInstalled.isValid() )
{
- TInstalledDriver aInstalledDriver;
- lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver);
- if ( aInstalledDriver.sDriverFactory.getLength() )
- _rDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver));
+ static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess.Drivers/Installed")); ///Installed
+ m_aInstalled = ::utl::OConfigurationTreeRoot::createWithServiceFactory(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
}
+
+ if ( m_aInstalled.isValid() )
+ {
+ const uno::Sequence< ::rtl::OUString > aURLPatterns = m_aInstalled.getNodeNames();
+ const ::rtl::OUString* pPatternIter = aURLPatterns.getConstArray();
+ const ::rtl::OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength();
+ for (;pPatternIter != pPatternEnd ; ++pPatternIter)
+ {
+ TInstalledDriver aInstalledDriver;
+ lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver);
+ if ( aInstalledDriver.sDriverFactory.getLength() )
+ m_aDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver));
+ }
+ } // if ( m_aInstalled.isValid() )
}
}
// -----------------------------------------------------------------------------
DriversConfig::DriversConfig(const uno::Reference< lang::XMultiServiceFactory >& _rxORB)
+:m_xORB(_rxORB)
{
- m_aNode->Load(_rxORB,m_aDrivers);
}
// -----------------------------------------------------------------------------
@@ -156,7 +159,6 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs )
{
if ( this != &_rhs )
{
- m_aDrivers = _rhs.m_aDrivers;
m_aNode = _rhs.m_aNode;
}
return *this;
@@ -165,10 +167,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs )
// -----------------------------------------------------------------------------
::rtl::OUString DriversConfig::getDriverFactoryName(const ::rtl::OUString& _sURL) const
{
+ const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB);
::rtl::OUString sRet;
::rtl::OUString sOldPattern;
- TInstalledDrivers::const_iterator aIter = m_aDrivers.begin();
- TInstalledDrivers::const_iterator aEnd = m_aDrivers.end();
+ TInstalledDrivers::const_iterator aIter = rDrivers.begin();
+ TInstalledDrivers::const_iterator aEnd = rDrivers.end();
for(;aIter != aEnd;++aIter)
{
WildCard aWildCard(aIter->first);
@@ -184,10 +187,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs )
// -----------------------------------------------------------------------------
::rtl::OUString DriversConfig::getDriverTypeDisplayName(const ::rtl::OUString& _sURL) const
{
+ const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB);
::rtl::OUString sRet;
::rtl::OUString sOldPattern;
- TInstalledDrivers::const_iterator aIter = m_aDrivers.begin();
- TInstalledDrivers::const_iterator aEnd = m_aDrivers.end();
+ TInstalledDrivers::const_iterator aIter = rDrivers.begin();
+ TInstalledDrivers::const_iterator aEnd = rDrivers.end();
for(;aIter != aEnd;++aIter)
{
WildCard aWildCard(aIter->first);
@@ -218,10 +222,11 @@ const ::comphelper::NamedValueCollection& DriversConfig::getMetaData(const ::rtl
// -----------------------------------------------------------------------------
const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const
{
+ const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB);
const ::comphelper::NamedValueCollection* pRet = NULL;
::rtl::OUString sOldPattern;
- TInstalledDrivers::const_iterator aIter = m_aDrivers.begin();
- TInstalledDrivers::const_iterator aEnd = m_aDrivers.end();
+ TInstalledDrivers::const_iterator aIter = rDrivers.begin();
+ TInstalledDrivers::const_iterator aEnd = rDrivers.end();
for(;aIter != aEnd;++aIter)
{
WildCard aWildCard(aIter->first);
@@ -252,10 +257,11 @@ const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::O
// -----------------------------------------------------------------------------
uno::Sequence< ::rtl::OUString > DriversConfig::getURLs() const
{
- uno::Sequence< ::rtl::OUString > aRet(m_aDrivers.size());
+ const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB);
+ uno::Sequence< ::rtl::OUString > aRet(rDrivers.size());
::rtl::OUString* pIter = aRet.getArray();
- TInstalledDrivers::const_iterator aIter = m_aDrivers.begin();
- TInstalledDrivers::const_iterator aEnd = m_aDrivers.end();
+ TInstalledDrivers::const_iterator aIter = rDrivers.begin();
+ TInstalledDrivers::const_iterator aEnd = rDrivers.end();
for(;aIter != aEnd;++aIter,++pIter)
{
*pIter = aIter->first;
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index 70220b1cd563..c5b65a9d113b 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -407,6 +407,22 @@ namespace dbtools
#endif
return doDisplay;
}
+ //--------------------------------------------------------------------
+ bool DatabaseMetaData::supportsThreads() const
+ {
+ bool bSupported( true );
+ try
+ {
+ Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW );
+ ::rtl::OUString sConnectionURL( xMeta->getURL() );
+ bSupported = sConnectionURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc" ) ) != 0;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return bSupported;
+ }
//........................................................................
} // namespace dbtools
diff --git a/connectivity/source/drivers/adabas/makefile.mk b/connectivity/source/drivers/adabas/makefile.mk
index 09b2936e1c7d..5b3483ed57bb 100644
--- a/connectivity/source/drivers/adabas/makefile.mk
+++ b/connectivity/source/drivers/adabas/makefile.mk
@@ -107,4 +107,4 @@ DEF1EXPORTFILE= exports.dxp
# --- Targets ----------------------------------
-.INCLUDE : $(PRJ)$/target.pmk \ No newline at end of file
+.INCLUDE : $(PRJ)$/target.pmk
diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu
index 73fe2e9adc55..ae1bbad227e7 100755
--- a/connectivity/source/drivers/jdbc/jdbc.xcu
+++ b/connectivity/source/drivers/jdbc/jdbc.xcu
@@ -174,7 +174,7 @@
<node oor:name="Properties">
<node oor:name="IgnoreCurrency" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
- <value>false</value>
+ <value>true</value>
</prop>
</node>
<node oor:name="TypeInfoSettings" oor:op="replace">
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx
index bd4201ee3729..2a6f79f5acd7 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx
@@ -53,16 +53,16 @@ void MTypeConverter::ouStringToNsString(::rtl::OUString const &ous, nsString &ns
// -------------------------------------------------------------------------
::rtl::OUString MTypeConverter::nsACStringToOUString( const nsACString& _source )
{
- const char* buffer = _source.BeginReading();
- const char* bufferEnd = _source.EndReading();
- return ::rtl::OUString( buffer, bufferEnd - buffer, RTL_TEXTENCODING_ASCII_US );
+ const char* buffer = _source.BeginReading();
+ const char* bufferEnd = _source.EndReading();
+ return ::rtl::OUString( buffer, static_cast<sal_Int32>(bufferEnd - buffer), RTL_TEXTENCODING_ASCII_US );
}
// -------------------------------------------------------------------------
::rtl::OString MTypeConverter::nsACStringToOString( const nsACString& _source )
{
- const char* buffer = _source.BeginReading();
- const char* bufferEnd = _source.EndReading();
- return ::rtl::OString( buffer, bufferEnd - buffer );
+ const char* buffer = _source.BeginReading();
+ const char* bufferEnd = _source.EndReading();
+ return ::rtl::OString( buffer, static_cast<sal_Int32>(bufferEnd - buffer) );
}
// -------------------------------------------------------------------------
void MTypeConverter::asciiOUStringToNsACString( const ::rtl::OUString& _asciiString, nsACString& _dest )
@@ -73,8 +73,8 @@ void MTypeConverter::asciiOUStringToNsACString( const ::rtl::OUString& _asciiStr
// -------------------------------------------------------------------------
void MTypeConverter::asciiToNsACString( const sal_Char* _asciiString, nsACString& _dest )
{
- _dest.Truncate();
- _dest.AppendASCII( _asciiString );
+ _dest.Truncate();
+ _dest.AppendASCII( _asciiString );
}
// -------------------------------------------------------------------------
void MTypeConverter::nsStringToOUString(nsString const &nss, ::rtl::OUString &ous)
diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx
index 0a86ed7b9f18..8a27940f44b0 100644
--- a/connectivity/source/drivers/odbcbase/OConnection.cxx
+++ b/connectivity/source/drivers/odbcbase/OConnection.cxx
@@ -108,7 +108,7 @@ SQLRETURN OConnection::OpenConnection(const ::rtl::OUString& aConnectStr,sal_Int
SQLRETURN nSQLRETURN = 0;
SDB_ODBC_CHAR szConnStrOut[4096];
SDB_ODBC_CHAR szConnStrIn[2048];
- SWORD cbConnStrOut;
+ SQLSMALLINT cbConnStrOut;
memset(szConnStrOut,'\0',4096);
memset(szConnStrIn,'\0',2048);
::rtl::OString aConStr(::rtl::OUStringToOString(aConnectStr,getTextEncoding()));
diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
index 655006d1f8e4..8d72c3271b82 100644
--- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
@@ -444,11 +444,11 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
checkParameterIndex(parameterIndex);
sal_Int8* lenBuf = getLengthBuf (parameterIndex);
- *(SDWORD*)lenBuf = SQL_NULL_DATA;
+ *(SQLLEN*)lenBuf = SQL_NULL_DATA;
- SQLINTEGER prec = 0;
- SQLUINTEGER nColumnSize = 0;
+ SQLLEN prec = 0;
+ SQLULEN nColumnSize = 0;
if (sqlType == SQL_CHAR || sqlType == SQL_VARCHAR || sqlType == SQL_LONGVARCHAR)
{
prec = 1;
@@ -474,7 +474,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
nDecimalDigits,
NULL,
prec,
- (SDWORD*)lenBuf
+ (SQLLEN*)lenBuf
);
OTools::ThrowException(m_pConnection,nReturn,m_aStatementHandle,SQL_HANDLE_STMT,*this);
}
@@ -865,7 +865,7 @@ void OPreparedStatement::setStream (
// Bind the parameter with SQL_LEN_DATA_AT_EXEC
SQLSMALLINT Ctype = SQL_C_CHAR;
- SDWORD atExec = SQL_LEN_DATA_AT_EXEC (length);
+ SQLLEN atExec = SQL_LEN_DATA_AT_EXEC (length);
memcpy (dataBuf, &ParameterIndex, sizeof(ParameterIndex));
memcpy (lenBuf, &atExec, sizeof (atExec));
@@ -876,14 +876,14 @@ void OPreparedStatement::setStream (
OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!");
N3SQLBindParameter(m_aStatementHandle,
(SQLUSMALLINT)ParameterIndex,
- (SQLSMALLINT)SQL_PARAM_INPUT,
+ (SQLUSMALLINT)SQL_PARAM_INPUT,
Ctype,
(SQLSMALLINT)SQLtype,
- (SQLUINTEGER)length,
+ (SQLULEN)length,
0,
dataBuf,
sizeof(ParameterIndex),
- (SDWORD*)lenBuf);
+ (SQLLEN*)lenBuf);
// Save the input stream
boundParams[ParameterIndex - 1].setInputStream (x, length);
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 1825b94051e7..8c885f0924ad 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -843,8 +843,8 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- SQLSMALLINT nMaxLen = 20;
- SQLINTEGER nRealLen = 0;
+ SQLLEN nMaxLen = 20;
+ SQLLEN nRealLen = 0;
Sequence<sal_Int8> aBookmark(nMaxLen);
SQLRETURN nRet = N3SQLBindCol(m_aStatementHandle,
@@ -925,7 +925,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
sal_Bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) );
if ( bPositionByBookmark )
{
- SQLINTEGER nRealLen = 0;
+ SQLLEN nRealLen = 0;
nRet = N3SQLBindCol(m_aStatementHandle,
0,
SQL_C_VARBOOKMARK,
diff --git a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx
index adf77eca238c..3397c5c515a9 100644
--- a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx
@@ -86,13 +86,13 @@ OResultSetMetaData::~OResultSetMetaData()
return sValue;
}
// -------------------------------------------------------------------------
-SWORD OResultSetMetaData::getNumColAttrib(OConnection* _pConnection
+SQLLEN OResultSetMetaData::getNumColAttrib(OConnection* _pConnection
,SQLHANDLE _aStatementHandle
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface
,sal_Int32 _column
,sal_Int32 _ident) throw(SQLException, RuntimeException)
{
- SWORD nValue=0;
+ SQLLEN nValue=0;
OTools::ThrowException(_pConnection,(*(T3SQLColAttribute)_pConnection->getOdbcFunction(ODBC3SQLColAttribute))(_aStatementHandle,
(SQLUSMALLINT)_column,
(SQLUSMALLINT)_ident,
@@ -117,22 +117,22 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column )
return getNumColAttrib(column,SQL_DESC_DISPLAY_SIZE);
}
// -------------------------------------------------------------------------
-SWORD OResultSetMetaData::getColumnODBCType(OConnection* _pConnection
+SQLSMALLINT OResultSetMetaData::getColumnODBCType(OConnection* _pConnection
,SQLHANDLE _aStatementHandle
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface
,sal_Int32 column)
throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- SWORD nType = 0;
+ SQLSMALLINT nType = 0;
try
{
- nType = getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column,SQL_DESC_CONCISE_TYPE);
+ nType = (SQLSMALLINT)getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column,SQL_DESC_CONCISE_TYPE);
if(nType == SQL_UNKNOWN_TYPE)
- nType = getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column, SQL_DESC_TYPE);
+ nType = (SQLSMALLINT)getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column, SQL_DESC_TYPE);
}
catch(SQLException& ) // in this case we have an odbc 2.0 driver
{
- nType = getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column,SQL_DESC_CONCISE_TYPE );
+ nType = (SQLSMALLINT)getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column,SQL_DESC_CONCISE_TYPE );
}
return nType;
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 3e0fdbd79c3f..79fbef9db50e 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -260,13 +260,13 @@ void OStatement_Base::clearMyResultSet () throw (SQLException)
m_xResultSet = Reference< XResultSet >();
}
//--------------------------------------------------------------------
-sal_Int32 OStatement_Base::getRowCount () throw( SQLException)
+SQLLEN OStatement_Base::getRowCount () throw( SQLException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- sal_Int32 numRows = 0;
+ SQLLEN numRows = 0;
try {
THROW_SQL(N3SQLRowCount(m_aStatementHandle,&numRows));
@@ -533,7 +533,9 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException,
SQLRETURN nError = N3SQLMoreResults(m_aStatementHandle);
if(nError == SQL_SUCCESS)
{
- N3SQLRowCount(m_aStatementHandle,&pArray[j]);
+ SQLLEN nRowCount=0;
+ N3SQLRowCount(m_aStatementHandle,&nRowCount);
+ pArray[j] = nRowCount;
}
}
return aRet;
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index a7ac4ebf4d78..39c848f34eaf 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -56,16 +56,16 @@ void OTools::getValue( OConnection* _pConnection,
sal_Bool &_bWasNull,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
void* _pValue,
- SQLINTEGER _rSize) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+ SQLLEN _nSize) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::getValue" );
- SQLINTEGER pcbValue = SQL_NULL_DATA;
+ SQLLEN pcbValue = SQL_NULL_DATA;
OTools::ThrowException(_pConnection,
(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle,
(SQLUSMALLINT)columnIndex,
_nType,
_pValue,
- (SQLINTEGER)_rSize,
+ _nSize,
&pcbValue),
_aStatementHandle,SQL_HANDLE_STMT,_xInterface,sal_False);
_bWasNull = pcbValue == SQL_NULL_DATA;
@@ -86,12 +86,12 @@ void OTools::bindParameter( OConnection* _pConnection,
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::bindParameter" );
SQLRETURN nRetcode;
- SWORD fSqlType;
- SWORD fCType;
- SDWORD nMaxLen = 0;
+ SQLSMALLINT fSqlType;
+ SQLSMALLINT fCType;
+ SQLLEN nMaxLen = 0;
// void*& pData = pDataBuffer;
- SQLINTEGER* pLen = (SQLINTEGER*)pLenBuffer;
- SQLUINTEGER nColumnSize=0;
+ SQLLEN* pLen = (SQLLEN*)pLenBuffer;
+ SQLULEN nColumnSize=0;
SQLSMALLINT nDecimalDigits=0;
OTools::getBindTypes(_bUseWChar,_bUseOldTimeDate,_nODBCtype,fCType,fSqlType);
@@ -123,10 +123,10 @@ void OTools::bindParameter( OConnection* _pConnection,
void OTools::bindData( SQLSMALLINT _nOdbcType,
sal_Bool _bUseWChar,
sal_Int8 *&_pData,
- SQLINTEGER*& pLen,
+ SQLLEN*& pLen,
const void* _pValue,
rtl_TextEncoding _nTextEncoding,
- SQLUINTEGER& _nColumnSize)
+ SQLULEN& _nColumnSize)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::bindData" );
_nColumnSize = 0;
@@ -222,7 +222,7 @@ void OTools::bindData( SQLSMALLINT _nOdbcType,
{
sal_Int32 nLen = 0;
nLen = ((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getLength();
- *pLen = (SDWORD)SQL_LEN_DATA_AT_EXEC(nLen);
+ *pLen = (SQLLEN)SQL_LEN_DATA_AT_EXEC(nLen);
}
break;
case SQL_LONGVARCHAR:
@@ -235,21 +235,21 @@ void OTools::bindData( SQLSMALLINT _nOdbcType,
::rtl::OString aString(::rtl::OUStringToOString(*(::rtl::OUString*)_pValue,_nTextEncoding));
nLen = aString.getLength();
}
- *pLen = (SDWORD)SQL_LEN_DATA_AT_EXEC(nLen);
+ *pLen = (SQLLEN)SQL_LEN_DATA_AT_EXEC(nLen);
} break;
case SQL_DATE:
*(DATE_STRUCT*)_pData = *(DATE_STRUCT*)_pValue;
- *pLen = (SDWORD)sizeof(DATE_STRUCT);
+ *pLen = (SQLLEN)sizeof(DATE_STRUCT);
_nColumnSize = 10;
break;
case SQL_TIME:
*(TIME_STRUCT*)_pData = *(TIME_STRUCT*)_pValue;
- *pLen = (SDWORD)sizeof(TIME_STRUCT);
+ *pLen = (SQLLEN)sizeof(TIME_STRUCT);
_nColumnSize = 8;
break;
case SQL_TIMESTAMP:
*(TIMESTAMP_STRUCT*)_pData = *(TIMESTAMP_STRUCT*)_pValue;
- *pLen = (SDWORD)sizeof(TIMESTAMP_STRUCT);
+ *pLen = (SQLLEN)sizeof(TIMESTAMP_STRUCT);
_nColumnSize = 19;
break;
}
@@ -262,7 +262,7 @@ void OTools::bindValue( OConnection* _pConnection,
SQLSMALLINT _nMaxLen,
const void* _pValue,
void* _pData,
- SQLINTEGER *pLen,
+ SQLLEN *pLen,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
rtl_TextEncoding _nTextEncoding,
sal_Bool _bUseOldTimeDate) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
@@ -271,7 +271,7 @@ void OTools::bindValue( OConnection* _pConnection,
SQLRETURN nRetcode;
SQLSMALLINT fSqlType;
SQLSMALLINT fCType;
- SQLSMALLINT nMaxLen = _nMaxLen;
+ SQLLEN nMaxLen = _nMaxLen;
OTools::getBindTypes( sal_False,
_bUseOldTimeDate,
@@ -375,7 +375,7 @@ void OTools::bindValue( OConnection* _pConnection,
_pData = (void*)(columnIndex);
sal_Int32 nLen = 0;
nLen = ((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getLength();
- *pLen = (SDWORD)SQL_LEN_DATA_AT_EXEC(nLen);
+ *pLen = (SQLLEN)SQL_LEN_DATA_AT_EXEC(nLen);
}
break;
case SQL_LONGVARCHAR:
@@ -383,7 +383,7 @@ void OTools::bindValue( OConnection* _pConnection,
_pData = (void*)(columnIndex);
sal_Int32 nLen = 0;
nLen = ((::rtl::OUString*)_pValue)->getLength();
- *pLen = (SDWORD)SQL_LEN_DATA_AT_EXEC(nLen);
+ *pLen = (SQLLEN)SQL_LEN_DATA_AT_EXEC(nLen);
} break;
case SQL_DATE:
*pLen = sizeof(DATE_STRUCT);
@@ -446,10 +446,10 @@ void OTools::ThrowException(OConnection* _pConnection,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::ThrowException" );
SDB_ODBC_CHAR szSqlState[5];
- SDWORD pfNativeError;
+ SQLINTEGER pfNativeError;
SDB_ODBC_CHAR szErrorMessage[SQL_MAX_MESSAGE_LENGTH];
szErrorMessage[0] = '\0';
- SWORD pcbErrorMsg = 0;
+ SQLSMALLINT pcbErrorMsg = 0;
// Informationen zur letzten Operation:
// wenn hstmt != SQL_NULL_HSTMT ist (Benutzung von SetStatus in SdbCursor, SdbTable, ...),
@@ -478,7 +478,7 @@ void OTools::ThrowException(OConnection* _pConnection,
Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
SQLHANDLE _aStatementHandle,
sal_Int32 columnIndex,
- SWORD _fSqlType,
+ SQLSMALLINT _fSqlType,
sal_Bool &_bWasNull,
const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException)
{
@@ -486,14 +486,14 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
char aCharArray[2048];
// Erstmal versuchen, die Daten mit dem kleinen Puffer
// abzuholen:
- SQLINTEGER nMaxLen = sizeof aCharArray - 1;
+ SQLLEN nMaxLen = sizeof aCharArray - 1;
// GETDATA(SQL_C_CHAR,aCharArray,nMaxLen);
- SQLINTEGER pcbValue = 0;
+ SQLLEN pcbValue = 0;
OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle,
(SQLUSMALLINT)columnIndex,
_fSqlType,
(SQLPOINTER)aCharArray,
- (SQLINTEGER)nMaxLen,
+ nMaxLen,
&pcbValue),
_aStatementHandle,SQL_HANDLE_STMT,_xInterface);
@@ -540,7 +540,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
::rtl::OUString OTools::getStringValue(OConnection* _pConnection,
SQLHANDLE _aStatementHandle,
sal_Int32 columnIndex,
- SWORD _fSqlType,
+ SQLSMALLINT _fSqlType,
sal_Bool &_bWasNull,
const Reference< XInterface >& _xInterface,
rtl_TextEncoding _nTextEncoding) throw(SQLException, RuntimeException)
@@ -555,15 +555,15 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
{
sal_Unicode waCharArray[2048];
// read the unicode data
- sal_Int32 nMaxLen = (sizeof(waCharArray) / sizeof(sal_Unicode)) - 1;
+ SQLLEN nMaxLen = (sizeof(waCharArray) / sizeof(sal_Unicode)) - 1;
// GETDATA(SQL_C_WCHAR, waCharArray, nMaxLen + sizeof(sal_Unicode));
- SQLINTEGER pcbValue=0;
+ SQLLEN pcbValue=0;
OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle,
(SQLUSMALLINT)columnIndex,
SQL_C_WCHAR,
&waCharArray,
- (SQLINTEGER)nMaxLen*sizeof(sal_Unicode),
+ (SQLLEN)nMaxLen*sizeof(sal_Unicode),
&pcbValue),
_aStatementHandle,SQL_HANDLE_STMT,_xInterface);
_bWasNull = pcbValue == SQL_NULL_DATA;
@@ -571,10 +571,10 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
return ::rtl::OUString();
// Bei Fehler bricht der GETDATA-Makro mit return ab,
// bei NULL mit break!
- SQLINTEGER nRealSize = 0;
+ SQLLEN nRealSize = 0;
if ( pcbValue > -1 )
nRealSize = pcbValue / sizeof(sal_Unicode);
- SQLINTEGER nLen = pcbValue != SQL_NO_TOTAL ? std::min(nRealSize, nMaxLen) : (nMaxLen-1);
+ SQLLEN nLen = pcbValue != SQL_NO_TOTAL ? std::min(nRealSize, nMaxLen) : (nMaxLen-1);
waCharArray[nLen] = 0;
aData.append(waCharArray,nLen);
@@ -598,7 +598,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
(SQLUSMALLINT)columnIndex,
SQL_C_WCHAR,
&waCharArray,
- (SQLINTEGER)nLen+1,
+ (SQLLEN)nLen+1,
&pcbValue),
_aStatementHandle,SQL_HANDLE_STMT,_xInterface);
nRealSize = 0;
@@ -616,21 +616,21 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
char aCharArray[2048];
// Erstmal versuchen, die Daten mit dem kleinen Puffer
// abzuholen:
- SDWORD nMaxLen = sizeof aCharArray - 1;
+ SQLLEN nMaxLen = sizeof aCharArray - 1;
// GETDATA(SQL_C_CHAR,aCharArray,nMaxLen);
- SQLINTEGER pcbValue = 0;
+ SQLLEN pcbValue = 0;
OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle,
(SQLUSMALLINT)columnIndex,
SQL_C_CHAR,
&aCharArray,
- (SQLINTEGER)nMaxLen,
+ nMaxLen,
&pcbValue),
_aStatementHandle,SQL_HANDLE_STMT,_xInterface);
_bWasNull = pcbValue == SQL_NULL_DATA;
if(_bWasNull)
return ::rtl::OUString();
- SQLINTEGER nLen = pcbValue != SQL_NO_TOTAL ? std::min(pcbValue, nMaxLen) : (nMaxLen-1);
+ SQLLEN nLen = pcbValue != SQL_NO_TOTAL ? std::min(pcbValue, nMaxLen) : (nMaxLen-1);
aCharArray[nLen] = 0;
if ( ((pcbValue == SQL_NO_TOTAL) || pcbValue > nMaxLen) && aCharArray[nLen-1] == 0 && nLen > 0 )
--nLen;
diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx
index 43ec65992281..5b184b735400 100644
--- a/connectivity/source/inc/odbc/OFunctions.hxx
+++ b/connectivity/source/inc/odbc/OFunctions.hxx
@@ -187,7 +187,7 @@ namespace connectivity
SQLSMALLINT * StringLengthPtr,
SQLSMALLINT * TypePtr,
SQLSMALLINT * SubTypePtr,
- SQLINTEGER * LengthPtr,
+ SQLLEN * LengthPtr,
SQLSMALLINT * PrecisionPtr,
SQLSMALLINT * ScalePtr,
SQLSMALLINT * NullablePtr);
@@ -203,8 +203,8 @@ namespace connectivity
SQLSMALLINT Precision,
SQLSMALLINT Scale,
SQLPOINTER DataPtr,
- SQLINTEGER * StringLengthPtr,
- SQLINTEGER * IndicatorPtr);
+ SQLLEN * StringLengthPtr,
+ SQLLEN * IndicatorPtr);
#define N3SQLSetDescRec(a,b,c,d,e,f,g,h,i,j) (*(T3SQLSetDescRec)getOdbcFunction(ODBC3SQLSetDescRec))(a,b,c,d,e,f,g,h,i,j)
*/
@@ -221,11 +221,11 @@ namespace connectivity
SQLSMALLINT InputOutputType,
SQLSMALLINT ValueType,
SQLSMALLINT ParameterType,
- SQLUINTEGER ColumnSize,
+ SQLULEN ColumnSize,
SQLSMALLINT DecimalDigits,
SQLPOINTER ParameterValuePtr,
- SQLINTEGER BufferLength,
- SQLINTEGER * StrLen_or_IndPtr);
+ SQLLEN BufferLength,
+ SQLLEN * StrLen_or_IndPtr);
#define N3SQLBindParameter(a,b,c,d,e,f,g,h,i,j) (*(T3SQLBindParameter)getOdbcFunction(ODBC3SQLBindParameter))(a,b,c,d,e,f,g,h,i,j)
@@ -266,7 +266,7 @@ namespace connectivity
typedef SQLRETURN (SQL_API *T3SQLDescribeParam) (SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber,
SQLSMALLINT * DataTypePtr,
- SQLUINTEGER * ParameterSizePtr,
+ SQLULEN * ParameterSizePtr,
SQLSMALLINT * DecimalDigitsPtr,
SQLSMALLINT * NullablePtr);
@@ -284,13 +284,13 @@ namespace connectivity
typedef SQLRETURN (SQL_API *T3SQLPutData) ( SQLHSTMT StatementHandle,
SQLPOINTER DataPtr,
- SQLINTEGER StrLen_or_Ind);
+ SQLLEN StrLen_or_Ind);
#define N3SQLPutData(a,b,c) (*(T3SQLPutData)getOdbcFunction(ODBC3SQLPutData))(a,b,c)
// Retrieving results and information about results
typedef SQLRETURN (SQL_API *T3SQLRowCount) ( SQLHSTMT StatementHandle,
- SQLINTEGER * RowCountPtr);
+ SQLLEN * RowCountPtr);
#define N3SQLRowCount(a,b) (*(T3SQLRowCount)getOdbcFunction(ODBC3SQLRowCount))(a,b)
@@ -300,12 +300,12 @@ namespace connectivity
#define N3SQLNumResultCols(a,b) (*(T3SQLNumResultCols)getOdbcFunction(ODBC3SQLNumResultCols))(a,b)
typedef SQLRETURN (SQL_API *T3SQLDescribeCol) ( SQLHSTMT StatementHandle,
- SQLSMALLINT ColumnNumber,
+ SQLUSMALLINT ColumnNumber,
SQLCHAR * ColumnName,
SQLSMALLINT BufferLength,
SQLSMALLINT * NameLengthPtr,
SQLSMALLINT * DataTypePtr,
- SQLUINTEGER * ColumnSizePtr,
+ SQLULEN * ColumnSizePtr,
SQLSMALLINT * DecimalDigitsPtr,
SQLSMALLINT * NullablePtr);
@@ -317,7 +317,7 @@ namespace connectivity
SQLPOINTER CharacterAttributePtr,
SQLSMALLINT BufferLength,
SQLSMALLINT * StringLengthPtr,
- SQLPOINTER NumericAttributePtr);
+ SQLLEN * NumericAttributePtr);
#define N3SQLColAttribute(a,b,c,d,e,f,g) (*(T3SQLColAttribute)getOdbcFunction(ODBC3SQLColAttribute))(a,b,c,d,e,f,g)
@@ -325,8 +325,8 @@ namespace connectivity
SQLUSMALLINT ColumnNumber,
SQLSMALLINT TargetType,
SQLPOINTER TargetValuePtr,
- SQLINTEGER BufferLength,
- SQLINTEGER * StrLen_or_IndPtr);
+ SQLLEN BufferLength,
+ SQLLEN * StrLen_or_IndPtr);
#define N3SQLBindCol(a,b,c,d,e,f) (*(T3SQLBindCol)getOdbcFunction(ODBC3SQLBindCol))(a,b,c,d,e,f)
@@ -336,7 +336,7 @@ namespace connectivity
typedef SQLRETURN (SQL_API *T3SQLFetchScroll) ( SQLHSTMT StatementHandle,
SQLSMALLINT FetchOrientation,
- SQLINTEGER FetchOffset);
+ SQLLEN FetchOffset);
#define N3SQLFetchScroll(a,b,c) (*(T3SQLFetchScroll)getOdbcFunction(ODBC3SQLFetchScroll))(a,b,c)
@@ -344,20 +344,20 @@ namespace connectivity
SQLUSMALLINT ColumnNumber,
SQLSMALLINT TargetType,
SQLPOINTER TargetValuePtr,
- SQLINTEGER BufferLength,
- SQLINTEGER * StrLen_or_IndPtr);
+ SQLLEN BufferLength,
+ SQLLEN * StrLen_or_IndPtr);
#define N3SQLGetData(a,b,c,d,e,f) (*(T3SQLGetData)getOdbcFunction(ODBC3SQLGetData))(a,b,c,d,e,f)
typedef SQLRETURN (SQL_API *T3SQLSetPos) ( SQLHSTMT StatementHandle,
- SQLUSMALLINT RowNumber,
+ SQLSETPOSIROW RowNumber,
SQLUSMALLINT Operation,
SQLUSMALLINT LockType);
#define N3SQLSetPos(a,b,c,d) (*(T3SQLSetPos)getOdbcFunction(ODBC3SQLSetPos))(a,b,c,d)
typedef SQLRETURN (SQL_API *T3SQLBulkOperations) ( SQLHSTMT StatementHandle,
- SQLUSMALLINT Operation);
+ SQLSMALLINT Operation);
#define N3SQLBulkOperations(a,b) (*(T3SQLBulkOperations)getOdbcFunction(ODBC3SQLBulkOperations))(a,b)
@@ -461,15 +461,15 @@ namespace connectivity
#define N3SQLProcedures(a,b,c,d,e,f,g) (*(T3SQLProcedures)getOdbcFunction(ODBC3SQLProcedures))(a,b,c,d,e,f,g)
typedef SQLRETURN (SQL_API *T3SQLSpecialColumns) (SQLHSTMT StatementHandle,
- SQLSMALLINT IdentifierType,
+ SQLUSMALLINT IdentifierType,
SQLCHAR * CatalogName,
SQLSMALLINT NameLength1,
SQLCHAR * SchemaName,
SQLSMALLINT NameLength2,
SQLCHAR * TableName,
SQLSMALLINT NameLength3,
- SQLSMALLINT Scope,
- SQLSMALLINT Nullable);
+ SQLUSMALLINT Scope,
+ SQLUSMALLINT Nullable);
#define N3SQLSpecialColumns(a,b,c,d,e,f,g,h,i,j) (*(T3SQLSpecialColumns)getOdbcFunction(ODBC3SQLSpecialColumns))(a,b,c,d,e,f,g,h,i,j)
diff --git a/connectivity/source/inc/odbc/OResultSet.hxx b/connectivity/source/inc/odbc/OResultSet.hxx
index cf9fdce56115..9925457e99f6 100644
--- a/connectivity/source/inc/odbc/OResultSet.hxx
+++ b/connectivity/source/inc/odbc/OResultSet.hxx
@@ -128,7 +128,7 @@ namespace connectivity
typedef ::std::vector<ORowSetValue> TDataRow;
TVoidVector m_aBindVector;
- ::std::vector<sal_Int32> m_aLengthVector;
+ ::std::vector<SQLLEN> m_aLengthVector;
::std::map<sal_Int32,SWORD> m_aODBCColumnTypes;
::com::sun::star::uno::Sequence<sal_Int8> m_aBookmark;
diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
index 1d9564e5d762..99b7b6b54ccb 100644
--- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx
+++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
@@ -81,13 +81,13 @@ namespace connectivity
virtual ~OResultSetMetaData();
- static SWORD getNumColAttrib(OConnection* _pConnection
+ static SQLLEN getNumColAttrib(OConnection* _pConnection
,SQLHANDLE _aStatementHandle
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface
,sal_Int32 _column
,sal_Int32 ident) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- static SWORD getColumnODBCType(OConnection* _pConnection
+ static SQLSMALLINT getColumnODBCType(OConnection* _pConnection
,SQLHANDLE _aStatementHandle
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface
,sal_Int32 column)
diff --git a/connectivity/source/inc/odbc/OStatement.hxx b/connectivity/source/inc/odbc/OStatement.hxx
index 5d3e71c5e42d..58702312231a 100644
--- a/connectivity/source/inc/odbc/OStatement.hxx
+++ b/connectivity/source/inc/odbc/OStatement.hxx
@@ -130,7 +130,7 @@ namespace connectivity
*/
virtual OResultSet* createResulSet();
- sal_Int32 getRowCount () throw( ::com::sun::star::sdbc::SQLException);
+ SQLLEN getRowCount () throw( ::com::sun::star::sdbc::SQLException);
void disposeResultSet();
diff --git a/connectivity/source/inc/odbc/OTools.hxx b/connectivity/source/inc/odbc/OTools.hxx
index 0d73ea3530c7..0c12f9010cdc 100644
--- a/connectivity/source/inc/odbc/OTools.hxx
+++ b/connectivity/source/inc/odbc/OTools.hxx
@@ -197,7 +197,7 @@ namespace connectivity
static ::rtl::OUString getStringValue( OConnection* _pConnection,
SQLHANDLE _aStatementHandle,
sal_Int32 columnIndex,
- SWORD _fSqlType,
+ SQLSMALLINT _fSqlType,
sal_Bool &_bWasNull,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
rtl_TextEncoding _nTextEncoding) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
@@ -205,7 +205,7 @@ namespace connectivity
static ::com::sun::star::uno::Sequence<sal_Int8> getBytesValue(OConnection* _pConnection,
SQLHANDLE _aStatementHandle,
sal_Int32 columnIndex,
- SWORD _fSqlType,
+ SQLSMALLINT _fSqlType,
sal_Bool &_bWasNull,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
static void getValue( OConnection* _pConnection,
@@ -215,7 +215,7 @@ namespace connectivity
sal_Bool &_bWasNull,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
void* _pValue,
- SQLINTEGER _rSize) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ SQLLEN _nSize) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
/**
bindData copies the from pValue to pData
@@ -229,10 +229,10 @@ namespace connectivity
static void bindData( SQLSMALLINT _nOdbcType,
sal_Bool _bUseWChar,
sal_Int8 *&_pData,
- SQLINTEGER*& pLen,
+ SQLLEN*& pLen,
const void* _pValue,
rtl_TextEncoding _nTextEncoding,
- SQLUINTEGER& _nColumnSize);
+ SQLULEN& _nColumnSize);
static void bindParameter( OConnection* _pConnection,
SQLHANDLE _hStmt,
@@ -254,7 +254,7 @@ namespace connectivity
SQLSMALLINT _nMaxLen,
const void* _pValue,
void* _pData,
- SQLINTEGER *pLen,
+ SQLLEN *pLen,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
rtl_TextEncoding _nTextEncoding,
sal_Bool _bUseOldTimeDate) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
index f0d0ff881bc5..38e7e5143b8a 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
@@ -97,7 +97,7 @@ namespace drawinglayer
basegfx::B2DPolyPolygon maClipPolyPolygon;
// the target MetaFile
- GDIMetaFile& mrMetaFile;
+ GDIMetaFile* mpMetaFile;
// do not allow embedding SvtGraphicFills into each other,
// use a counter to prevent that
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 1c040545eedd..d1190c2d9179 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -113,6 +113,7 @@ namespace drawinglayer
{
// Prepare VDev, MetaFile and connections
OutputDevice* pLastOutputDevice = mpOutputDevice;
+ GDIMetaFile* pLastMetafile = mpMetaFile;
basegfx::B2DRange aPrimitiveRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rContent, getViewInformation2D()));
// transform primitive range with current transformation (e.g shadow offset)
@@ -125,6 +126,7 @@ namespace drawinglayer
MapMode aNewMapMode(pLastOutputDevice->GetMapMode());
mpOutputDevice = &aContentVDev;
+ mpMetaFile = &o_rContentMetafile;
aContentVDev.EnableOutput(false);
aContentVDev.SetMapMode(pLastOutputDevice->GetMapMode());
o_rContentMetafile.Record(&aContentVDev);
@@ -145,6 +147,7 @@ namespace drawinglayer
o_rContentMetafile.SetPrefMapMode(aNewMapMode);
o_rContentMetafile.SetPrefSize(aPrimitiveRectangle.GetSize());
mpOutputDevice = pLastOutputDevice;
+ mpMetaFile = pLastMetafile;
return aPrimitiveRectangle;
}
@@ -219,7 +222,7 @@ namespace drawinglayer
SvMemoryStream aMemStm;
aMemStm << *pSvtGraphicFill;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
mnSvtGraphicFillCount++;
}
}
@@ -229,7 +232,7 @@ namespace drawinglayer
if(pSvtGraphicFill && mnSvtGraphicFillCount)
{
mnSvtGraphicFillCount--;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_END"));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_END"));
delete pSvtGraphicFill;
}
}
@@ -372,7 +375,7 @@ namespace drawinglayer
SvMemoryStream aMemStm;
aMemStm << *pSvtGraphicStroke;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
mnSvtGraphicStrokeCount++;
}
}
@@ -382,7 +385,7 @@ namespace drawinglayer
if(pSvtGraphicStroke && mnSvtGraphicStrokeCount)
{
mnSvtGraphicStrokeCount--;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END"));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END"));
delete pSvtGraphicStroke;
}
}
@@ -392,7 +395,7 @@ namespace drawinglayer
VclMetafileProcessor2D::VclMetafileProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev)
: VclProcessor2D(rViewInformation, rOutDev),
- mrMetaFile(*rOutDev.GetConnectMetaFile()),
+ mpMetaFile(rOutDev.GetConnectMetaFile()),
mnSvtGraphicFillCount(0),
mnSvtGraphicStrokeCount(0),
mfCurrentUnifiedTransparence(0.0),
@@ -816,19 +819,19 @@ namespace drawinglayer
{
default : // case drawinglayer::primitive2d::FIELD_TYPE_COMMON :
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon));
break;
}
case drawinglayer::primitive2d::FIELD_TYPE_PAGE :
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringPage));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringPage));
break;
}
case drawinglayer::primitive2d::FIELD_TYPE_URL :
{
const rtl::OUString& rURL = rFieldPrimitive.getString();
const String aOldString(rURL);
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len()));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len()));
break;
}
}
@@ -838,7 +841,7 @@ namespace drawinglayer
process(rContent);
// for the end comment the type is not relevant yet, they are all the same. Just add.
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringEnd));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringEnd));
if(mpPDFExtOutDevData && drawinglayer::primitive2d::FIELD_TYPE_URL == rFieldPrimitive.getType())
{
@@ -863,7 +866,7 @@ namespace drawinglayer
// process recursively and add MetaFile comment
process(rLinePrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentString));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentString));
break;
}
@@ -876,7 +879,7 @@ namespace drawinglayer
// process recursively and add MetaFile comment
process(rBulletPrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentString));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentString));
break;
}
@@ -893,7 +896,7 @@ namespace drawinglayer
// process recursively and add MetaFile comment
process(rParagraphPrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentString));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentString));
if(mpPDFExtOutDevData)
{
@@ -910,9 +913,9 @@ namespace drawinglayer
static const ByteString aCommentStringB("XTEXT_PAINTSHAPE_END");
// add MetaFile comment, process recursively and add MetaFile comment
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA));
process(rBlockPrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB));
break;
}
@@ -965,17 +968,17 @@ namespace drawinglayer
// create the entries for the respective break positions
if(i == nNextCellBreak)
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition));
nNextCellBreak = mxBreakIterator->nextCharacters(rTxt, i, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
}
if(i == nNextWordBoundary.endPos)
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition));
nNextWordBoundary = mxBreakIterator->getWordBoundary(rTxt, i + 1, rLocale, ::com::sun::star::i18n::WordType::ANY_WORD, sal_True);
}
if(i == nNextSentenceBreak)
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition));
nNextSentenceBreak = mxBreakIterator->endOfSentence(rTxt, i + 1, rLocale);
}
}
@@ -1057,7 +1060,7 @@ namespace drawinglayer
{
const Polygon aToolsPolygon(aCandidate);
- mrMetaFile.AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo));
+ mpMetaFile->AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo));
}
}
@@ -1500,7 +1503,10 @@ namespace drawinglayer
// svae old mfCurrentUnifiedTransparence and set new one
// so that contained SvtGraphicStroke may use the current one
const double fLastCurrentUnifiedTransparence(mfCurrentUnifiedTransparence);
- mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha();
+ // #i105377# paint the content metafile opaque as the transparency gets
+ // split of into the gradient below
+ // mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha();
+ mfCurrentUnifiedTransparence = 0;
// various content, create content-metafile
GDIMetaFile aContentMetafile;
diff --git a/formula/prj/CVS/Entries b/formula/prj/CVS/Entries
deleted file mode 100644
index 3ae75e3153ff..000000000000
--- a/formula/prj/CVS/Entries
+++ /dev/null
@@ -1,4 +0,0 @@
-/build.lst/1.10/Wed Aug 20 14:15:04 2008//Tcws_dev300_frmdlg
-/d.lst/1.6/Fri Aug 17 11:27:10 2007//Tcws_dev300_frmdlg
-/rpt.xml/1.2/Mon Jul 09 11:56:12 2007//Tcws_dev300_frmdlg
-D
diff --git a/formula/prj/CVS/Repository b/formula/prj/CVS/Repository
deleted file mode 100644
index 573341612fc8..000000000000
--- a/formula/prj/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-/cvs/dba/reportdesign/prj
diff --git a/formula/prj/CVS/Root b/formula/prj/CVS/Root
deleted file mode 100644
index ed0df2a21830..000000000000
--- a/formula/prj/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:pserver:oj@so-cvs-tunnel.germany.sun.com:/cvs
diff --git a/formula/prj/CVS/Tag b/formula/prj/CVS/Tag
deleted file mode 100644
index 9ff93ee1efdd..000000000000
--- a/formula/prj/CVS/Tag
+++ /dev/null
@@ -1 +0,0 @@
-Tcws_dev300_frmdlg
diff --git a/formula/prj/CVS/Template b/formula/prj/CVS/Template
deleted file mode 100644
index eec9bab36d48..000000000000
--- a/formula/prj/CVS/Template
+++ /dev/null
@@ -1,42 +0,0 @@
-Issue number:
-Submitted by:
-Reviewed by:
-CVS: ----------------------------------------------------------------------
-CVS: Issue number:
-CVS: If this change addresses one or more issues,
-CVS: then enter the issue number(s) here.
-CVS: Submitted by:
-CVS: If this code has been contributed to the project by someone else; i.e.,
-CVS: they sent us a patch or a set of diffs, then include their name/email
-CVS: address here. If this is your work then delete this line.
-CVS: Reviewed by:
-CVS: If we are doing pre-commit code reviews and someone else has
-CVS: reviewed your changes, include their name(s) here.
-CVS: If you have not had it reviewed then delete this line.
-CVS: ----------------------------------------------------------------------
-CVS: Committers,
-CVS:
-CVS: Please follow these protocols:
-CVS:
-CVS: * Please include in the log message
-CVS: reference(s) by ID / number and/or URL
-CVS: to any and all relevant OpenOffice.org issue(s).
-CVS:
-CVS: * If the code is contributed from outside Sun
-CVS: then please verify using the list at the following URL
-CVS: http://www.openoffice.org/copyright/copyrightapproved.html
-CVS: that Sun has received a signed Copyright Assignment Form
-CVS: from the submitter.
-CVS:
-CVS: Otherwise,
-CVS: please send an email TO: the submitter; and CC: OOCRequest@eng.sun.com
-CVS: the letter (CopyRightRequest.txt) to request assignment of copyright to Sun
-CVS: (http://www.openoffice.org/copyright/assign_copyright.html).
-CVS:
-CVS: Please do NOT commit code until you have verified (as detailed above) that
-CVS: Sun has received a signed Copyright Assignment Form from the submitter.
-CVS:
-CVS: * Please send an email TO: the submitter
-CVS: (particularly, if from outside Sun)
-CVS: advising that the code has been committed,
-CVS: and gratefully recognizing the contribution.
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 4cfa28d1806d..2fd4e08deeb4 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1183,10 +1183,10 @@ void FormulaCompiler::RangeLine()
//---------------------------------------------------------------------------
-void FormulaCompiler::UnionLine()
+void FormulaCompiler::IntersectionLine()
{
RangeLine();
- while (pToken->GetOpCode() == ocUnion)
+ while (pToken->GetOpCode() == ocIntersect)
{
FormulaTokenRef p = pToken;
NextToken();
@@ -1197,14 +1197,14 @@ void FormulaCompiler::UnionLine()
//---------------------------------------------------------------------------
-void FormulaCompiler::IntersectionLine()
+void FormulaCompiler::UnionLine()
{
- UnionLine();
- while (pToken->GetOpCode() == ocIntersect)
+ IntersectionLine();
+ while (pToken->GetOpCode() == ocUnion)
{
FormulaTokenRef p = pToken;
NextToken();
- UnionLine();
+ IntersectionLine();
PutCode(p);
}
}
@@ -1224,7 +1224,7 @@ void FormulaCompiler::UnaryLine()
PutCode( p );
}
else
- IntersectionLine();
+ UnionLine();
}
//---------------------------------------------------------------------------
diff --git a/fpicker/source/unx/kde4/KDE4FPEntry.cxx b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
index 268c01b600b3..46e09bfe5359 100644
--- a/fpicker/source/unx/kde4/KDE4FPEntry.cxx
+++ b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
@@ -84,12 +84,12 @@ static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiS
// the three uno functions that will be exported
extern "C"
{
- void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey )
+ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
{
sal_Bool bRetVal = sal_True;
@@ -110,7 +110,7 @@ extern "C"
return bRetVal;
}
- void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* pRegistryKey )
+ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* )
{
void* pRet = 0;
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 09e33a225977..96a14dbcef11 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -111,6 +111,8 @@ using namespace ::com::sun::star::uno;
// helper functions
//////////////////////////////////////////////////////////////////////////
+#include <QDebug>
+
namespace
{
// controling event notifications
@@ -157,14 +159,15 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>
_resMgr( CREATEVERSIONRESMGR( fps_office ) )
{
_extraControls = new QWidget();
-
_layout = new QGridLayout(_extraControls);
- _dialog = new KFileDialog(KUrl(""), QString(""), 0, _extraControls);
+ _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
_dialog->setMode(KFile::File | KFile::LocalOnly);
//default mode
_dialog->setOperationMode(KFileDialog::Opening);
+
+ _dialog->setStyleSheet("color: black;");
}
KDE4FilePicker::~KDE4FilePicker()
@@ -207,21 +210,12 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
}
}
+ _dialog->clearFilter();
_dialog->setFilter(_filter);
- _dialog->exec();
-
- //nasty hack to get a local qt event loop going to process the dialog
- //otherwise the dialog returns immediately
- while (_dialog->isVisible())
- {
- kapp->processEvents(QEventLoop::WaitForMoreEvents);
- }
//block and wait for user input
- if (_dialog->result() == KFileDialog::Accepted)
- {
+ if (_dialog->exec() == KFileDialog::Accepted)
return ExecutableDialogResults::OK;
- }
return ExecutableDialogResults::CANCEL;
}
@@ -230,13 +224,9 @@ void SAL_CALL KDE4FilePicker::setMultiSelectionMode( sal_Bool multiSelect )
throw( uno::RuntimeException )
{
if (multiSelect)
- {
_dialog->setMode(KFile::Files | KFile::LocalOnly);
- }
else
- {
_dialog->setMode(KFile::File | KFile::LocalOnly);
- }
}
void SAL_CALL KDE4FilePicker::setDefaultName( const ::rtl::OUString &name )
@@ -250,7 +240,7 @@ void SAL_CALL KDE4FilePicker::setDisplayDirectory( const rtl::OUString &dir )
throw( uno::RuntimeException )
{
const QString url = toQString(dir);
- _dialog->setStartDir(KUrl(url));
+ _dialog->setUrl(KUrl(url));
}
rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory()
@@ -263,16 +253,63 @@ rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory()
uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
throw( uno::RuntimeException )
{
- QStringList files = _dialog->selectedFiles();
+ QStringList rawFiles = _dialog->selectedFiles();
+ QStringList files;
- uno::Sequence< ::rtl::OUString > seq(files.size());
+ // check if we need to add an extension
+ QString extension = "";
+ if ( _dialog->operationMode() == KFileDialog::Saving )
+ {
+ QCheckBox *cb = dynamic_cast<QCheckBox*> (
+ _customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]);
+
+ if (cb->isChecked())
+ {
+ extension = _dialog->currentFilter(); // assuming filter value is like this *.ext
+ extension.replace("*","");
+ }
+ }
+
+ // Workaround for the double click selection KDE4 bug
+ // kde file picker returns the file and directories for selectedFiles()
+ // when a file is double clicked
+ // make a true list of files
+ const QString dir = "file://" + KUrl(rawFiles[0]).directory();
- for (int i=0 ; i<files.size() ; ++i)
+ bool singleFile = true;
+ if (rawFiles.size() > 1)
{
- const QString fileName = "file:" + files[i];
- seq[i] = toOUString(fileName);
+ singleFile = false;
+ //for multi file sequences, oo expects the first param to be the directory
+ //can't treat all cases like multi file because in some instances (inserting image)
+ //oo WANTS only one entry in the final list
+ files.append(dir);
}
+ for (USHORT i = 0; i < rawFiles.size(); ++i)
+ {
+ // if the raw file is not the base directory (see above kde bug)
+ // we add the file to list of avail files
+ if ((dir + "/") != ("file://" + rawFiles[i]))
+ {
+ QString filename = KUrl(rawFiles[i]).fileName();
+
+ if (singleFile)
+ filename.prepend(dir + "/");
+
+ //prevent extension append if we already have one
+ if (filename.endsWith(extension))
+ files.append(filename);
+ else
+ files.append(filename + extension);
+ }
+ }
+
+ // add all files and leading directory to outgoing OO sequence
+ uno::Sequence< ::rtl::OUString > seq(files.size());
+ for (int i = 0; i < files.size(); ++i)
+ seq[i] = toOUString(files[i]);
+
return seq;
}
@@ -283,9 +320,7 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
QString f = toQString(filter);
if (!_filter.isNull())
- {
_filter.append("\n");
- }
//add to hash map for reverse lookup in getCurrentFilter
_filters.insert(f, t);
@@ -294,15 +329,18 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
//see the docs
t.replace("/", "\\/");
+ // openoffice gives us filters separated by ';' qt dialogs just want space separated
+ f.replace(";", " ");
+
_filter.append(QString("%1|%2").arg(f).arg(t));
}
void SAL_CALL KDE4FilePicker::setCurrentFilter( const rtl::OUString &title )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- QString filter = toQString(title);
- filter.replace("/", "\\/");
- _dialog->filterWidget()->setCurrentFilter(filter);
+ QString t = toQString(title);
+ t.replace("/", "\\/");
+ _dialog->filterWidget()->setCurrentFilter(t);
}
rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
@@ -312,17 +350,29 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
//default if not found
if (filter.isNull())
- {
filter = "ODF Text Document (.odt)";
- }
return toOUString(filter);
}
-void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString&, const uno::Sequence<beans::StringPair>& )
+void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const uno::Sequence<beans::StringPair>& filters)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- //TODO
+ if (!_filter.isNull())
+ _filter.append(QString("\n"));
+
+ const USHORT length = filters.getLength();
+ for (USHORT i = 0; i < length; ++i)
+ {
+ beans::StringPair aPair = filters[i];
+
+ _filter.append(QString("%1|%2").arg(
+ toQString(aPair.Second).replace(";", " ")).arg(
+ toQString(aPair.First).replace("/","\\/")));
+
+ if (i != length - 1)
+ _filter.append('\n');
+ }
}
void SAL_CALL KDE4FilePicker::setValue( sal_Int16 controlId, sal_Int16, const uno::Any &value )
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index 58041b3fe628..ed2d5041ad67 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -872,30 +872,31 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
{
if (m_sFilename.getLength())
{
- ::rtl::OUString aFileURL(m_sDirectory);
- sal_Int32 nIndex = aFileURL.lastIndexOf('/');
- if (nIndex != aFileURL.getLength()-1)
- aFileURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/"));
- aFileURL += m_sFilename;
-
+ ::rtl::OUString aFileURL(m_sDirectory);
+ sal_Int32 nIndex = aFileURL.lastIndexOf('/');
+ if (nIndex != aFileURL.getLength()-1)
+ aFileURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/"));
+ aFileURL += m_sFilename;
+
TFileDialogCustomize iCustom = impl_getCustomizeInterface();
BOOL bValue = FALSE;
HRESULT hResult = iCustom->GetCheckButtonState( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, &bValue);
if ( bValue )
{
- ::rtl::OUString aExt;
- UINT nFileType;
- hResult = iDialog->GetFileTypeIndex(&nFileType);
+ ::rtl::OUString aExt;
+ UINT nFileType;
+ hResult = iDialog->GetFileTypeIndex(&nFileType);
if ( SUCCEEDED(hResult) )
- {
+ {
+ ::sal_Int32 nRealIndex = (nFileType-1); // COM dialog base on 1 ... filter container on 0 .-)
::std::vector< COMDLG_FILTERSPEC > lFilters = lcl_buildFilterList(m_lFilters);
- LPCWSTR lpFilterExt = lFilters[nFileType].pszSpec;
+ LPCWSTR lpFilterExt = lFilters[nRealIndex].pszSpec;
lpFilterExt = wcsrchr( lpFilterExt, '.' );
if ( lpFilterExt )
aFileURL += reinterpret_cast<const sal_Unicode*>(lpFilterExt);
- }
+ }
}
// Check existence of file. Set folder only for this special case
@@ -904,15 +905,15 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
WIN32_FIND_DATA aFindFileData;
HANDLE hFind = FindFirstFile( reinterpret_cast<LPCWSTR>(aSystemPath.getStr()), &aFindFileData );
- if (hFind != INVALID_HANDLE_VALUE)
- iDialog->SetFolder(pFolder);
- else
- hResult = iDialog->AddPlace(pFolder, FDAP_TOP);
-
+ if (hFind != INVALID_HANDLE_VALUE)
+ iDialog->SetFolder(pFolder);
+ else
+ hResult = iDialog->AddPlace(pFolder, FDAP_TOP);
+
FindClose( hFind );
- }
- else
- hResult = iDialog->AddPlace(pFolder, FDAP_TOP);
+ }
+ else
+ hResult = iDialog->AddPlace(pFolder, FDAP_TOP);
}
}
diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
index 62c0477a5169..a0dc92ae50d3 100644
--- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
@@ -38,7 +38,6 @@
#include <vector>
#include <list>
#include <hash_map>
-#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -78,7 +77,6 @@
namespace framework
{
- class UIConfigurationManagerImpl;
class ModuleUIConfigurationManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XComponent ,
@@ -87,6 +85,7 @@ namespace framework
public ::com::sun::star::ui::XUIConfigurationManager ,
public ::com::sun::star::ui::XModuleUIConfigurationManager ,
public ::com::sun::star::ui::XUIConfigurationPersistence ,
+ private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
@@ -135,7 +134,94 @@ namespace framework
virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
private:
- ::std::auto_ptr<UIConfigurationManagerImpl> m_pImpl;
+ // private data types
+ enum Layer
+ {
+ LAYER_DEFAULT,
+ LAYER_USERDEFINED,
+ LAYER_COUNT
+ };
+
+ enum NotifyOp
+ {
+ NotifyOp_Remove,
+ NotifyOp_Insert,
+ NotifyOp_Replace
+ };
+
+ struct UIElementInfo
+ {
+ UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) :
+ aResourceURL( rResourceURL), aUIName( rUIName ) {}
+ rtl::OUString aResourceURL;
+ rtl::OUString aUIName;
+ };
+
+ struct UIElementData
+ {
+ UIElementData() : bModified( false ), bDefault( true ), bDefaultNode( true ) {};
+
+ rtl::OUString aResourceURL;
+ rtl::OUString aName;
+ bool bModified; // has been changed since last storing
+ bool bDefault; // default settings
+ bool bDefaultNode; // this is a default layer element data
+ com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings;
+ };
+
+ struct UIElementType;
+ friend struct UIElementType;
+ typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap;
+
+ struct UIElementType
+ {
+ UIElementType() : bModified( false ),
+ bLoaded( false ),
+ bDefaultLayer( false ),
+ nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {}
+
+
+ bool bModified;
+ bool bLoaded;
+ bool bDefaultLayer;
+ sal_Int16 nElementType;
+ UIElementDataHashMap aElementsHashMap;
+ com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
+ };
+
+ typedef ::std::vector< UIElementType > UIElementTypesVector;
+ typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
+ typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap;
+
+ // private methods
+ void impl_Initialize();
+ void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
+ void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType );
+ void impl_preloadUIElementTypeList( Layer eLayer, sal_Int16 nElementType );
+ UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true );
+ void impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData );
+ void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage, UIElementType& rElementType, bool bResetModifyState = true );
+ void impl_resetElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
+ void impl_reloadElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
+
+ UIElementTypesVector m_aUIElements[LAYER_COUNT];
+ PresetHandler* m_pStorageHandler[::com::sun::star::ui::UIElementType::COUNT];
+ com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDefaultConfigStorage;
+ com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage;
+ bool m_bReadOnly;
+ bool m_bInitialized;
+ bool m_bModified;
+ bool m_bConfigRead;
+ bool m_bDisposed;
+ rtl::OUString m_aXMLPostfix;
+ rtl::OUString m_aPropUIName;
+ rtl::OUString m_aPropResourceURL;
+ rtl::OUString m_aModuleIdentifier;
+ rtl::OUString m_aModuleShortName;
+ com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
+ com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xModuleImageManager;
};
}
diff --git a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
index 39f1d9503513..e7ecec183570 100644
--- a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
@@ -38,7 +38,6 @@
#include <vector>
#include <list>
#include <hash_map>
-#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -78,7 +77,6 @@
namespace framework
{
- class UIConfigurationManagerImpl;
class UIConfigurationManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XComponent ,
@@ -86,6 +84,7 @@ namespace framework
public ::com::sun::star::ui::XUIConfigurationManager ,
public ::com::sun::star::ui::XUIConfigurationPersistence ,
public ::com::sun::star::ui::XUIConfigurationStorage ,
+ private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
@@ -131,7 +130,83 @@ namespace framework
virtual sal_Bool SAL_CALL hasStorage() throw (::com::sun::star::uno::RuntimeException);
private:
- ::std::auto_ptr<UIConfigurationManagerImpl> m_pImpl;
+ // private data types
+ enum NotifyOp
+ {
+ NotifyOp_Remove,
+ NotifyOp_Insert,
+ NotifyOp_Replace
+ };
+
+ struct UIElementInfo
+ {
+ UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) :
+ aResourceURL( rResourceURL), aUIName( rUIName ) {}
+ rtl::OUString aResourceURL;
+ rtl::OUString aUIName;
+ };
+
+ struct UIElementData
+ {
+ UIElementData() : bModified( false ), bDefault( true ) {};
+
+ rtl::OUString aResourceURL;
+ rtl::OUString aName;
+ bool bModified; // has been changed since last storing
+ bool bDefault; // default settings
+ com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings;
+ };
+
+ struct UIElementType;
+ friend struct UIElementType;
+ typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap;
+
+ struct UIElementType
+ {
+ UIElementType() : bModified( false ),
+ bLoaded( false ),
+ bDefaultLayer( false ),
+ nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {}
+
+
+ bool bModified;
+ bool bLoaded;
+ bool bDefaultLayer;
+ sal_Int16 nElementType;
+ UIElementDataHashMap aElementsHashMap;
+ com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
+ };
+
+ typedef ::std::vector< UIElementType > UIElementTypesVector;
+ typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
+ typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap;
+
+ // private methods
+ void impl_Initialize();
+ void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
+ void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType );
+ void impl_preloadUIElementTypeList( sal_Int16 nElementType );
+ UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true );
+ void impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData );
+ void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState = true );
+ void impl_resetElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer );
+ void impl_reloadElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
+
+ UIElementTypesVector m_aUIElements;
+ com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDocConfigStorage;
+ bool m_bReadOnly;
+ bool m_bInitialized;
+ bool m_bModified;
+ bool m_bConfigRead;
+ bool m_bDisposed;
+ rtl::OUString m_aXMLPostfix;
+ rtl::OUString m_aPropUIName;
+ rtl::OUString m_aPropResourceURL;
+ rtl::OUString m_aModuleIdentifier;
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
+ com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xImageManager;
+ com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xAccConfig;
};
}
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index b2139488a0ee..ee59097aa3fc 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -67,6 +67,7 @@
// includes of other projects
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/mediadescriptor.hxx>
+#include <comphelper/configurationhelper.hxx>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
@@ -361,6 +362,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
css::uno::Reference< css::frame::XFrame > xFrame (m_xFrame.get() , css::uno::UNO_QUERY);
css::uno::Reference< css::awt::XWindow > xPluggWindow(m_xPluggWindow.get(), css::uno::UNO_QUERY);
+ css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -432,8 +434,21 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
// is visible too.
impl_showProgress();
- if (xParentWindow.is())
- xParentWindow->setVisible(sal_True);
+ ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ Window* pWindow = VCLUnoHelper::GetWindow(xParentWindow);
+ if ( pWindow )
+ {
+ bool bForceFrontAndFocus(false);
+ ::comphelper::ConfigurationHelper::readDirectKey(
+ xSMGR,
+ ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"),
+ ::rtl::OUString::createFromAscii("NewDocumentHandling"),
+ ::rtl::OUString::createFromAscii("ForceFocusAndToFront"),
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= bForceFrontAndFocus;
+
+ pWindow->Show(sal_True, bForceFrontAndFocus ? SHOW_FOREGROUNDTASK : 0 );
+ }
+
/*
#i75167# dont disturb window manager handling .-)
css::uno::Reference< css::awt::XTopWindow > xParentWindowTop(xParentWindow, css::uno::UNO_QUERY);
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index 40d36f9a65f8..c0c5c90d45b3 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -51,7 +51,6 @@
// includes of other projects
#include <rtl/ustrbuf.hxx>
#include <vcl/svapp.hxx>
-#include <comphelper/uieventslogger.hxx>
//________________________________
// namespace
@@ -238,7 +237,6 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD
// Otherwhise we might die by ref count ...
css::uno::Reference< css::task::XJobListener > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
- if ( ::comphelper::UiEventsLogger::isEnabled() )
try
{
// create the job
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 0af8ea0e6587..ee39e583e5e7 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1740,14 +1740,28 @@ void LoadEnv::impl_reactForLoadingState()
void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::XWindow >& xWindow ,
sal_Bool bForceToFront)
{
- css::uno::Reference< css::awt::XTopWindow > xTopWindow(xWindow, css::uno::UNO_QUERY);
-
- if (xWindow.is())
- xWindow->setVisible(sal_True);
-
- if (xTopWindow.is() && bForceToFront)
- xTopWindow->toFront();
+ // SAFE -> ----------------------------------
+ ReadGuard aReadLock(m_aLock);
+ css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR.get(), css::uno::UNO_QUERY );
+ aReadLock.unlock();
+ // <- SAFE ----------------------------------
+ ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
+ if ( pWindow )
+ {
+ bool bForceFrontAndFocus(false);
+ css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey(
+ xSMGR,
+ ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"),
+ ::rtl::OUString::createFromAscii("NewDocumentHandling"),
+ ::rtl::OUString::createFromAscii("ForceFocusAndToFront"),
+ ::comphelper::ConfigurationHelper::E_READONLY);
+ a >>= bForceFrontAndFocus;
+
+ pWindow->Show(sal_True, (bForceFrontAndFocus || bForceToFront) ? SHOW_FOREGROUNDTASK : 0 );
+ }
+
/* #i19976#
We tried to prevent a toFront() call in case the user putted the
loading document into the background ..
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 40e4a9f7a6b9..c5d845a9d333 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -231,6 +231,13 @@ BackingWindow::~BackingWindow()
delete mpAccExec;
}
+void BackingWindow::GetFocus()
+{
+ if( IsVisible() )
+ maWriterButton.GrabFocus();
+ Window::GetFocus();
+}
+
class ImageContainerRes : public Resource
{
public:
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 63cfa0742e35..0b9afa6d38de 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -173,6 +173,7 @@ namespace framework
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual Window* GetParentLabelFor( const Window* pLabel ) const;
virtual Window* GetParentLabeledBy( const Window* pLabeled ) const;
+ virtual void GetFocus();
void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame );
};
diff --git a/framework/source/uiconfiguration/makefile.mk b/framework/source/uiconfiguration/makefile.mk
index c7d6eb435d4f..3ef9006072a2 100644
--- a/framework/source/uiconfiguration/makefile.mk
+++ b/framework/source/uiconfiguration/makefile.mk
@@ -43,7 +43,6 @@ ENABLE_EXCEPTIONS= TRUE
SLOFILES= \
$(SLO)$/uiconfigurationmanager.obj \
- $(SLO)$/uiconfigurationmanagerimpl.obj \
$(SLO)$/moduleuiconfigurationmanager.obj \
$(SLO)$/moduleuicfgsupplier.obj \
$(SLO)$/windowstateconfiguration.obj \
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 04c87a2c3946..663c2d0d6dd8 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -38,7 +38,6 @@
#include <uielement/uielementtypenames.hxx>
#include <xml/menuconfiguration.hxx>
#include <xml/toolboxconfiguration.hxx>
-#include <uiconfigurationmanagerimpl.hxx>
#ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_
#include <xml/statusbarconfiguration.hxx>
@@ -114,127 +113,1292 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ModuleUIConfigurationManager
DEFINE_INIT_SERVICE ( ModuleUIConfigurationManager, {} )
-ModuleUIConfigurationManager::ModuleUIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager )
-: m_pImpl( new UIConfigurationManagerImpl(xServiceManager,static_cast< OWeakObject* >(this),true) )
+// important: The order and position of the elements must match the constant
+// definition of "::com::sun::star::ui::UIElementType"
+static const char* UIELEMENTTYPENAMES[] =
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::ModuleUIConfigurationManager" );
+ "", // Dummy value for unknown!
+ UIELEMENTTYPE_MENUBAR_NAME,
+ UIELEMENTTYPE_POPUPMENU_NAME,
+ UIELEMENTTYPE_TOOLBAR_NAME,
+ UIELEMENTTYPE_STATUSBAR_NAME,
+ UIELEMENTTYPE_FLOATINGWINDOW_NAME,
+ UIELEMENTTYPE_PROGRESSBAR_NAME
+};
+
+static const char RESOURCEURL_PREFIX[] = "private:resource/";
+static const sal_Int32 RESOURCEURL_PREFIX_SIZE = 17;
+static const char RESOURCEURL_CUSTOM_ELEMENT[] = "custom_";
+
+static sal_Int16 RetrieveTypeFromResourceURL( const rtl::OUString& aResourceURL )
+{
+
+ if (( aResourceURL.indexOf( OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) &&
+ ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE ))
+ {
+ OUString aTmpStr = aResourceURL.copy( RESOURCEURL_PREFIX_SIZE );
+ sal_Int32 nIndex = aTmpStr.indexOf( '/' );
+ if (( nIndex > 0 ) && ( aTmpStr.getLength() > nIndex ))
+ {
+ OUString aTypeStr( aTmpStr.copy( 0, nIndex ));
+ for ( int i = 0; i < UIElementType::COUNT; i++ )
+ {
+ if ( aTypeStr.equalsAscii( UIELEMENTTYPENAMES[i] ))
+ return sal_Int16( i );
+ }
+ }
+ }
+
+ return UIElementType::UNKNOWN;
+}
+
+static OUString RetrieveNameFromResourceURL( const rtl::OUString& aResourceURL )
+{
+ if (( aResourceURL.indexOf( OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) &&
+ ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE ))
+ {
+ sal_Int32 nIndex = aResourceURL.lastIndexOf( '/' );
+ if (( nIndex > 0 ) && (( nIndex+1 ) < aResourceURL.getLength()))
+ return aResourceURL.copy( nIndex+1 );
+ }
+
+ return OUString();
+}
+
+void ModuleUIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType )
+{
+ // preload list of element types on demand
+ impl_preloadUIElementTypeList( LAYER_USERDEFINED, nElementType );
+ impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType );
+
+ UIElementDataHashMap& rUserElements = m_aUIElements[LAYER_USERDEFINED][nElementType].aElementsHashMap;
+ UIElementDataHashMap::const_iterator pUserIter = rUserElements.begin();
+
+ OUString aCustomUrlPrefix( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_CUSTOM_ELEMENT ));
+ while ( pUserIter != rUserElements.end() )
+ {
+ sal_Int32 nIndex = pUserIter->second.aResourceURL.indexOf( aCustomUrlPrefix, RESOURCEURL_PREFIX_SIZE );
+ if ( nIndex > RESOURCEURL_PREFIX_SIZE )
+ {
+ // Performance: Retrieve user interface name only for custom user interface elements.
+ // It's only used by them!
+ UIElementData* pDataSettings = impl_findUIElementData( pUserIter->second.aResourceURL, nElementType );
+ if ( pDataSettings )
+ {
+ // Retrieve user interface name from XPropertySet interface
+ rtl::OUString aUIName;
+ Reference< XPropertySet > xPropSet( pDataSettings->xSettings, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ Any a = xPropSet->getPropertyValue( m_aPropUIName );
+ a >>= aUIName;
+ }
+
+ UIElementInfo aInfo( pUserIter->second.aResourceURL, aUIName );
+ aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo ));
+ }
+ }
+ else
+ {
+ // The user interface name for standard user interface elements is stored in the WindowState.xcu file
+ UIElementInfo aInfo( pUserIter->second.aResourceURL, OUString() );
+ aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo ));
+ }
+ ++pUserIter;
+ }
+
+ UIElementDataHashMap& rDefaultElements = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap;
+ UIElementDataHashMap::const_iterator pDefIter = rDefaultElements.begin();
+
+ while ( pDefIter != rDefaultElements.end() )
+ {
+ UIElementInfoHashMap::const_iterator pIterInfo = aUIElementInfoCollection.find( pDefIter->second.aResourceURL );
+ if ( pIterInfo == aUIElementInfoCollection.end() )
+ {
+ sal_Int32 nIndex = pDefIter->second.aResourceURL.indexOf( aCustomUrlPrefix, RESOURCEURL_PREFIX_SIZE );
+ if ( nIndex > RESOURCEURL_PREFIX_SIZE )
+ {
+ // Performance: Retrieve user interface name only for custom user interface elements.
+ // It's only used by them!
+ UIElementData* pDataSettings = impl_findUIElementData( pDefIter->second.aResourceURL, nElementType );
+ if ( pDataSettings )
+ {
+ // Retrieve user interface name from XPropertySet interface
+ rtl::OUString aUIName;
+ Reference< XPropertySet > xPropSet( pDataSettings->xSettings, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ Any a = xPropSet->getPropertyValue( m_aPropUIName );
+ a >>= aUIName;
+ }
+
+ UIElementInfo aInfo( pDefIter->second.aResourceURL, aUIName );
+ aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pDefIter->second.aResourceURL, aInfo ));
+ }
+ }
+ else
+ {
+ // The user interface name for standard user interface elements is stored in the WindowState.xcu file
+ UIElementInfo aInfo( pDefIter->second.aResourceURL, OUString() );
+ aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pDefIter->second.aResourceURL, aInfo ));
+ }
+ }
+
+ ++pDefIter;
+ }
+}
+
+void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer, sal_Int16 nElementType )
+{
+ UIElementType& rElementTypeData = m_aUIElements[eLayer][nElementType];
+
+ if ( !rElementTypeData.bLoaded )
+ {
+ Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage;
+ if ( xElementTypeStorage.is() )
+ {
+ rtl::OUStringBuffer aBuf( RESOURCEURL_PREFIX_SIZE );
+ aBuf.appendAscii( RESOURCEURL_PREFIX );
+ aBuf.appendAscii( UIELEMENTTYPENAMES[ nElementType ] );
+ aBuf.appendAscii( "/" );
+ OUString aResURLPrefix( aBuf.makeStringAndClear() );
+
+ UIElementDataHashMap& rHashMap = rElementTypeData.aElementsHashMap;
+ Reference< XNameAccess > xNameAccess( xElementTypeStorage, UNO_QUERY );
+ Sequence< OUString > aUIElementNames = xNameAccess->getElementNames();
+ for ( sal_Int32 n = 0; n < aUIElementNames.getLength(); n++ )
+ {
+ UIElementData aUIElementData;
+
+ // Resource name must be without ".xml"
+ sal_Int32 nIndex = aUIElementNames[n].lastIndexOf( '.' );
+ if (( nIndex > 0 ) && ( nIndex < aUIElementNames[n].getLength() ))
+ {
+ OUString aExtension( aUIElementNames[n].copy( nIndex+1 ));
+ OUString aUIElementName( aUIElementNames[n].copy( 0, nIndex ));
+
+ if (( aUIElementName.getLength() > 0 ) &&
+ ( aExtension.equalsIgnoreAsciiCaseAsciiL( "xml", 3 )))
+ {
+ aUIElementData.aResourceURL = aResURLPrefix + aUIElementName;
+ aUIElementData.aName = aUIElementNames[n];
+
+ if ( eLayer == LAYER_USERDEFINED )
+ {
+ aUIElementData.bModified = false;
+ aUIElementData.bDefault = false;
+ aUIElementData.bDefaultNode = false;
+ }
+
+ // Create hash_map entries for all user interface elements inside the storage. We don't load the
+ // settings to speed up the process.
+ rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData ));
+ }
+ }
+ }
+ }
+ }
+
+ rElementTypeData.bLoaded = true;
+}
+
+void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData )
+{
+ UIElementType& rElementTypeData = m_aUIElements[eLayer][nElementType];
+
+ Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage;
+ if ( xElementTypeStorage.is() && aUIElementData.aName.getLength() )
+ {
+ try
+ {
+ Reference< XStream > xStream = xElementTypeStorage->openStreamElement( aUIElementData.aName, ElementModes::READ );
+ Reference< XInputStream > xInputStream = xStream->getInputStream();
+
+ if ( xInputStream.is() )
+ {
+ switch ( nElementType )
+ {
+ case ::com::sun::star::ui::UIElementType::UNKNOWN:
+ break;
+
+ case ::com::sun::star::ui::UIElementType::MENUBAR:
+ {
+ try
+ {
+ MenuConfiguration aMenuCfg( m_xServiceManager );
+ Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream ));
+ RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xContainer );
+ if ( pRootItemContainer )
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
+ else
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, sal_True ) ), UNO_QUERY );
+ return;
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ case ::com::sun::star::ui::UIElementType::POPUPMENU:
+ {
+ break;
+ }
+
+ case ::com::sun::star::ui::UIElementType::TOOLBAR:
+ {
+ try
+ {
+ Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
+ ToolBoxConfiguration::LoadToolBox( m_xServiceManager, xInputStream, xIndexContainer );
+ RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
+ return;
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+
+ break;
+ }
+
+ case ::com::sun::star::ui::UIElementType::STATUSBAR:
+ {
+ try
+ {
+ Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
+ StatusBarConfiguration::LoadStatusBar( m_xServiceManager, xInputStream, xIndexContainer );
+ RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
+ return;
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+
+ break;
+ }
+
+ case ::com::sun::star::ui::UIElementType::FLOATINGWINDOW:
+ {
+ break;
+ }
+ }
+ }
+ }
+ catch ( ::com::sun::star::embed::InvalidStorageException& )
+ {
+ }
+ catch ( ::com::sun::star::lang::IllegalArgumentException& )
+ {
+ }
+ catch ( ::com::sun::star::io::IOException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
+ {
+ }
+ }
+
+ // At least we provide an empty settings container!
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer() ), UNO_QUERY );
+}
+
+ModuleUIConfigurationManager::UIElementData* ModuleUIConfigurationManager::impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad )
+{
+ // preload list of element types on demand
+ impl_preloadUIElementTypeList( LAYER_USERDEFINED, nElementType );
+ impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType );
+
+ // first try to look into our user-defined vector/hash_map combination
+ UIElementDataHashMap& rUserHashMap = m_aUIElements[LAYER_USERDEFINED][nElementType].aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rUserHashMap.find( aResourceURL );
+ if ( pIter != rUserHashMap.end() )
+ {
+ // Default data settings data must be retrieved from the default layer!
+ if ( !pIter->second.bDefault )
+ {
+ if ( !pIter->second.xSettings.is() && bLoad )
+ impl_requestUIElementData( nElementType, LAYER_USERDEFINED, pIter->second );
+ return &(pIter->second);
+ }
+ }
+
+ // Not successfull, we have to look into our default vector/hash_map combination
+ UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap;
+ pIter = rDefaultHashMap.find( aResourceURL );
+ if ( pIter != rDefaultHashMap.end() )
+ {
+ if ( !pIter->second.xSettings.is() && bLoad )
+ impl_requestUIElementData( nElementType, LAYER_DEFAULT, pIter->second );
+ return &(pIter->second);
+ }
+
+ // Nothing has been found!
+ return NULL;
+}
+
+void ModuleUIConfigurationManager::impl_storeElementTypeData( Reference< XStorage > xStorage, UIElementType& rElementType, bool bResetModifyState )
+{
+ UIElementDataHashMap& rHashMap = rElementType.aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rHashMap.begin();
+
+ while ( pIter != rHashMap.end() )
+ {
+ UIElementData& rElement = pIter->second;
+ if ( rElement.bModified )
+ {
+ if ( rElement.bDefault )
+ {
+ xStorage->removeElement( rElement.aName );
+ rElement.bModified = sal_False; // mark as not modified
+ }
+ else
+ {
+ Reference< XStream > xStream( xStorage->openStreamElement( rElement.aName, ElementModes::WRITE|ElementModes::TRUNCATE ), UNO_QUERY );
+ Reference< XOutputStream > xOutputStream( xStream->getOutputStream() );
+
+ if ( xOutputStream.is() )
+ {
+ switch( rElementType.nElementType )
+ {
+ case ::com::sun::star::ui::UIElementType::MENUBAR:
+ {
+ try
+ {
+ MenuConfiguration aMenuCfg( m_xServiceManager );
+ aMenuCfg.StoreMenuBarConfigurationToXML( rElement.xSettings, xOutputStream );
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ case ::com::sun::star::ui::UIElementType::TOOLBAR:
+ {
+ try
+ {
+ ToolBoxConfiguration::StoreToolBox( m_xServiceManager, xOutputStream, rElement.xSettings );
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ case ::com::sun::star::ui::UIElementType::STATUSBAR:
+ {
+ try
+ {
+ StatusBarConfiguration::StoreStatusBar( m_xServiceManager, xOutputStream, rElement.xSettings );
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // mark as not modified if we store to our own storage
+ if ( bResetModifyState )
+ rElement.bModified = sal_False;
+ }
+ }
+
+ ++pIter;
+ }
+
+ // commit element type storage
+ Reference< XTransactedObject > xTransactedObject( xStorage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+
+ // mark UIElementType as not modified if we store to our own storage
+ if ( bResetModifyState )
+ rElementType.bModified = sal_False;
+}
+
+// This is only allowed to be called on the LAYER_USER_DEFINED!
+void ModuleUIConfigurationManager::impl_resetElementTypeData(
+ UIElementType& rUserElementType,
+ UIElementType& rDefaultElementType,
+ ConfigEventNotifyContainer& rRemoveNotifyContainer,
+ ConfigEventNotifyContainer& rReplaceNotifyContainer )
+{
+ UIElementDataHashMap& rHashMap = rUserElementType.aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rHashMap.begin();
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+ Reference< XNameAccess > xDefaultNameAccess( rDefaultElementType.xStorage, UNO_QUERY );
+ sal_Int16 nType = rUserElementType.nElementType;
+
+ // Make copies of the event structures to be thread-safe. We have to unlock our mutex before calling
+ // our listeners!
+ while ( pIter != rHashMap.end() )
+ {
+ UIElementData& rElement = pIter->second;
+ if ( !rElement.bDefault )
+ {
+ if ( xDefaultNameAccess->hasByName( rElement.aName ))
+ {
+ // Replace settings with data from default layer
+ Reference< XIndexAccess > xOldSettings( rElement.xSettings );
+ impl_requestUIElementData( nType, LAYER_DEFAULT, rElement );
+
+ ConfigurationEvent aReplaceEvent;
+ aReplaceEvent.ResourceURL = rElement.aResourceURL;
+ aReplaceEvent.Accessor <<= xThis;
+ aReplaceEvent.Source = xIfac;
+ aReplaceEvent.ReplacedElement <<= xOldSettings;
+ aReplaceEvent.Element <<= rElement.xSettings;
+
+ rReplaceNotifyContainer.push_back( aReplaceEvent );
+
+ // Mark element as default and not modified. That means "not active"
+ // in the user layer anymore.
+ rElement.bModified = false;
+ rElement.bDefault = true;
+ }
+ else
+ {
+ // Remove user-defined settings from user layer
+ ConfigurationEvent aEvent;
+ aEvent.ResourceURL = rElement.aResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.Element <<= rElement.xSettings;
+
+ rRemoveNotifyContainer.push_back( aEvent );
+
+ // Mark element as default and not modified. That means "not active"
+ // in the user layer anymore.
+ rElement.bModified = false;
+ rElement.bDefault = true;
+ }
+ }
+
+ ++pIter;
+ }
+
+ // Remove all settings from our user interface elements
+ rHashMap.clear();
+}
+
+void ModuleUIConfigurationManager::impl_reloadElementTypeData(
+ UIElementType& rUserElementType,
+ UIElementType& rDefaultElementType,
+ ConfigEventNotifyContainer& rRemoveNotifyContainer,
+ ConfigEventNotifyContainer& rReplaceNotifyContainer )
+{
+ UIElementDataHashMap& rHashMap = rUserElementType.aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rHashMap.begin();
+ Reference< XStorage > xUserStorage( rUserElementType.xStorage );
+ Reference< XStorage > xDefaultStorage( rDefaultElementType.xStorage );
+ Reference< XNameAccess > xUserNameAccess( rUserElementType.xStorage, UNO_QUERY );
+ Reference< XNameAccess > xDefaultNameAccess( rDefaultElementType.xStorage, UNO_QUERY );
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+ sal_Int16 nType = rUserElementType.nElementType;
+
+ while ( pIter != rHashMap.end() )
+ {
+ UIElementData& rElement = pIter->second;
+ if ( rElement.bModified )
+ {
+ if ( xUserNameAccess->hasByName( rElement.aName ))
+ {
+ // Replace settings with data from user layer
+ Reference< XIndexAccess > xOldSettings( rElement.xSettings );
+
+ impl_requestUIElementData( nType, LAYER_USERDEFINED, rElement );
+
+ ConfigurationEvent aReplaceEvent;
+
+ aReplaceEvent.ResourceURL = rElement.aResourceURL;
+ aReplaceEvent.Accessor <<= xThis;
+ aReplaceEvent.Source = xIfac;
+ aReplaceEvent.ReplacedElement <<= xOldSettings;
+ aReplaceEvent.Element <<= rElement.xSettings;
+ rReplaceNotifyContainer.push_back( aReplaceEvent );
+
+ rElement.bModified = false;
+ }
+ else if ( xDefaultNameAccess->hasByName( rElement.aName ))
+ {
+ // Replace settings with data from default layer
+ Reference< XIndexAccess > xOldSettings( rElement.xSettings );
+
+ impl_requestUIElementData( nType, LAYER_DEFAULT, rElement );
+
+ ConfigurationEvent aReplaceEvent;
+
+ aReplaceEvent.ResourceURL = rElement.aResourceURL;
+ aReplaceEvent.Accessor <<= xThis;
+ aReplaceEvent.Source = xIfac;
+ aReplaceEvent.ReplacedElement <<= xOldSettings;
+ aReplaceEvent.Element <<= rElement.xSettings;
+ rReplaceNotifyContainer.push_back( aReplaceEvent );
+
+ // Mark element as default and not modified. That means "not active"
+ // in the user layer anymore.
+ rElement.bModified = false;
+ rElement.bDefault = true;
+ }
+ else
+ {
+ // Element settings are not in any storage => remove
+ ConfigurationEvent aRemoveEvent;
+
+ aRemoveEvent.ResourceURL = rElement.aResourceURL;
+ aRemoveEvent.Accessor <<= xThis;
+ aRemoveEvent.Source = xIfac;
+ aRemoveEvent.Element <<= rElement.xSettings;
+
+ rRemoveNotifyContainer.push_back( aRemoveEvent );
+
+ // Mark element as default and not modified. That means "not active"
+ // in the user layer anymore.
+ rElement.bModified = false;
+ rElement.bDefault = true;
+ }
+ }
+ ++pIter;
+ }
+
+ rUserElementType.bModified = sal_False;
+}
+
+void ModuleUIConfigurationManager::impl_Initialize()
+{
+ // Initialize the top-level structures with the storage data
+ if ( m_xUserConfigStorage.is() )
+ {
+ // Try to access our module sub folder
+ for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT;
+ i++ )
+ {
+ Reference< XStorage > xElementTypeStorage;
+ try
+ {
+ if ( m_pStorageHandler[i] )
+ xElementTypeStorage = m_pStorageHandler[i]->getWorkingStorageUser();
+ }
+ catch ( com::sun::star::container::NoSuchElementException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::InvalidStorageException& )
+ {
+ }
+ catch ( ::com::sun::star::lang::IllegalArgumentException& )
+ {
+ }
+ catch ( ::com::sun::star::io::IOException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
+ {
+ }
+
+ m_aUIElements[LAYER_USERDEFINED][i].nElementType = i;
+ m_aUIElements[LAYER_USERDEFINED][i].bModified = false;
+ m_aUIElements[LAYER_USERDEFINED][i].xStorage = xElementTypeStorage;
+ m_aUIElements[LAYER_USERDEFINED][i].bDefaultLayer = false;
+ }
+ }
+
+ if ( m_xDefaultConfigStorage.is() )
+ {
+ Reference< XNameAccess > xNameAccess( m_xDefaultConfigStorage, UNO_QUERY_THROW );
+
+ // Try to access our module sub folder
+ for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT;
+ i++ )
+ {
+ Reference< XStorage > xElementTypeStorage;
+ try
+ {
+ Any a = xNameAccess->getByName( OUString::createFromAscii( UIELEMENTTYPENAMES[i] ));
+ a >>= xElementTypeStorage;
+ }
+ catch ( com::sun::star::container::NoSuchElementException& )
+ {
+ }
+
+ m_aUIElements[LAYER_DEFAULT][i].nElementType = i;
+ m_aUIElements[LAYER_DEFAULT][i].bModified = false;
+ m_aUIElements[LAYER_DEFAULT][i].xStorage = xElementTypeStorage;
+ m_aUIElements[LAYER_DEFAULT][i].bDefaultLayer = true;
+ }
+ }
+}
+
+ModuleUIConfigurationManager::ModuleUIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ) :
+ ThreadHelpBase( &Application::GetSolarMutex() )
+ , m_xDefaultConfigStorage( 0 )
+ , m_xUserConfigStorage( 0 )
+ , m_bReadOnly( true )
+ , m_bInitialized( false )
+ , m_bModified( false )
+ , m_bConfigRead( false )
+ , m_bDisposed( false )
+ , m_aXMLPostfix( RTL_CONSTASCII_USTRINGPARAM( ".xml" ))
+ , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))
+ , m_aPropResourceURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" ))
+ , m_xServiceManager( xServiceManager )
+ , m_aListenerContainer( m_aLock.getShareableOslMutex() )
+{
+ for ( int i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ m_pStorageHandler[i] = 0;
+
+ // Make sure we have a default initialized entry for every layer and user interface element type!
+ // The following code depends on this!
+ m_aUIElements[LAYER_DEFAULT].resize( ::com::sun::star::ui::UIElementType::COUNT );
+ m_aUIElements[LAYER_USERDEFINED].resize( ::com::sun::star::ui::UIElementType::COUNT );
}
ModuleUIConfigurationManager::~ModuleUIConfigurationManager()
{
+ for ( int i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ delete m_pStorageHandler[i];
}
// XComponent
void SAL_CALL ModuleUIConfigurationManager::dispose() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::dispose" );
- m_pImpl->dispose();
+ Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY );
+
+ css::lang::EventObject aEvent( xThis );
+ m_aListenerContainer.disposeAndClear( aEvent );
+
+ {
+ ResetableGuard aGuard( m_aLock );
+ try
+ {
+ if ( m_xModuleImageManager.is() )
+ m_xModuleImageManager->dispose();
+ }
+ catch ( Exception& )
+ {
+ }
+
+ m_xModuleImageManager.clear();
+ m_aUIElements[LAYER_USERDEFINED].clear();
+ m_aUIElements[LAYER_DEFAULT].clear();
+ m_xDefaultConfigStorage.clear();
+ m_xUserConfigStorage.clear();
+ m_xUserRootCommit.clear();
+ m_bConfigRead = false;
+ m_bModified = false;
+ m_bDisposed = true;
+ }
}
void SAL_CALL ModuleUIConfigurationManager::addEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::addEventListener" );
- m_pImpl->addEventListener(xListener);
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ if ( m_bDisposed )
+ throw DisposedException();
+ }
+
+ m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
}
void SAL_CALL ModuleUIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::removeEventListener" );
- m_pImpl->removeEventListener(xListener);
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
}
// XInitialization
void SAL_CALL ModuleUIConfigurationManager::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::initialize" );
- m_pImpl->initialize(aArguments);
+ ResetableGuard aLock( m_aLock );
+
+ if ( !m_bInitialized )
+ {
+ ::comphelper::SequenceAsHashMap lArgs(aArguments);
+ m_aModuleIdentifier = lArgs.getUnpackedValueOrDefault(::rtl::OUString::createFromAscii("ModuleIdentifier"), ::rtl::OUString());
+ m_aModuleShortName = lArgs.getUnpackedValueOrDefault(::rtl::OUString::createFromAscii("ModuleShortName"), ::rtl::OUString());
+
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ rtl::OUString aResourceType;
+ if ( i == ::com::sun::star::ui::UIElementType::MENUBAR )
+ aResourceType = PresetHandler::RESOURCETYPE_MENUBAR();
+ else if ( i == ::com::sun::star::ui::UIElementType::TOOLBAR )
+ aResourceType = PresetHandler::RESOURCETYPE_TOOLBAR();
+ else if ( i == ::com::sun::star::ui::UIElementType::STATUSBAR )
+ aResourceType = PresetHandler::RESOURCETYPE_STATUSBAR();
+
+ if ( aResourceType.getLength() > 0 )
+ {
+ m_pStorageHandler[i] = new PresetHandler( m_xServiceManager );
+ m_pStorageHandler[i]->connectToResource( PresetHandler::E_MODULES,
+ aResourceType, // this path wont be used later ... seee next lines!
+ m_aModuleShortName,
+ css::uno::Reference< css::embed::XStorage >()); // no document root used here!
+ }
+ }
+
+ // initialize root storages for all resource types
+ m_xUserRootCommit = css::uno::Reference< css::embed::XTransactedObject >(
+ m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getOrCreateRootStorageUser(), css::uno::UNO_QUERY); // can be empty
+ m_xDefaultConfigStorage = m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getParentStorageShare(
+ m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getWorkingStorageShare());
+ m_xUserConfigStorage = m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getParentStorageUser(
+ m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getWorkingStorageUser());
+
+ if ( m_xUserConfigStorage.is() )
+ {
+ Reference< XPropertySet > xPropSet( m_xUserConfigStorage, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ long nOpenMode = 0;
+ Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenMode" )));
+ if ( a >>= nOpenMode )
+ m_bReadOnly = !( nOpenMode & ElementModes::WRITE );
+ }
+ }
+
+ impl_Initialize();
+
+ m_bInitialized = true;
+ }
}
// XUIConfiguration
void SAL_CALL ModuleUIConfigurationManager::addConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::addConfigurationListener" );
- m_pImpl->addConfigurationListener(xListener);
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ if ( m_bDisposed )
+ throw DisposedException();
+ }
+
+ m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener );
}
void SAL_CALL ModuleUIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::removeConfigurationListener" );
- m_pImpl->removeConfigurationListener(xListener);
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener );
}
// XUIConfigurationManager
void SAL_CALL ModuleUIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::reset" );
- m_pImpl->reset();
+ ResetableGuard aGuard( m_aLock );
+
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ bool bResetStorage( false );
+
+ if ( !isReadOnly() )
+ {
+ // Remove all elements from our user-defined storage!
+ try
+ {
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i];
+ Reference< XStorage > xSubStorage( rElementType.xStorage, UNO_QUERY );
+
+ if ( xSubStorage.is() )
+ {
+ bool bCommitSubStorage( false );
+ Reference< XNameAccess > xSubStorageNameAccess( xSubStorage, UNO_QUERY );
+ Sequence< OUString > aUIElementStreamNames = xSubStorageNameAccess->getElementNames();
+ for ( sal_Int32 j = 0; j < aUIElementStreamNames.getLength(); j++ )
+ {
+ xSubStorage->removeElement( aUIElementStreamNames[j] );
+ bCommitSubStorage = true;
+ }
+
+ if ( bCommitSubStorage )
+ {
+ Reference< XTransactedObject > xTransactedObject( xSubStorage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+ m_pStorageHandler[i]->commitUserChanges();
+ }
+ }
+ }
+
+ bResetStorage = true;
+
+ // remove settings from user defined layer and notify listener about removed settings data!
+ ConfigEventNotifyContainer aRemoveEventNotifyContainer;
+ ConfigEventNotifyContainer aReplaceEventNotifyContainer;
+ for ( sal_Int16 j = 1; j < ::com::sun::star::ui::UIElementType::COUNT; j++ )
+ {
+ try
+ {
+ UIElementType& rUserElementType = m_aUIElements[LAYER_USERDEFINED][j];
+ UIElementType& rDefaultElementType = m_aUIElements[LAYER_DEFAULT][j];
+
+ impl_resetElementTypeData( rUserElementType, rDefaultElementType, aRemoveEventNotifyContainer, aReplaceEventNotifyContainer );
+ rUserElementType.bModified = sal_False;
+ }
+ catch ( Exception& )
+ {
+ throw IOException();
+ }
+ }
+
+ m_bModified = sal_False;
+
+ // Unlock mutex before notify our listeners
+ aGuard.unlock();
+
+ // Notify our listeners
+ sal_uInt32 k = 0;
+ for ( k = 0; k < aRemoveEventNotifyContainer.size(); k++ )
+ implts_notifyContainerListener( aRemoveEventNotifyContainer[k], NotifyOp_Remove );
+ for ( k = 0; k < aReplaceEventNotifyContainer.size(); k++ )
+ implts_notifyContainerListener( aReplaceEventNotifyContainer[k], NotifyOp_Replace );
+ }
+ catch ( ::com::sun::star::lang::IllegalArgumentException& )
+ {
+ }
+ catch ( ::com::sun::star::container::NoSuchElementException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::InvalidStorageException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
+ {
+ }
+ }
}
Sequence< Sequence< PropertyValue > > SAL_CALL ModuleUIConfigurationManager::getUIElementsInfo( sal_Int16 ElementType )
throw ( IllegalArgumentException, RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getUIElementsInfo" );
- return m_pImpl->getUIElementsInfo(ElementType);
+ if (( ElementType < 0 ) || ( ElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+
+ ResetableGuard aGuard( m_aLock );
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ Sequence< Sequence< PropertyValue > > aElementInfoSeq;
+ UIElementInfoHashMap aUIElementInfoCollection;
+
+ if ( ElementType == ::com::sun::star::ui::UIElementType::UNKNOWN )
+ {
+ for ( sal_Int16 i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, sal_Int16( i ) );
+ }
+ else
+ impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, ElementType );
+
+ Sequence< PropertyValue > aUIElementInfo( 2 );
+ aUIElementInfo[0].Name = m_aPropResourceURL;
+ aUIElementInfo[1].Name = m_aPropUIName;
+
+ aElementInfoSeq.realloc( aUIElementInfoCollection.size() );
+ UIElementInfoHashMap::const_iterator pIter = aUIElementInfoCollection.begin();
+
+ sal_Int32 n = 0;
+ while ( pIter != aUIElementInfoCollection.end() )
+ {
+ aUIElementInfo[0].Value <<= pIter->second.aResourceURL;
+ aUIElementInfo[1].Value <<= pIter->second.aUIName;
+ aElementInfoSeq[n++] = aUIElementInfo;
+ ++pIter;
+ }
+
+ return aElementInfoSeq;
}
Reference< XIndexContainer > SAL_CALL ModuleUIConfigurationManager::createSettings() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::createSettings" );
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
// Creates an empty item container which can be filled from outside
- return m_pImpl->createSettings();
+ return Reference< XIndexContainer >( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
}
sal_Bool SAL_CALL ModuleUIConfigurationManager::hasSettings( const ::rtl::OUString& ResourceURL )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::hasSettings" );
- return m_pImpl->hasSettings(ResourceURL);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType, false );
+ if ( pDataSettings )
+ return sal_True;
+ }
+
+ return sal_False;
}
Reference< XIndexAccess > SAL_CALL ModuleUIConfigurationManager::getSettings( const ::rtl::OUString& ResourceURL, sal_Bool bWriteable )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getSettings" );
- return m_pImpl->getSettings(ResourceURL,bWriteable);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType );
+ if ( pDataSettings )
+ {
+ // Create a copy of our data if someone wants to change the data.
+ if ( bWriteable )
+ return Reference< XIndexAccess >( static_cast< OWeakObject * >( new RootItemContainer( pDataSettings->xSettings ) ), UNO_QUERY );
+ else
+ return pDataSettings->xSettings;
+ }
+ }
+
+ throw NoSuchElementException();
}
void SAL_CALL ModuleUIConfigurationManager::replaceSettings( const ::rtl::OUString& ResourceURL, const Reference< ::com::sun::star::container::XIndexAccess >& aNewData )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::replaceSettings" );
- return m_pImpl->replaceSettings(ResourceURL,aNewData);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else if ( m_bReadOnly )
+ throw IllegalAccessException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType );
+ if ( pDataSettings )
+ {
+ if ( !pDataSettings->bDefaultNode )
+ {
+ // we have a settings entry in our user-defined layer - replace
+ Reference< XIndexAccess > xOldSettings = pDataSettings->xSettings;
+
+ // Create a copy of the data if the container is not const
+ Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
+ if ( xReplace.is() )
+ pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ else
+ pDataSettings->xSettings = aNewData;
+ pDataSettings->bDefault = false;
+ pDataSettings->bModified = true;
+ m_bModified = true;
+
+ // Modify type container
+ UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType];
+ rElementType.bModified = true;
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+
+ // Create event to notify listener about replaced element settings
+ ConfigurationEvent aEvent;
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ aEvent.ResourceURL = ResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.ReplacedElement <<= xOldSettings;
+ aEvent.Element <<= pDataSettings->xSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Replace );
+ }
+ else
+ {
+ // we have no settings in our user-defined layer - insert
+ UIElementData aUIElementData;
+
+ aUIElementData.bDefault = false;
+ aUIElementData.bDefaultNode = false;
+ aUIElementData.bModified = true;
+
+ // Create a copy of the data if the container is not const
+ Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
+ if ( xReplace.is() )
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ else
+ aUIElementData.xSettings = aNewData;
+ aUIElementData.aName = RetrieveNameFromResourceURL( ResourceURL ) + m_aXMLPostfix;
+ aUIElementData.aResourceURL = ResourceURL;
+ m_bModified = true;
+
+ // Modify type container
+ UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType];
+ rElementType.bModified = true;
+
+ UIElementDataHashMap& rElements = rElementType.aElementsHashMap;
+
+ // Check our user element settings hash map as it can already contain settings that have been set to default!
+ // If no node can be found, we have to insert it.
+ UIElementDataHashMap::iterator pIter = rElements.find( ResourceURL );
+ if ( pIter != rElements.end() )
+ pIter->second = aUIElementData;
+ else
+ rElements.insert( UIElementDataHashMap::value_type( ResourceURL, aUIElementData ));
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ // Create event to notify listener about replaced element settings
+ ConfigurationEvent aEvent;
+
+ aEvent.ResourceURL = ResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.ReplacedElement <<= pDataSettings->xSettings;
+ aEvent.Element <<= aUIElementData.xSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Replace );
+ }
+ }
+ else
+ throw NoSuchElementException();
+ }
}
void SAL_CALL ModuleUIConfigurationManager::removeSettings( const ::rtl::OUString& ResourceURL )
throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::removeSettings" );
- m_pImpl->removeSettings(ResourceURL);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else if ( m_bReadOnly )
+ throw IllegalAccessException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType );
+ if ( pDataSettings )
+ {
+ // If element settings are default, we don't need to change anything!
+ if ( pDataSettings->bDefault )
+ return;
+ else
+ {
+ Reference< XIndexAccess > xRemovedSettings = pDataSettings->xSettings;
+ pDataSettings->bDefault = true;
+
+ // check if this is a default layer node
+ if ( !pDataSettings->bDefaultNode )
+ pDataSettings->bModified = true; // we have to remove this node from the user layer!
+ pDataSettings->xSettings.clear();
+ m_bModified = true; // user layer must be written
+
+ // Modify type container
+ UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType];
+ rElementType.bModified = true;
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ // Check if we have settings in the default layer which replaces the user-defined one!
+ UIElementData* pDefaultDataSettings = impl_findUIElementData( ResourceURL, nElementType );
+ if ( pDefaultDataSettings )
+ {
+ // Create event to notify listener about replaced element settings
+ ConfigurationEvent aEvent;
+
+ aEvent.ResourceURL = ResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.Element <<= xRemovedSettings;
+ aEvent.ReplacedElement <<= pDefaultDataSettings->xSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Replace );
+ }
+ else
+ {
+ // Create event to notify listener about removed element settings
+ ConfigurationEvent aEvent;
+
+ aEvent.ResourceURL = ResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.Element <<= xRemovedSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Remove );
+ }
+ }
+ }
+ else
+ throw NoSuchElementException();
+ }
}
void SAL_CALL ModuleUIConfigurationManager::insertSettings( const ::rtl::OUString& NewResourceURL, const Reference< XIndexAccess >& aNewData )
throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, RuntimeException )
{
- m_pImpl->insertSettings(NewResourceURL,aNewData);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( NewResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else if ( m_bReadOnly )
+ throw IllegalAccessException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( NewResourceURL, nElementType );
+ if ( !pDataSettings )
+ {
+ UIElementData aUIElementData;
+
+ aUIElementData.bDefault = false;
+ aUIElementData.bDefaultNode = false;
+ aUIElementData.bModified = true;
+
+ // Create a copy of the data if the container is not const
+ Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
+ if ( xReplace.is() )
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ else
+ aUIElementData.xSettings = aNewData;
+ aUIElementData.aName = RetrieveNameFromResourceURL( NewResourceURL ) + m_aXMLPostfix;
+ aUIElementData.aResourceURL = NewResourceURL;
+ m_bModified = true;
+
+ UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType];
+ rElementType.bModified = true;
+
+ UIElementDataHashMap& rElements = rElementType.aElementsHashMap;
+ rElements.insert( UIElementDataHashMap::value_type( NewResourceURL, aUIElementData ));
+
+ Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings );
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ // Create event to notify listener about removed element settings
+ ConfigurationEvent aEvent;
+
+ aEvent.ResourceURL = NewResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.Element <<= xInsertSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Insert );
+ }
+ else
+ throw ElementExistException();
+ }
}
Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getImageManager" );
- return m_pImpl->getImageManager();
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( !m_xModuleImageManager.is() )
+ {
+ m_xModuleImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ModuleImageManager( m_xServiceManager )),
+ UNO_QUERY );
+ Reference< XInitialization > xInit( m_xModuleImageManager, UNO_QUERY );
+
+ Sequence< Any > aPropSeq( 3 );
+ PropertyValue aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserConfigStorage" ));
+ aPropValue.Value = makeAny( m_xUserConfigStorage );
+ aPropSeq[0] = makeAny( aPropValue );
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
+ aPropValue.Value = makeAny( m_aModuleIdentifier );
+ aPropSeq[1] = makeAny( aPropValue );
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserRootCommit" ));
+ aPropValue.Value = makeAny( m_xUserRootCommit );
+ aPropSeq[2] = makeAny( aPropValue );
+
+ xInit->initialize( aPropSeq );
+ }
+
+ return Reference< XInterface >( m_xModuleImageManager, UNO_QUERY );
+
+// return Reference< XInterface >();
}
Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getShortCutManager" );
- return m_pImpl->getShortCutManager();
+ ResetableGuard aGuard( m_aLock );
+ Reference< XMultiServiceFactory > xSMGR = m_xServiceManager;
+ ::rtl::OUString aModule = /*m_aModuleShortName*/m_aModuleIdentifier;
+ aGuard.unlock();
+
+ Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION);
+ Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW);
+
+ PropertyValue aProp;
+ aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier");
+ aProp.Value <<= aModule;
+
+ Sequence< Any > lArgs(1);
+ lArgs[0] <<= aProp;
+
+ xInit->initialize(lArgs);
+
+ return xManager;
}
Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getEventsManager" );
return Reference< XInterface >();
}
@@ -242,46 +1406,210 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getEventsManager(
sal_Bool SAL_CALL ModuleUIConfigurationManager::isDefaultSettings( const ::rtl::OUString& ResourceURL )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::isDefaultSettings" );
- return m_pImpl->isDefaultSettings(ResourceURL);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType, false );
+ if ( pDataSettings && pDataSettings->bDefaultNode )
+ return sal_True;
+ }
+
+ return sal_False;
}
Reference< XIndexAccess > SAL_CALL ModuleUIConfigurationManager::getDefaultSettings( const ::rtl::OUString& ResourceURL )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getDefaultSettings" );
- return m_pImpl->getDefaultSettings(ResourceURL);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ // preload list of element types on demand
+ impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType );
+
+ // Look into our default vector/hash_map combination
+ UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rDefaultHashMap.find( ResourceURL );
+ if ( pIter != rDefaultHashMap.end() )
+ {
+ if ( !pIter->second.xSettings.is() )
+ impl_requestUIElementData( nElementType, LAYER_DEFAULT, pIter->second );
+ return pIter->second.xSettings;
+ }
+ }
+
+ // Nothing has been found!
+ throw NoSuchElementException();
}
// XUIConfigurationPersistence
void SAL_CALL ModuleUIConfigurationManager::reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::reload" );
- m_pImpl->reload();
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly )
+ {
+ // Try to access our module sub folder
+ ConfigEventNotifyContainer aRemoveNotifyContainer;
+ ConfigEventNotifyContainer aReplaceNotifyContainer;
+ for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ try
+ {
+ UIElementType& rUserElementType = m_aUIElements[LAYER_USERDEFINED][i];
+ UIElementType& rDefaultElementType = m_aUIElements[LAYER_DEFAULT][i];
+
+ if ( rUserElementType.bModified )
+ impl_reloadElementTypeData( rUserElementType, rDefaultElementType, aRemoveNotifyContainer, aReplaceNotifyContainer );
+ }
+ catch ( Exception& )
+ {
+ throw IOException();
+ }
+ }
+
+ m_bModified = sal_False;
+
+ // Unlock mutex before notify our listeners
+ aGuard.unlock();
+
+ // Notify our listeners
+ for ( sal_uInt32 j = 0; j < aRemoveNotifyContainer.size(); j++ )
+ implts_notifyContainerListener( aRemoveNotifyContainer[j], NotifyOp_Remove );
+ for ( sal_uInt32 k = 0; k < aReplaceNotifyContainer.size(); k++ )
+ implts_notifyContainerListener( aReplaceNotifyContainer[k], NotifyOp_Replace );
+ }
}
void SAL_CALL ModuleUIConfigurationManager::store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::store" );
- m_pImpl->store();
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly )
+ {
+ // Try to access our module sub folder
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ try
+ {
+ UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i];
+ Reference< XStorage > xStorage( rElementType.xStorage, UNO_QUERY );
+
+ if ( rElementType.bModified && xStorage.is() )
+ {
+ impl_storeElementTypeData( xStorage, rElementType );
+ m_pStorageHandler[i]->commitUserChanges();
+ }
+ }
+ catch ( Exception& )
+ {
+ throw IOException();
+ }
+ }
+
+ m_bModified = false;
+ }
}
void SAL_CALL ModuleUIConfigurationManager::storeToStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::storeToStorage" );
- m_pImpl->storeToStorage(Storage);
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly )
+ {
+ // Try to access our module sub folder
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ try
+ {
+ Reference< XStorage > xElementTypeStorage( Storage->openStorageElement(
+ OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), ElementModes::READWRITE ));
+ UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i];
+
+ if ( rElementType.bModified && xElementTypeStorage.is() )
+ impl_storeElementTypeData( xElementTypeStorage, rElementType, false ); // store data to storage, but don't reset modify flag!
+ }
+ catch ( Exception& )
+ {
+ throw IOException();
+ }
+ }
+
+ Reference< XTransactedObject > xTransactedObject( Storage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+ }
}
sal_Bool SAL_CALL ModuleUIConfigurationManager::isModified() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::isModified" );
- return m_pImpl->isModified();
+ ResetableGuard aGuard( m_aLock );
+
+ return m_bModified;
}
sal_Bool SAL_CALL ModuleUIConfigurationManager::isReadOnly() throw (::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::isReadOnly" );
- return m_pImpl->isReadOnly();
+ ResetableGuard aGuard( m_aLock );
+
+ return m_bReadOnly;
+}
+
+void ModuleUIConfigurationManager::implts_notifyContainerListener( const ConfigurationEvent& aEvent, NotifyOp eOp )
+{
+ ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >*) NULL ) );
+ if ( pContainer != NULL )
+ {
+ ::cppu::OInterfaceIteratorHelper pIterator( *pContainer );
+ while ( pIterator.hasMoreElements() )
+ {
+ try
+ {
+ switch ( eOp )
+ {
+ case NotifyOp_Replace:
+ ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementReplaced( aEvent );
+ break;
+ case NotifyOp_Insert:
+ ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementInserted( aEvent );
+ break;
+ case NotifyOp_Remove:
+ ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementRemoved( aEvent );
+ break;
+ }
+ }
+ catch( css::uno::RuntimeException& )
+ {
+ pIterator.remove();
+ }
+ }
+ }
}
} // namespace framework
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 67049d9eb4dc..3309333fb327 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -38,7 +38,6 @@
#include <uielement/uielementtypenames.hxx>
#include <xml/menuconfiguration.hxx>
#include <xml/toolboxconfiguration.hxx>
-#include <uiconfigurationmanagerimpl.hxx>
#ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_
#include <xml/statusbarconfiguration.hxx>
@@ -111,9 +110,511 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( UIConfigurationManager
DEFINE_INIT_SERVICE ( UIConfigurationManager, {} )
-UIConfigurationManager::UIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager )
-: m_pImpl( new UIConfigurationManagerImpl(xServiceManager,static_cast< OWeakObject* >(this),false) )
+
+// important: The order and position of the elements must match the constant
+// definition of "::com::sun::star::ui::UIElementType"
+static const char* UIELEMENTTYPENAMES[] =
+{
+ "", // Dummy value for unknown!
+ UIELEMENTTYPE_MENUBAR_NAME,
+ UIELEMENTTYPE_POPUPMENU_NAME,
+ UIELEMENTTYPE_TOOLBAR_NAME,
+ UIELEMENTTYPE_STATUSBAR_NAME,
+ UIELEMENTTYPE_FLOATINGWINDOW_NAME,
+ UIELEMENTTYPE_PROGRESSBAR_NAME
+};
+
+static const char RESOURCEURL_PREFIX[] = "private:resource/";
+static const sal_Int32 RESOURCEURL_PREFIX_SIZE = 17;
+
+static sal_Int16 RetrieveTypeFromResourceURL( const rtl::OUString& aResourceURL )
+{
+
+ if (( aResourceURL.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) &&
+ ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE ))
+ {
+ rtl::OUString aTmpStr = aResourceURL.copy( RESOURCEURL_PREFIX_SIZE );
+ sal_Int32 nIndex = aTmpStr.indexOf( '/' );
+ if (( nIndex > 0 ) && ( aTmpStr.getLength() > nIndex ))
+ {
+ rtl::OUString aTypeStr( aTmpStr.copy( 0, nIndex ));
+ for ( int i = 0; i < UIElementType::COUNT; i++ )
+ {
+ if ( aTypeStr.equalsAscii( UIELEMENTTYPENAMES[i] ))
+ return sal_Int16( i );
+ }
+ }
+ }
+
+ return UIElementType::UNKNOWN;
+}
+
+static rtl::OUString RetrieveNameFromResourceURL( const rtl::OUString& aResourceURL )
+{
+ if (( aResourceURL.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) &&
+ ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE ))
+ {
+ sal_Int32 nIndex = aResourceURL.lastIndexOf( '/' );
+ if (( nIndex > 0 ) && (( nIndex+1 ) < aResourceURL.getLength()))
+ return aResourceURL.copy( nIndex+1 );
+ }
+
+ return rtl::OUString();
+}
+
+void UIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType )
{
+ // preload list of element types on demand
+ impl_preloadUIElementTypeList( nElementType );
+
+ UIElementDataHashMap& rUserElements = m_aUIElements[nElementType].aElementsHashMap;
+ UIElementDataHashMap::const_iterator pUserIter = rUserElements.begin();
+
+ while ( pUserIter != rUserElements.end() )
+ {
+ UIElementData* pDataSettings = impl_findUIElementData( pUserIter->second.aResourceURL, nElementType );
+ if ( pDataSettings && !pDataSettings->bDefault )
+ {
+ // Retrieve user interface name from XPropertySet interface
+ rtl::OUString aUIName;
+ Reference< XPropertySet > xPropSet( pDataSettings->xSettings, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ Any a = xPropSet->getPropertyValue( m_aPropUIName );
+ a >>= aUIName;
+ }
+
+ UIElementInfo aInfo( pUserIter->second.aResourceURL, aUIName );
+ aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo ));
+ }
+ ++pUserIter;
+ }
+}
+
+void UIConfigurationManager::impl_preloadUIElementTypeList( sal_Int16 nElementType )
+{
+ UIElementType& rElementTypeData = m_aUIElements[nElementType];
+
+ if ( !rElementTypeData.bLoaded )
+ {
+ Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage;
+ if ( xElementTypeStorage.is() )
+ {
+ rtl::OUStringBuffer aBuf( RESOURCEURL_PREFIX_SIZE );
+ aBuf.appendAscii( RESOURCEURL_PREFIX );
+ aBuf.appendAscii( UIELEMENTTYPENAMES[ nElementType ] );
+ aBuf.appendAscii( "/" );
+ rtl::OUString aResURLPrefix( aBuf.makeStringAndClear() );
+
+ UIElementDataHashMap& rHashMap = rElementTypeData.aElementsHashMap;
+ Reference< XNameAccess > xNameAccess( xElementTypeStorage, UNO_QUERY );
+ Sequence< rtl::OUString > aUIElementNames = xNameAccess->getElementNames();
+ for ( sal_Int32 n = 0; n < aUIElementNames.getLength(); n++ )
+ {
+ UIElementData aUIElementData;
+
+ // Resource name must be without ".xml"
+ sal_Int32 nIndex = aUIElementNames[n].lastIndexOf( '.' );
+ if (( nIndex > 0 ) && ( nIndex < aUIElementNames[n].getLength() ))
+ {
+ rtl::OUString aExtension( aUIElementNames[n].copy( nIndex+1 ));
+ rtl::OUString aUIElementName( aUIElementNames[n].copy( 0, nIndex ));
+
+ if (( aUIElementName.getLength() > 0 ) &&
+ ( aExtension.equalsIgnoreAsciiCaseAsciiL( "xml", 3 )))
+ {
+ aUIElementData.aResourceURL = aResURLPrefix + aUIElementName;
+ aUIElementData.aName = aUIElementNames[n];
+ aUIElementData.bModified = false;
+ aUIElementData.bDefault = false;
+
+ // Create hash_map entries for all user interface elements inside the storage. We don't load the
+ // settings to speed up the process.
+ rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData ));
+ }
+ }
+ }
+ }
+ }
+
+ rElementTypeData.bLoaded = true;
+}
+
+void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData )
+{
+ UIElementType& rElementTypeData = m_aUIElements[nElementType];
+
+ Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage;
+ if ( xElementTypeStorage.is() && aUIElementData.aName.getLength() )
+ {
+ try
+ {
+ Reference< XStream > xStream = xElementTypeStorage->openStreamElement( aUIElementData.aName, ElementModes::READ );
+ Reference< XInputStream > xInputStream = xStream->getInputStream();
+
+ if ( xInputStream.is() )
+ {
+ switch ( nElementType )
+ {
+ case ::com::sun::star::ui::UIElementType::UNKNOWN:
+ break;
+
+ case ::com::sun::star::ui::UIElementType::MENUBAR:
+ {
+ try
+ {
+ MenuConfiguration aMenuCfg( m_xServiceManager );
+ Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream ));
+ RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xContainer );
+ if ( pRootItemContainer )
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
+ else
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, sal_True ) ), UNO_QUERY );
+ return;
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ case ::com::sun::star::ui::UIElementType::POPUPMENU:
+ {
+ break;
+ }
+
+ case ::com::sun::star::ui::UIElementType::TOOLBAR:
+ {
+ try
+ {
+ Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
+ ToolBoxConfiguration::LoadToolBox( m_xServiceManager, xInputStream, xIndexContainer );
+ RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
+ return;
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+
+ break;
+ }
+
+ case ::com::sun::star::ui::UIElementType::STATUSBAR:
+ {
+ try
+ {
+ Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
+ StatusBarConfiguration::LoadStatusBar( m_xServiceManager, xInputStream, xIndexContainer );
+ RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
+ return;
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+
+ break;
+ }
+
+ case ::com::sun::star::ui::UIElementType::FLOATINGWINDOW:
+ {
+ break;
+ }
+ }
+ }
+ }
+ catch ( ::com::sun::star::embed::InvalidStorageException& )
+ {
+ }
+ catch ( ::com::sun::star::lang::IllegalArgumentException& )
+ {
+ }
+ catch ( ::com::sun::star::io::IOException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
+ {
+ }
+ }
+
+ // At least we provide an empty settings container!
+ aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer()), UNO_QUERY );
+}
+
+UIConfigurationManager::UIElementData* UIConfigurationManager::impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad )
+{
+ // preload list of element types on demand
+ impl_preloadUIElementTypeList( nElementType );
+
+ // try to look into our document vector/hash_map combination
+ UIElementDataHashMap& rUserHashMap = m_aUIElements[nElementType].aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rUserHashMap.find( aResourceURL );
+ if ( pIter != rUserHashMap.end() )
+ {
+ // Default data settings data means removed!
+ if ( pIter->second.bDefault )
+ return &(pIter->second);
+ else
+ {
+ if ( !pIter->second.xSettings.is() && bLoad )
+ impl_requestUIElementData( nElementType, pIter->second );
+ return &(pIter->second);
+ }
+ }
+
+ // Nothing has been found!
+ return NULL;
+}
+
+void UIConfigurationManager::impl_storeElementTypeData( Reference< XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState )
+{
+ UIElementDataHashMap& rHashMap = rElementType.aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rHashMap.begin();
+
+ while ( pIter != rHashMap.end() )
+ {
+ UIElementData& rElement = pIter->second;
+ if ( rElement.bModified )
+ {
+ if ( rElement.bDefault )
+ {
+ xStorage->removeElement( rElement.aName );
+ rElement.bModified = sal_False; // mark as not modified
+ }
+ else
+ {
+ Reference< XStream > xStream( xStorage->openStreamElement( rElement.aName, ElementModes::WRITE|ElementModes::TRUNCATE ), UNO_QUERY );
+ Reference< XOutputStream > xOutputStream( xStream->getOutputStream() );
+
+ if ( xOutputStream.is() )
+ {
+ switch( rElementType.nElementType )
+ {
+ case ::com::sun::star::ui::UIElementType::MENUBAR:
+ {
+ try
+ {
+ MenuConfiguration aMenuCfg( m_xServiceManager );
+ aMenuCfg.StoreMenuBarConfigurationToXML( rElement.xSettings, xOutputStream );
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ case ::com::sun::star::ui::UIElementType::TOOLBAR:
+ {
+ try
+ {
+ ToolBoxConfiguration::StoreToolBox( m_xServiceManager, xOutputStream, rElement.xSettings );
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ case ::com::sun::star::ui::UIElementType::STATUSBAR:
+ {
+ try
+ {
+ StatusBarConfiguration::StoreStatusBar( m_xServiceManager, xOutputStream, rElement.xSettings );
+ }
+ catch ( ::com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // mark as not modified if we store to our own storage
+ if ( bResetModifyState )
+ rElement.bModified = sal_False;
+ }
+ }
+
+ ++pIter;
+ }
+
+ // commit element type storage
+ Reference< XTransactedObject > xTransactedObject( xStorage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+
+ // mark UIElementType as not modified if we store to our own storage
+ if ( bResetModifyState )
+ rElementType.bModified = sal_False;
+}
+
+void UIConfigurationManager::impl_resetElementTypeData(
+ UIElementType& rDocElementType,
+ ConfigEventNotifyContainer& rRemoveNotifyContainer )
+{
+ UIElementDataHashMap& rHashMap = rDocElementType.aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rHashMap.begin();
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ // Make copies of the event structures to be thread-safe. We have to unlock our mutex before calling
+ // our listeners!
+ while ( pIter != rHashMap.end() )
+ {
+ UIElementData& rElement = pIter->second;
+ if ( !rElement.bDefault )
+ {
+ // Remove user-defined settings from document
+ ConfigurationEvent aEvent;
+ aEvent.ResourceURL = rElement.aResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.Element <<= rElement.xSettings;
+
+ rRemoveNotifyContainer.push_back( aEvent );
+
+ // Mark element as default.
+ rElement.bModified = false;
+ rElement.bDefault = true;
+ }
+ else
+ rElement.bModified = false;
+
+ ++pIter;
+ }
+
+ // Remove all settings from our user interface elements
+ rHashMap.clear();
+}
+
+void UIConfigurationManager::impl_reloadElementTypeData(
+ UIElementType& rDocElementType,
+ ConfigEventNotifyContainer& rRemoveNotifyContainer,
+ ConfigEventNotifyContainer& rReplaceNotifyContainer )
+{
+ UIElementDataHashMap& rHashMap = rDocElementType.aElementsHashMap;
+ UIElementDataHashMap::iterator pIter = rHashMap.begin();
+ Reference< XStorage > xElementStorage( rDocElementType.xStorage );
+ Reference< XNameAccess > xElementNameAccess( xElementStorage, UNO_QUERY );
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+ sal_Int16 nType = rDocElementType.nElementType;
+
+ while ( pIter != rHashMap.end() )
+ {
+ UIElementData& rElement = pIter->second;
+ if ( rElement.bModified )
+ {
+ if ( xElementNameAccess->hasByName( rElement.aName ))
+ {
+ // Replace settings with data from user layer
+ Reference< XIndexAccess > xOldSettings( rElement.xSettings );
+
+ impl_requestUIElementData( nType, rElement );
+
+ ConfigurationEvent aReplaceEvent;
+
+ aReplaceEvent.ResourceURL = rElement.aResourceURL;
+ aReplaceEvent.Accessor <<= xThis;
+ aReplaceEvent.Source = xIfac;
+ aReplaceEvent.ReplacedElement <<= xOldSettings;
+ aReplaceEvent.Element <<= rElement.xSettings;
+ rReplaceNotifyContainer.push_back( aReplaceEvent );
+
+ rElement.bModified = false;
+ }
+ else
+ {
+ // Element settings are not in any storage => remove
+ ConfigurationEvent aRemoveEvent;
+
+ aRemoveEvent.ResourceURL = rElement.aResourceURL;
+ aRemoveEvent.Accessor <<= xThis;
+ aRemoveEvent.Source = xIfac;
+ aRemoveEvent.Element <<= rElement.xSettings;
+
+ rRemoveNotifyContainer.push_back( aRemoveEvent );
+
+ // Mark element as default and not modified. That means "not active" in the document anymore
+ rElement.bModified = false;
+ rElement.bDefault = true;
+ }
+ }
+ ++pIter;
+ }
+
+ rDocElementType.bModified = sal_False;
+}
+
+void UIConfigurationManager::impl_Initialize()
+{
+ // Initialize the top-level structures with the storage data
+ if ( m_xDocConfigStorage.is() )
+ {
+ long nModes = m_bReadOnly ? ElementModes::READ : ElementModes::READWRITE;
+
+ // Try to access our module sub folder
+ for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT;
+ i++ )
+ {
+ Reference< XStorage > xElementTypeStorage;
+ try
+ {
+ xElementTypeStorage = m_xDocConfigStorage->openStorageElement( rtl::OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), nModes );
+ }
+ catch ( com::sun::star::container::NoSuchElementException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::InvalidStorageException& )
+ {
+ }
+ catch ( ::com::sun::star::lang::IllegalArgumentException& )
+ {
+ }
+ catch ( ::com::sun::star::io::IOException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
+ {
+ }
+
+ m_aUIElements[i].nElementType = i;
+ m_aUIElements[i].bModified = false;
+ m_aUIElements[i].xStorage = xElementTypeStorage;
+ m_aUIElements[i].bDefaultLayer = false;
+ }
+ }
+ else
+ {
+ // We have no storage, just initialize ui element types with empty storage!
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ m_aUIElements[i].xStorage = m_xDocConfigStorage;
+ }
+}
+
+UIConfigurationManager::UIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ) :
+ ThreadHelpBase( &Application::GetSolarMutex() )
+ , m_xDocConfigStorage( 0 )
+ , m_bReadOnly( true )
+ , m_bInitialized( false )
+ , m_bModified( false )
+ , m_bConfigRead( false )
+ , m_bDisposed( false )
+ , m_aXMLPostfix( RTL_CONSTASCII_USTRINGPARAM( ".xml" ))
+ , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))
+ , m_aPropResourceURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" ))
+ , m_xServiceManager( xServiceManager )
+ , m_aListenerContainer( m_aLock.getShareableOslMutex() )
+{
+ // Make sure we have a default initialized entry for every layer and user interface element type!
+ // The following code depends on this!
+ m_aUIElements.resize( ::com::sun::star::ui::UIElementType::COUNT );
}
UIConfigurationManager::~UIConfigurationManager()
@@ -123,86 +624,507 @@ UIConfigurationManager::~UIConfigurationManager()
// XComponent
void SAL_CALL UIConfigurationManager::dispose() throw (::com::sun::star::uno::RuntimeException)
{
- m_pImpl->dispose();
+ Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY );
+
+ css::lang::EventObject aEvent( xThis );
+ m_aListenerContainer.disposeAndClear( aEvent );
+
+ {
+ ResetableGuard aGuard( m_aLock );
+ try
+ {
+ if ( m_xImageManager.is() )
+ m_xImageManager->dispose();
+ }
+ catch ( Exception& )
+ {
+ }
+
+ m_xImageManager.clear();
+ m_aUIElements.clear();
+ m_xDocConfigStorage.clear();
+ m_bConfigRead = false;
+ m_bModified = false;
+ m_bDisposed = true;
+ }
}
void SAL_CALL UIConfigurationManager::addEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
+ {
+ ResetableGuard aGuard( m_aLock );
- m_pImpl->addEventListener(xListener);
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ if ( m_bDisposed )
+ throw DisposedException();
+ }
+
+ m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
}
void SAL_CALL UIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
- m_pImpl->removeEventListener(xListener);
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
}
// XUIConfigurationManager
void SAL_CALL UIConfigurationManager::addConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
- m_pImpl->addConfigurationListener(xListener);
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ if ( m_bDisposed )
+ throw DisposedException();
+ }
+
+ m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener );
}
void SAL_CALL UIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
{
- m_pImpl->removeConfigurationListener(xListener);
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener );
}
void SAL_CALL UIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException)
{
- m_pImpl->reset();
+ ResetableGuard aGuard( m_aLock );
+
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( isReadOnly() )
+ return;
+
+ bool bResetStorage( false );
+ if ( m_xDocConfigStorage.is() )
+ {
+ try
+ {
+ // Remove all elements from our user-defined storage!
+ bool bCommit( false );
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ UIElementType& rElementType = m_aUIElements[i];
+ Reference< XStorage > xSubStorage( rElementType.xStorage, UNO_QUERY );
+
+ if ( xSubStorage.is() )
+ {
+ bool bCommitSubStorage( false );
+ Reference< XNameAccess > xSubStorageNameAccess( xSubStorage, UNO_QUERY );
+ Sequence< rtl::OUString > aUIElementStreamNames = xSubStorageNameAccess->getElementNames();
+ for ( sal_Int32 j = 0; j < aUIElementStreamNames.getLength(); j++ )
+ {
+ xSubStorage->removeElement( aUIElementStreamNames[j] );
+ bCommitSubStorage = true;
+ bCommit = true;
+ }
+
+ if ( bCommitSubStorage )
+ {
+ Reference< XTransactedObject > xTransactedObject( xSubStorage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+ }
+ }
+ }
+
+ // Commit changes
+ if ( bCommit )
+ {
+ Reference< XTransactedObject > xTransactedObject( m_xDocConfigStorage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+ }
+ bResetStorage = true;
+
+ // remove settings from user defined layer and notify listener about removed settings data!
+ // Try to access our module sub folder
+ ConfigEventNotifyContainer aRemoveEventNotifyContainer;
+ for ( sal_Int16 j = 1; j < ::com::sun::star::ui::UIElementType::COUNT; j++ )
+ {
+ UIElementType& rDocElementType = m_aUIElements[j];
+
+ impl_resetElementTypeData( rDocElementType, aRemoveEventNotifyContainer );
+ rDocElementType.bModified = sal_False;
+ }
+
+ m_bModified = sal_False;
+
+ // Unlock mutex before notify our listeners
+ aGuard.unlock();
+
+ // Notify our listeners
+ for ( sal_uInt32 k = 0; k < aRemoveEventNotifyContainer.size(); k++ )
+ implts_notifyContainerListener( aRemoveEventNotifyContainer[k], NotifyOp_Remove );
+ }
+ catch ( ::com::sun::star::lang::IllegalArgumentException& )
+ {
+ }
+ catch ( ::com::sun::star::container::NoSuchElementException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::InvalidStorageException& )
+ {
+ }
+ catch ( ::com::sun::star::embed::StorageWrappedTargetException& )
+ {
+ }
+ }
}
Sequence< Sequence< PropertyValue > > SAL_CALL UIConfigurationManager::getUIElementsInfo( sal_Int16 ElementType )
throw ( IllegalArgumentException, RuntimeException )
{
- return m_pImpl->getUIElementsInfo(ElementType);
+ if (( ElementType < 0 ) || ( ElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+
+ ResetableGuard aGuard( m_aLock );
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ Sequence< Sequence< PropertyValue > > aElementInfoSeq;
+ UIElementInfoHashMap aUIElementInfoCollection;
+
+ if ( ElementType == ::com::sun::star::ui::UIElementType::UNKNOWN )
+ {
+ for ( sal_Int16 i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, sal_Int16( i ) );
+ }
+ else
+ impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, ElementType );
+
+ Sequence< PropertyValue > aUIElementInfo( 2 );
+ aUIElementInfo[0].Name = m_aPropResourceURL;
+ aUIElementInfo[1].Name = m_aPropUIName;
+
+ aElementInfoSeq.realloc( aUIElementInfoCollection.size() );
+ UIElementInfoHashMap::const_iterator pIter = aUIElementInfoCollection.begin();
+
+ sal_Int32 n = 0;
+ while ( pIter != aUIElementInfoCollection.end() )
+ {
+ aUIElementInfo[0].Value <<= pIter->second.aResourceURL;
+ aUIElementInfo[1].Value <<= pIter->second.aUIName;
+ aElementInfoSeq[n++] = aUIElementInfo;
+ ++pIter;
+ }
+
+ return aElementInfoSeq;
}
Reference< XIndexContainer > SAL_CALL UIConfigurationManager::createSettings() throw (::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->createSettings();
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ // Creates an empty item container which can be filled from outside
+ return Reference< XIndexContainer >( static_cast< OWeakObject * >( new RootItemContainer()), UNO_QUERY );
}
sal_Bool SAL_CALL UIConfigurationManager::hasSettings( const ::rtl::OUString& ResourceURL )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->hasSettings(ResourceURL);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else
+ {
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType, false );
+ if ( pDataSettings && !pDataSettings->bDefault )
+ return sal_True;
+ }
+
+ return sal_False;
}
Reference< XIndexAccess > SAL_CALL UIConfigurationManager::getSettings( const ::rtl::OUString& ResourceURL, sal_Bool bWriteable )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->getSettings(ResourceURL,bWriteable);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType );
+ if ( pDataSettings && !pDataSettings->bDefault )
+ {
+ // Create a copy of our data if someone wants to change the data.
+ if ( bWriteable )
+ return Reference< XIndexAccess >( static_cast< OWeakObject * >( new RootItemContainer( pDataSettings->xSettings ) ), UNO_QUERY );
+ else
+ return pDataSettings->xSettings;
+ }
+ }
+
+ throw NoSuchElementException();
}
void SAL_CALL UIConfigurationManager::replaceSettings( const ::rtl::OUString& ResourceURL, const Reference< ::com::sun::star::container::XIndexAccess >& aNewData )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->replaceSettings(ResourceURL,aNewData);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else if ( m_bReadOnly )
+ throw IllegalAccessException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType );
+ if ( pDataSettings && !pDataSettings->bDefault )
+ {
+ // we have a settings entry in our user-defined layer - replace
+ Reference< XIndexAccess > xOldSettings = pDataSettings->xSettings;
+
+ // Create a copy of the data if the container is not const
+ Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
+ if ( xReplace.is() )
+ pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ else
+ pDataSettings->xSettings = aNewData;
+
+ pDataSettings->bDefault = false;
+ pDataSettings->bModified = true;
+ m_bModified = true;
+
+ // Modify type container
+ UIElementType& rElementType = m_aUIElements[nElementType];
+ rElementType.bModified = true;
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+
+ // Create event to notify listener about replaced element settings
+ ConfigurationEvent aEvent;
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ aEvent.ResourceURL = ResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.ReplacedElement <<= xOldSettings;
+ aEvent.Element <<= pDataSettings->xSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Replace );
+ }
+ else
+ throw NoSuchElementException();
+ }
}
void SAL_CALL UIConfigurationManager::removeSettings( const ::rtl::OUString& ResourceURL )
throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException, RuntimeException)
{
- m_pImpl->removeSettings(ResourceURL);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else if ( m_bReadOnly )
+ throw IllegalAccessException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType );
+ if ( pDataSettings )
+ {
+ // If element settings are default, we don't need to change anything!
+ if ( pDataSettings->bDefault )
+ return;
+ else
+ {
+ Reference< XIndexAccess > xRemovedSettings = pDataSettings->xSettings;
+ pDataSettings->bDefault = true;
+
+ // check if this is a default layer node
+ pDataSettings->bModified = true; // we have to remove this node from the user layer!
+ pDataSettings->xSettings.clear();
+ m_bModified = true; // user layer must be written
+
+ // Modify type container
+ UIElementType& rElementType = m_aUIElements[nElementType];
+ rElementType.bModified = true;
+
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ // Create event to notify listener about removed element settings
+ ConfigurationEvent aEvent;
+
+ aEvent.ResourceURL = ResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.Element <<= xRemovedSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Remove );
+ }
+ }
+ else
+ throw NoSuchElementException();
+ }
}
void SAL_CALL UIConfigurationManager::insertSettings( const ::rtl::OUString& NewResourceURL, const Reference< XIndexAccess >& aNewData )
throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, RuntimeException )
{
- m_pImpl->insertSettings(NewResourceURL,aNewData);
+ sal_Int16 nElementType = RetrieveTypeFromResourceURL( NewResourceURL );
+
+ if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) ||
+ ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT ))
+ throw IllegalArgumentException();
+ else if ( m_bReadOnly )
+ throw IllegalAccessException();
+ else
+ {
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ bool bInsertData( false );
+ UIElementData aUIElementData;
+ UIElementData* pDataSettings = impl_findUIElementData( NewResourceURL, nElementType );
+
+ if ( pDataSettings && !pDataSettings->bDefault )
+ throw ElementExistException();
+
+ if ( !pDataSettings )
+ {
+ pDataSettings = &aUIElementData;
+ bInsertData = true;
+ }
+
+ {
+ pDataSettings->bDefault = false;
+ pDataSettings->bModified = true;
+
+ // Create a copy of the data if the container is not const
+ Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
+ if ( xReplace.is() )
+ pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ else
+ pDataSettings->xSettings = aNewData;
+
+ m_bModified = true;
+
+ UIElementType& rElementType = m_aUIElements[nElementType];
+ rElementType.bModified = true;
+
+ if ( bInsertData )
+ {
+ pDataSettings->aName = RetrieveNameFromResourceURL( NewResourceURL ) + m_aXMLPostfix;
+ pDataSettings->aResourceURL = NewResourceURL;
+
+ UIElementDataHashMap& rElements = rElementType.aElementsHashMap;
+ rElements.insert( UIElementDataHashMap::value_type( NewResourceURL, *pDataSettings ));
+ }
+
+ Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings );
+ Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
+
+ // Create event to notify listener about removed element settings
+ ConfigurationEvent aEvent;
+
+ aEvent.ResourceURL = NewResourceURL;
+ aEvent.Accessor <<= xThis;
+ aEvent.Source = xIfac;
+ aEvent.Element <<= xInsertSettings;
+
+ aGuard.unlock();
+
+ implts_notifyContainerListener( aEvent, NotifyOp_Insert );
+ }
+ }
}
Reference< XInterface > SAL_CALL UIConfigurationManager::getImageManager() throw (::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->getImageManager();
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( !m_xImageManager.is() )
+ {
+ m_xImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ImageManager( m_xServiceManager )),
+ UNO_QUERY );
+ Reference< XInitialization > xInit( m_xImageManager, UNO_QUERY );
+
+ Sequence< Any > aPropSeq( 2 );
+ PropertyValue aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserConfigStorage" ));
+ aPropValue.Value = makeAny( m_xDocConfigStorage );
+ aPropSeq[0] = makeAny( aPropValue );
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" ));
+ aPropValue.Value = makeAny( m_aModuleIdentifier );
+ aPropSeq[1] = makeAny( aPropValue );
+
+ xInit->initialize( aPropSeq );
+ }
+
+ return Reference< XInterface >( m_xImageManager, UNO_QUERY );
}
Reference< XInterface > SAL_CALL UIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->getShortCutManager();
+ // SAFE ->
+ ResetableGuard aGuard( m_aLock );
+
+ if (m_xAccConfig.is())
+ return m_xAccConfig;
+
+ Reference< XMultiServiceFactory > xSMGR = m_xServiceManager;
+ Reference< XStorage > xDocumentRoot = m_xDocConfigStorage;
+
+ aGuard.unlock();
+ // <- SAFE
+
+ Reference< XInterface > xAccConfig = xSMGR->createInstance(SERVICENAME_DOCUMENTACCELERATORCONFIGURATION);
+ Reference< XInitialization > xInit (xAccConfig, UNO_QUERY_THROW);
+
+ PropertyValue aProp;
+ aProp.Name = ::rtl::OUString::createFromAscii("DocumentRoot");
+ aProp.Value <<= xDocumentRoot;
+
+ Sequence< Any > lArgs(1);
+ lArgs[0] <<= aProp;
+
+ xInit->initialize(lArgs);
+
+ // SAFE ->
+ aGuard.lock();
+ m_xAccConfig = xAccConfig;
+ aGuard.unlock();
+ // <- SAFE
+
+ return xAccConfig;
}
Reference< XInterface > SAL_CALL UIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException)
@@ -213,38 +1135,223 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getEventsManager() thro
// XUIConfigurationStorage
void SAL_CALL UIConfigurationManager::setStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException)
{
- m_pImpl->setStorage(Storage);
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xDocConfigStorage.is() )
+ {
+ try
+ {
+ // Dispose old storage to be sure that it will be closed
+ Reference< XComponent > xComponent( m_xDocConfigStorage, UNO_QUERY );
+ if ( xComponent.is() )
+ xComponent->dispose();
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+
+ // We store the new storage. Be careful it could be an empty reference!
+ m_xDocConfigStorage = Storage;
+ m_bReadOnly = sal_True;
+
+ Reference< XUIConfigurationStorage > xAccUpdate(m_xAccConfig, UNO_QUERY);
+ if ( xAccUpdate.is() )
+ xAccUpdate->setStorage( m_xDocConfigStorage );
+
+ if ( m_xImageManager.is() )
+ {
+ ImageManager* pImageManager = (ImageManager*)m_xImageManager.get();
+ if ( pImageManager )
+ pImageManager->setStorage( m_xDocConfigStorage );
+ }
+
+ if ( m_xDocConfigStorage.is() )
+ {
+ Reference< XPropertySet > xPropSet( m_xDocConfigStorage, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ try
+ {
+ long nOpenMode = 0;
+ Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenMode" )));
+ if ( a >>= nOpenMode )
+ m_bReadOnly = !( nOpenMode & ElementModes::WRITE );
+ }
+ catch ( com::sun::star::beans::UnknownPropertyException& )
+ {
+ }
+ catch ( com::sun::star::lang::WrappedTargetException& )
+ {
+ }
+ }
+ }
+
+ impl_Initialize();
}
sal_Bool SAL_CALL UIConfigurationManager::hasStorage() throw (::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->hasStorage();
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ return ( m_xDocConfigStorage.is() );
}
// XUIConfigurationPersistence
void SAL_CALL UIConfigurationManager::reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
- m_pImpl->reload();
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly )
+ {
+ // Try to access our module sub folder
+ ConfigEventNotifyContainer aRemoveNotifyContainer;
+ ConfigEventNotifyContainer aReplaceNotifyContainer;
+ for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ try
+ {
+ UIElementType& rDocElementType = m_aUIElements[i];
+ if ( rDocElementType.bModified )
+ impl_reloadElementTypeData( rDocElementType, aRemoveNotifyContainer, aReplaceNotifyContainer );
+ }
+ catch ( Exception& )
+ {
+ throw IOException();
+ }
+ }
+
+ m_bModified = sal_False;
+
+ // Unlock mutex before notify our listeners
+ aGuard.unlock();
+
+ // Notify our listeners
+ for ( sal_uInt32 j = 0; j < aRemoveNotifyContainer.size(); j++ )
+ implts_notifyContainerListener( aRemoveNotifyContainer[j], NotifyOp_Remove );
+ for ( sal_uInt32 k = 0; k < aReplaceNotifyContainer.size(); k++ )
+ implts_notifyContainerListener( aReplaceNotifyContainer[k], NotifyOp_Replace );
+ }
}
void SAL_CALL UIConfigurationManager::store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
- m_pImpl->store();
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly )
+ {
+ // Try to access our module sub folder
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ try
+ {
+ UIElementType& rElementType = m_aUIElements[i];
+ Reference< XStorage > xStorage( rElementType.xStorage, UNO_QUERY );
+
+ if ( rElementType.bModified && xStorage.is() )
+ impl_storeElementTypeData( xStorage, rElementType );
+ }
+ catch ( Exception& )
+ {
+ throw IOException();
+ }
+ }
+
+ m_bModified = false;
+ Reference< XTransactedObject > xTransactedObject( m_xDocConfigStorage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+ }
}
void SAL_CALL UIConfigurationManager::storeToStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
- m_pImpl->storeToStorage(Storage);
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
+ if ( m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly )
+ {
+ // Try to access our module sub folder
+ for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
+ {
+ try
+ {
+ Reference< XStorage > xElementTypeStorage( Storage->openStorageElement(
+ rtl::OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), ElementModes::READWRITE ));
+ UIElementType& rElementType = m_aUIElements[i];
+
+ if ( rElementType.bModified && xElementTypeStorage.is() )
+ impl_storeElementTypeData( xElementTypeStorage, rElementType, false ); // store data to storage, but don't reset modify flag!
+ }
+ catch ( Exception& )
+ {
+ throw IOException();
+ }
+ }
+
+ Reference< XTransactedObject > xTransactedObject( Storage, UNO_QUERY );
+ if ( xTransactedObject.is() )
+ xTransactedObject->commit();
+ }
}
sal_Bool SAL_CALL UIConfigurationManager::isModified() throw (::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->isModified();
+ ResetableGuard aGuard( m_aLock );
+
+ return m_bModified;
}
sal_Bool SAL_CALL UIConfigurationManager::isReadOnly() throw (::com::sun::star::uno::RuntimeException)
{
- return m_pImpl->isReadOnly();
+ ResetableGuard aGuard( m_aLock );
+
+ return m_bReadOnly;
+}
+
+void UIConfigurationManager::implts_notifyContainerListener( const ConfigurationEvent& aEvent, NotifyOp eOp )
+{
+ ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >*) NULL ) );
+ if ( pContainer != NULL )
+ {
+ ::cppu::OInterfaceIteratorHelper pIterator( *pContainer );
+ while ( pIterator.hasMoreElements() )
+ {
+ try
+ {
+ switch ( eOp )
+ {
+ case NotifyOp_Replace:
+ ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementReplaced( aEvent );
+ break;
+ case NotifyOp_Insert:
+ ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementInserted( aEvent );
+ break;
+ case NotifyOp_Remove:
+ ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementRemoved( aEvent );
+ break;
+ }
+ }
+ catch( css::uno::RuntimeException& )
+ {
+ pIterator.remove();
+ }
+ }
+ }
}
} // namespace framework
diff --git a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
index 9b2284c0c6b8..40c2c3f10708 100755
--- a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
@@ -148,12 +148,12 @@ void UIConfigurationManagerImpl::impl_fillSequenceWithElementTypeInfo( UIElement
while ( pUserIter != rUserElements.end() )
{
sal_Int32 nIndex = pUserIter->second.aResourceURL.indexOf( aCustomUrlPrefix, RESOURCEURL_PREFIX_SIZE );
- if ( !m_bUseDefault && nIndex > RESOURCEURL_PREFIX_SIZE )
+ if ( nIndex > RESOURCEURL_PREFIX_SIZE )
{
// Performance: Retrieve user interface name only for custom user interface elements.
// It's only used by them!
UIElementData* pDataSettings = impl_findUIElementData( pUserIter->second.aResourceURL, nElementType );
- if ( pDataSettings && ( !m_bUseDefault || !pDataSettings->bDefault) )
+ if ( pDataSettings && ( m_bUseDefault || !pDataSettings->bDefault ))
{
// Retrieve user interface name from XPropertySet interface
rtl::OUString aUIName;
@@ -1268,7 +1268,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException,
if ( m_bDisposed )
throw DisposedException();
- bool bInsertData( m_bUseDefault );
+ bool bInsertData( false );
UIElementData aUIElementData;
UIElementData* pDataSettings = impl_findUIElementData( NewResourceURL, nElementType );
if ( !m_bUseDefault )
@@ -1281,7 +1281,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException,
bInsertData = true;
}
}
- if ( !pDataSettings )
+ if ( !pDataSettings || !m_bUseDefault )
{
aUIElementData.bDefault = false;
if ( !m_bUseDefault )
diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx
index fcadc1694e54..239c6aff5c1f 100644
--- a/framework/source/uifactory/windowcontentfactorymanager.cxx
+++ b/framework/source/uifactory/windowcontentfactorymanager.cxx
@@ -220,6 +220,13 @@ throw (uno::Exception, uno::RuntimeException)
// module identifier, user interface element type and name
// SAFE
ResetableGuard aLock( m_aLock );
+
+ if ( !m_bConfigRead )
+ {
+ m_bConfigRead = sal_True;
+ m_pConfigAccess->readConfigurationData();
+ }
+
aImplementationName = m_pConfigAccess->getFactorySpecifierFromTypeNameModule( aType, aName, aModuleId );
if ( aImplementationName.getLength() > 0 )
{
diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk
index 60a44dba706f..0a07f3cf137d 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -334,7 +334,6 @@ SHL4OBJS= \
$(SLO)$/uicategorydescription.obj \
$(SLO)$/uicommanddescription.obj \
$(SLO)$/uiconfigurationmanager.obj \
- $(SLO)$/uiconfigurationmanagerimpl.obj \
$(SLO)$/uielementfactorymanager.obj \
$(SLO)$/urltransformer.obj \
$(SLO)$/vclstatusindicator.obj \
diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
index 6829edcebe60..fa978119d810 100644
--- a/idl/inc/command.hxx
+++ b/idl/inc/command.hxx
@@ -65,6 +65,7 @@ public:
String aCSVFile;
String aExportFile;
String aDocuFile;
+ UINT32 nVerbosity;
UINT32 nFlags;
SvCommand( int argc, char ** argv );
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 4d334bba000c..d0e6c92e349e 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -39,6 +39,8 @@
/*************************************************************************
*************************************************************************/
+class SvCommand;
+
#ifdef IDL_COMPILER
/******************** class SvIdlError ***********************************/
class SvIdlError
@@ -70,6 +72,7 @@ class SvIdlDataBase
BOOL bExport;
String aExportFile;
sal_uInt32 nUniqueId;
+ sal_uInt32 nVerbosity;
String aDataBaseFile;
SvFileStream * pStm;
BOOL bIsModified;
@@ -96,7 +99,7 @@ protected:
}
#endif
public:
- SvIdlDataBase();
+ explicit SvIdlDataBase( const SvCommand& rCmd );
~SvIdlDataBase();
static BOOL IsBinaryFormat( SvStream & rInStm );
@@ -165,7 +168,7 @@ public:
class SvIdlWorkingBase : public SvIdlDataBase
{
public:
- SvIdlWorkingBase();
+ explicit SvIdlWorkingBase( const SvCommand& rCmd );
BOOL ReadSvIdl( SvTokenStream &, BOOL bImported, const String & rPath );
BOOL WriteSvIdl( SvStream & );
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 66790b457334..29c49199dc30 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -258,7 +258,7 @@ static BOOL ResponseFile( StringList * pList, int argc, char ** argv )
|* Beschreibung
*************************************************************************/
SvCommand::SvCommand( int argc, char ** argv )
- : nFlags( 0 )
+ : nVerbosity(1), nFlags( 0 )
{
StringList aList;
@@ -353,6 +353,14 @@ SvCommand::SvCommand( int argc, char ** argv )
{ // Hilfe
printf( "%s", CommandLineSyntax );
}
+ else if( aParam.EqualsIgnoreCaseAscii( "quiet" ) )
+ {
+ nVerbosity = 0;
+ }
+ else if( aParam.EqualsIgnoreCaseAscii( "verbose" ) )
+ {
+ nVerbosity = 2;
+ }
else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) )
{ // Hilfe
int j = 0;
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 8933156bfc69..3c6d07f19921 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -58,9 +58,10 @@ void PrimeNumber(){
}
*/
-SvIdlDataBase::SvIdlDataBase()
+SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
: bExport( FALSE )
, nUniqueId( 0 )
+ , nVerbosity( rCmd.nVerbosity )
, bIsModified( FALSE )
, aPersStream( *IDLAPP->pClassMgr, NULL )
, pIdTable( NULL )
@@ -700,6 +701,7 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
void SvIdlDataBase::Write( const ByteString & rText )
{
#ifndef W31
+ if( nVerbosity != 0 )
fprintf( stdout, "%s", rText.GetBuffer() );
#endif
}
@@ -803,7 +805,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
|*
|* Beschreibung
*************************************************************************/
-SvIdlWorkingBase::SvIdlWorkingBase()
+SvIdlWorkingBase::SvIdlWorkingBase(const SvCommand& rCmd) : SvIdlDataBase(rCmd)
{
}
diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx
index 16706e936f30..8ae94ae896f5 100644
--- a/idl/source/prj/svidl.cxx
+++ b/idl/source/prj/svidl.cxx
@@ -112,8 +112,6 @@ int cdecl main ( int argc, char ** argv)
{
#endif
- printf( "StarView Interface Definition Language (IDL) Compiler 3.0\n" );
-
/*
pStr = ::ResponseFile( &aCmdLine, argv, argc );
if( pStr )
@@ -136,8 +134,12 @@ int cdecl main ( int argc, char ** argv)
String aTmpDocuFile;
SvCommand aCommand( argc, argv );
+
+ if( aCommand.nVerbosity != 0 )
+ printf( "StarView Interface Definition Language (IDL) Compiler 3.0\n" );
+
Init();
- SvIdlWorkingBase * pDataBase = new SvIdlWorkingBase();
+ SvIdlWorkingBase * pDataBase = new SvIdlWorkingBase(aCommand);
int nExit = 0;
if( aCommand.aExportFile.Len() )
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index b4d7127a2c89..2925c2a97802 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -2074,7 +2074,7 @@
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:ShowAnnotation" oor:op="replace">
+ <node oor:name=".uno:ShowAnnotations" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Comme~nts</value>
</prop>
diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu
index 9d145fbcc831..b30a43202300 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -7,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCL.xcu,v $
- * $Revision: 1.62.116.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -825,64 +822,184 @@
<value>Lohit Nepali;Kalimati;Samanata;Sans</value>
</prop>
</node>
+ <node oor:name="as-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="bn-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
<node oor:name="hi-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
<node oor:name="gu-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="kn-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="mai-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="ml-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="mr-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
<node oor:name="or-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
<node oor:name="pa-IN" oor:op="replace">
@@ -907,22 +1024,62 @@
</node>
<node oor:name="ta-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Sans Serif</value>
+ <value>Lohit Tamil;Latha;Sans Serif</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="te-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="ur" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
@@ -1022,6 +1179,26 @@
</node>
<node oor:name="rw" oor:op="replace">
</node>
+ <node oor:name="si" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>LKLUG;Iskoola Pota;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
</node>
<node oor:name="FontSubstitutions">
<node oor:name="en" oor:op="replace">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 72c0b768ed84..246b1bcdb974 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2105,7 +2105,7 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
</info>
</set>
</group>
- <group oor:name="Save">
+ <group oor:name="Save">
<info>
<author>MBA</author>
<desc>Contains general settings about the saving process.</desc>
@@ -2616,6 +2616,19 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
</constraints>
<value>0</value>
</prop>
+ <group oor:name="NewDocumentHandling">
+ <info>
+ <author>CD</author>
+ <desc>Contains settings to change new document window behavior.</desc>
+ </info>
+ <prop oor:name="ForceFocusAndToFront" oor:type="xs:boolean">
+ <info>
+ <author>CD</author>
+ <desc>Every new document window will be forced to front and grabs the focus.</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
<group oor:name="AppWindow">
<info>
<author>MBA</author>
@@ -5343,6 +5356,13 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
</constraints>
<value>0</value>
</prop>
+ <prop oor:name="AllowDuplicateFieldNames" oor:type="xs:boolean">
+ <info>
+ <author>pl</author>
+ <desc>Specifies whether multiple form fields exported are allowed to have the same field name.</desc>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="IsSkipEmptyPages" oor:type="xs:boolean">
<info>
<author>FME</author>
diff --git a/oovbaapi/ooo/vba/constants/makefile.mk b/oovbaapi/ooo/vba/constants/makefile.mk
index 0b092e6f7999..fa9cdaddc1c4 100644
--- a/oovbaapi/ooo/vba/constants/makefile.mk
+++ b/oovbaapi/ooo/vba/constants/makefile.mk
@@ -55,7 +55,6 @@ MYIDLFILES=$(foreach,i,$(MYTMPIDLFILES) $(MY_GEN_IDL_PATH)$/$(i))
MYURDFILES=$(foreach,i,$(MYIDLFILES) $(MY_GEN_UCR_PATH)$/$(i:b).urd)
MYDBTARGET=$(OUT)$/ucr/constants.db
.ENDIF
-.ENDIF
.INCLUDE : target.mk
@@ -69,3 +68,4 @@ $(MYDBTARGET) : $(MYURDFILES) $(MYIDLFILES)
$(REGMERGE) $(OUT)$/ucr/constants.db /UCR @$(mktmp $(MYURDFILES))
.ENDIF
+.ENDIF
diff --git a/oovbaapi/ooo/vba/makefile.mk b/oovbaapi/ooo/vba/makefile.mk
index 6f9815bfeb72..99a11e5ac0fa 100644
--- a/oovbaapi/ooo/vba/makefile.mk
+++ b/oovbaapi/ooo/vba/makefile.mk
@@ -41,7 +41,7 @@ PACKAGE=ooo$/vba
.IF "$(ENABLE_VBA)"!="YES"
dummy:
@echo "not building vba..."
-.ENDIF
+.ELSE
# ------------------------------------------------------------------------
.IF "$(L10N_framework)"=""
@@ -62,3 +62,4 @@ IDLFILES=\
# ------------------------------------------------------------------
.ENDIF
.INCLUDE : target.mk
+.ENDIF
diff --git a/readlicense_oo/util/makefile.pmk b/readlicense_oo/util/makefile.pmk
index b5c9099a1aa6..1b2e1de5130f 100755
--- a/readlicense_oo/util/makefile.pmk
+++ b/readlicense_oo/util/makefile.pmk
@@ -62,6 +62,7 @@ $(MISC)$/readme_text.xsl : virtual
.ENDIF # "$(USE_SHELL)"!="4nt"
$(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
+ @@-$(MKDIRHIER) $(@:d)
$(XSLTPROC) --nonet -o $@ \
--stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
--stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
@@ -71,6 +72,7 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
.ENDIF # "$(GUI)"=="UNX"
$(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual'
+ @@-$(MKDIRHIER) $(@:d)
$(XSLTPROC) --nonet -o $@ \
--stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
--stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
@@ -78,6 +80,7 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual'
# no percent-rule to avoid ambiguous inference chains for README_<lang>.html
$(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl
+ @@-$(MKDIRHIER) $(@:d)
$(XSLTPROC) --nonet -o $@ \
--stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
--stringparam cp1 $(CPUNAME) --stringparam type text --stringparam lang1 $(@:b:s/readme_//:s/README_//) \
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 03f38a27fe4f..b1f81aa620d2 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -484,7 +484,6 @@
#include "sal/config.h"
#include "sal/types.h"
#include "setup_native/qswin32.h"
-#include "shell/systemshell.hxx"
#include "sot/clsids.hxx"
#include "sot/exchange.hxx"
#include "sot/factory.hxx"
diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx
index bb4e1b8c1561..bfe8debecca1 100644
--- a/sfx2/inc/sfx2/passwd.hxx
+++ b/sfx2/inc/sfx2/passwd.hxx
@@ -68,10 +68,9 @@ private:
USHORT mnMinLen;
USHORT mnExtras;
-//#if 0 // _SOLAR__PRIVATE
+ bool mbAsciiOnly;
DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
DECL_DLLPRIVATE_LINK( OKHdl, OKButton* );
-//#endif
public:
SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL );
@@ -84,6 +83,7 @@ public:
void SetMaxLen( USHORT Len );
void SetEditHelpId( ULONG nId ) { maPasswordED.SetHelpId( nId ); }
void ShowExtras( USHORT nExtras ) { mnExtras = nExtras; }
+ void AllowAsciiOnly( bool i_bAsciiOnly = true ) { mbAsciiOnly = i_bAsciiOnly; }
virtual short Execute();
};
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 0de25b0c7503..91227e3e34ec 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -43,8 +43,6 @@
#include <unotools/localfilehelper.hxx>
#include <cppuhelper/implbase1.hxx>
-#include <shell/systemshell.hxx>
-
// ----------------------------------------------------------------------------
#include <sfx2/app.hxx>
@@ -470,7 +468,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
pDocSh->Get_Impl()->bWaitingForPicklist = sal_False;
if ( aURL.GetProtocol() == INET_PROT_FILE )
- SystemShell::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ), (pFilter) ? pFilter->GetMimeType() : String() );
+ Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ), (pFilter) ? pFilter->GetMimeType() : String() );
}
break;
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index f31ed1724907..cf7d04ef0875 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -236,7 +236,8 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
}
Window* pContentWindow = VCLUnoHelper::GetWindow(xWindow);
- pContentWindow->SetStyle( pContentWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
+ if ( pContentWindow )
+ pContentWindow->SetStyle( pContentWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
pTitleDockWindow->SetWrappedWindow(pContentWindow);
}
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index cbe47d39b704..981657d476fa 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -43,10 +43,35 @@
#include "dialog.hrc"
#include "passwd.hrc"
+#include "vcl/sound.hxx"
+
// -----------------------------------------------------------------------
IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
{
+ if( mbAsciiOnly )
+ {
+ rtl::OUString aTest( maPasswordED.GetText() );
+ const sal_Unicode* pTest = aTest.getStr();
+ sal_Int32 nLen = aTest.getLength();
+ rtl::OUStringBuffer aFilter( nLen );
+ bool bReset = false;
+ for( sal_Int32 i = 0; i < nLen; i++ )
+ {
+ if( *pTest > 0x007f )
+ bReset = true;
+ else
+ aFilter.append( *pTest );
+ pTest++;
+ }
+ if( bReset )
+ {
+ Sound::Beep( SOUND_ERROR );
+ maPasswordED.SetSelection( Selection( 0, nLen ) );
+ maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() );
+ }
+
+ }
maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen );
return 0;
}
@@ -88,7 +113,8 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ),
mnMinLen ( 5 ),
- mnExtras ( 0 )
+ mnExtras ( 0 ),
+ mbAsciiOnly ( false )
{
FreeResource();
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index cd73a92196d7..21515b2c6f3d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -100,7 +100,6 @@
#include <sot/storinfo.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
-#include <shell/systemshell.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/seqstream.hxx>
#include <comphelper/documentconstants.hxx>
@@ -831,7 +830,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
if ( aUrl.GetProtocol() == INET_PROT_FILE )
{
const SfxFilter* pOrgFilter = pMedium->GetOrigFilter();
- SystemShell::AddToRecentDocumentList(
+ Application::AddToRecentDocumentList(
aUrl.GetURLNoPass( INetURLObject::NO_DECODE ),
(pOrgFilter) ? pOrgFilter->GetMimeType() : String() );
}
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index f75d68fe1413..97f86ee1f395 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -45,6 +45,8 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <svtools/acceleratorexecute.hxx>
+#include <rtl/ref.hxx>
+
#include <queue>
// forward ---------------------------------------------------------------
@@ -71,6 +73,8 @@ public:
void AddRequest( SfxRequest& rReq );
};
+class SfxClipboardChangeListener;
+
struct SfxViewShell_Impl
{
::osl::Mutex aMutex;
@@ -96,11 +100,9 @@ struct SfxViewShell_Impl
::svt::AcceleratorExecute* pAccExec;
SfxAsyncPrintExec_Impl* pPrinterCommandQueue;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
+ ::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
- SfxViewShell_Impl()
- : aInterceptorContainer( aMutex )
- , pAccExec(0)
- {}
+ SfxViewShell_Impl();
};
#endif
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 299c928c748b..f6053a467ed4 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -131,6 +131,8 @@ class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1<
public:
SfxClipboardChangeListener( SfxViewShell* pView );
virtual ~SfxClipboardChangeListener();
+
+ void DisconnectViewShell() { pViewShell = NULL; }
};
SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView )
@@ -241,7 +243,12 @@ static ::rtl::OUString RetrieveLabelFromCommand(
}
//=========================================================================
+SfxViewShell_Impl::SfxViewShell_Impl()
+: aInterceptorContainer( aMutex )
+, pAccExec(0)
+{}
+//=========================================================================
SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0))
{
SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN );
@@ -1297,21 +1304,27 @@ SfxViewShell::~SfxViewShell()
SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl();
rViewArr.Remove( rViewArr.GetPos(pThis) );
+ if ( pImp->xClipboardListener.is() )
+ {
+ pImp->xClipboardListener->DisconnectViewShell();
+ pImp->xClipboardListener = NULL;
+ }
+
if ( pImp->pController )
{
pImp->pController->ReleaseShell_Impl();
pImp->pController->release();
+ pImp->pController = NULL;
}
if (pImp->pAccExec)
{
- delete pImp->pAccExec;
- pImp->pAccExec = 0;
+ DELETEZ( pImp->pAccExec );
}
- delete pImp->pPrinterCommandQueue;
- delete pImp;
- delete pIPClientList;
+ DELETEZ( pImp->pPrinterCommandQueue );
+ DELETEZ( pImp );
+ DELETEZ( pIPClientList );
}
//--------------------------------------------------------------------
@@ -1997,7 +2010,12 @@ void SfxViewShell::SetController( SfxBaseController* pController )
pImp->pController->acquire();
pImp->bControllerSet = TRUE;
- AddRemoveClipboardListener( new SfxClipboardChangeListener( this ), TRUE );
+ // there should be no old listener, but if there is one, it should be disconnected
+ if ( pImp->xClipboardListener.is() )
+ pImp->xClipboardListener->DisconnectViewShell();
+
+ pImp->xClipboardListener = new SfxClipboardChangeListener( this );
+ AddRemoveClipboardListener( pImp->xClipboardListener.get(), TRUE );
}
Reference < XController > SfxViewShell::GetController()
@@ -2205,17 +2223,20 @@ void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransf
{
try
{
- uno::Reference< datatransfer::clipboard::XClipboard > xClipboard( GetViewFrame()->GetWindow().GetClipboard() );
- if( !xClipboard.is() )
- return;
-
- uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr( xClipboard, uno::UNO_QUERY );
- if( xClpbrdNtfr.is() )
+ if ( GetViewFrame() )
{
- if( bAdd )
- xClpbrdNtfr->addClipboardListener( rClp );
- else
- xClpbrdNtfr->removeClipboardListener( rClp );
+ uno::Reference< datatransfer::clipboard::XClipboard > xClipboard( GetViewFrame()->GetWindow().GetClipboard() );
+ if( xClipboard.is() )
+ {
+ uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr( xClipboard, uno::UNO_QUERY );
+ if( xClpbrdNtfr.is() )
+ {
+ if( bAdd )
+ xClpbrdNtfr->addClipboardListener( rClp );
+ else
+ xClpbrdNtfr->removeClipboardListener( rClp );
+ }
+ }
}
}
catch( const uno::Exception& )
diff --git a/sfx2/util/makefile.mk b/sfx2/util/makefile.mk
index 6bdb4a8122a6..10b70b1a1374 100644
--- a/sfx2/util/makefile.mk
+++ b/sfx2/util/makefile.mk
@@ -91,7 +91,6 @@ SHL1STDLIBS+=\
$(TOOLSLIB) \
$(I18NISOLANGLIB) \
$(SAXLIB) \
- $(SYSSHELLLIB) \
$(COMPHELPERLIB) \
$(UCBHELPERLIB) \
$(CPPUHELPERLIB) \
diff --git a/shell/inc/systemshell.hxx b/shell/inc/systemshell.hxx
deleted file mode 100644
index fa679953e5c9..000000000000
--- a/shell/inc/systemshell.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: systemshell.hxx,v $
- * $Revision: 1.5 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SYSTEMSHELL_HXX_
-#define _SYSTEMSHELL_HXX_
-
-#include <rtl/ustring.hxx>
-
-namespace SystemShell
-{
- /** Add a file to the system shells recent document list if there is any.
- This function may have no effect under Unix because there is no
- standard API among the different desktop managers.
-
- @param aFileUrl
- The file url of the document.
-
- @param aMimeType
- The mime content type of the document specified by aFileUrl.
- If an empty string will be provided "application/octet-stream"
- will be used.
- */
- void AddToRecentDocumentList(const rtl::OUString& aFileUrl, const rtl::OUString& aMimeType);
-}
-
-#endif
diff --git a/shell/prj/build.lst b/shell/prj/build.lst
index 7a2e91f973ba..ed4fbca7e3f5 100644
--- a/shell/prj/build.lst
+++ b/shell/prj/build.lst
@@ -10,9 +10,6 @@ sl shell\source\cmdmail nmake - u sl_cmdmail sl
sl shell\source\cmdmail nmake - p sl_cmdmail sl_inc NULL
sl shell\source\all nmake - all sl_all sl_inc NULL
sl shell\source\unix\sysshell nmake - u sl_unix_sysshell sl_all sl_inc NULL
-sl shell\source\aqua\sysshell nmake - u sl_aqua_sysshell sl_all sl_inc NULL
-sl shell\source\win32\sysshell nmake - w sl_win32_sysshell sl_inc NULL
-sl shell\source\os2\sysshell nmake - p sl_os2_sysshell sl_inc NULL
sl shell\source\tools\lngconvex nmake - w sl_win32_lngconv sl_inc NULL
sl shell\source\tools\regsvrex nmake - w sl_win32_regsvrex sl_inc NULL
sl shell\source\all\zipfile nmake - w sl_all_zipfile sl_inc NULL
diff --git a/shell/prj/d.lst b/shell/prj/d.lst
index 542d6c62eaa5..98d4a6215faf 100644
--- a/shell/prj/d.lst
+++ b/shell/prj/d.lst
@@ -1,7 +1,3 @@
-mkdir: %_DEST%\inc%_EXT%\shell
-
-..\inc\*.hxx %_DEST%\inc%_EXT%\shell\*.hxx
-
..\%__SRC%\slb\*.lib %_DEST%\lib%_EXT%\*.lib
..\%__SRC%\slb\*.a %_DEST%\lib%_EXT%\*.a
..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
diff --git a/shell/source/aqua/sysshell/makefile.mk b/shell/source/aqua/sysshell/makefile.mk
deleted file mode 100644
index b3cf3abdec36..000000000000
--- a/shell/source/aqua/sysshell/makefile.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=shell
-TARGET=sysshell
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX+=$(OBJCXXFLAGS)
-
-# --- Files --------------------------------------------------------
-
-.IF "$(OS)" == "MACOSX"
-
-LIB1OBJFILES=$(SLO)$/systemshell.obj
-LIB1TARGET=$(SLB)$/$(TARGET).lib
-LIB1ARCHIV=$(SLB)$/lib$(TARGET).a
-
-.ELSE
-
-dummy:
- @echo "Nothing to build for $(OS)"
-
-.ENDIF # MACOSX
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/shell/source/aqua/sysshell/systemshell.cxx b/shell/source/aqua/sysshell/systemshell.cxx
deleted file mode 100644
index a9535c849f77..000000000000
--- a/shell/source/aqua/sysshell/systemshell.cxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: systemshell.cxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "systemshell.hxx"
-
-#include <comphelper/processfactory.hxx>
-
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_Hpp_
-#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
-#include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include <premac.h>
-#include <Cocoa/Cocoa.h>
-#include <postmac.h>
-
-using namespace ::com::sun::star;
-
-// We need to re-encode file urls because osl_getFileURLFromSystemPath converts
-// to UTF-8 before encoding non ascii characters, which is not what other apps expect.
-static rtl::OUString translateToExternalUrl(const rtl::OUString& internalUrl)
-{
- rtl::OUString extUrl;
-
- uno::Reference< lang::XMultiServiceFactory > sm = comphelper::getProcessServiceFactory();
- if (sm.is())
- {
- uno::Reference< beans::XPropertySet > pset;
- sm->queryInterface( getCppuType( &pset )) >>= pset;
- if (pset.is())
- {
- uno::Reference< uno::XComponentContext > context;
- static const rtl::OUString DEFAULT_CONTEXT( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) );
- pset->getPropertyValue(DEFAULT_CONTEXT) >>= context;
- if (context.is())
- extUrl = uri::ExternalUriReferenceTranslator::create(context)->translateToExternal(internalUrl);
- }
- }
- return extUrl;
-}
-
-// #i104525# many versions of OSX have problems with some URLs:
-// when an app requests OSX to add one of these URLs to the "Recent Items" list
-// then this app gets killed (TextEdit, Preview, etc. and also OOo)
-static bool isDangerousUrl( const rtl::OUString& rUrl)
-{
- // use a heuristic that detects all known cases since there is no official comment
- // on the exact impact and root cause of the OSX bug
- const int nLen = rUrl.getLength();
- const sal_Unicode* p = rUrl.getStr();
- for( int i = 0; i < nLen-3; ++i, ++p) {
- if( p[0] != '%')
- continue;
- // escaped percent?
- if( (p[1] == '2') && (p[2] == '5'))
- return true;
- // escapes are considered to be UTF-8 encoded
- // => check for invalid UTF-8 leading byte
- if( (p[1] != 'f') && (p[1] != 'F'))
- continue;
- int cLowNibble = p[2];
- if( (cLowNibble >= '0') && (cLowNibble <= '9'))
- return false;
- if( cLowNibble >= 'a')
- cLowNibble -= 'a' - 'A';
- if( (cLowNibble < 'A') || (cLowNibble >= 'C'))
- return true;
- }
-
- return false;
-}
-
-namespace SystemShell {
-
- //##############################
- void AddToRecentDocumentList(const rtl::OUString& aFileUrl, const rtl::OUString& /*aMimeType*/)
- {
- // Convert file URL for external use (see above)
- rtl::OUString externalUrl = translateToExternalUrl(aFileUrl);
- if( 0 == externalUrl.getLength() )
- externalUrl = aFileUrl;
-
- if( externalUrl.getLength()
- && !isDangerousUrl( externalUrl))
- {
- NSString* pString = [[NSString alloc] initWithCharacters: externalUrl.getStr() length: externalUrl.getLength()];
- NSURL* pURL = [NSURL URLWithString: pString];
-
- if( pURL )
- {
- NSDocumentController* pCtrl = [NSDocumentController sharedDocumentController];
- [pCtrl noteNewRecentDocumentURL: pURL];
- }
- if( pString )
- [pString release];
-
- }
- }
-
-} // namespace SystemShell
-
diff --git a/shell/source/backends/kdebe/makefile.mk b/shell/source/backends/kdebe/makefile.mk
index 8bc0b475be8e..6159be6be151 100644
--- a/shell/source/backends/kdebe/makefile.mk
+++ b/shell/source/backends/kdebe/makefile.mk
@@ -77,11 +77,11 @@ SHL1OBJS=$(SLOFILES)
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
SHL1IMPLIB=i$(SHL1TARGET)
+SHL1LINKFLAGS+=$(KDE_LIBS) -lkio
SHL1STDLIBS= \
$(CPPUHELPERLIB) \
$(CPPULIB) \
- $(SALLIB) \
- $(KDE_LIBS) -lkio
+ $(SALLIB)
SHL1VERSIONMAP=exports.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
diff --git a/shell/source/os2/sysshell/makefile.mk b/shell/source/os2/sysshell/makefile.mk
deleted file mode 100644
index bda4958cef02..000000000000
--- a/shell/source/os2/sysshell/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.11 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=SHELL
-TARGET=sysshell
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/systemshell.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/shell/source/os2/sysshell/systemshell.cxx b/shell/source/os2/sysshell/systemshell.cxx
deleted file mode 100644
index c47ac86eca20..000000000000
--- a/shell/source/os2/sysshell/systemshell.cxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: systemshell.cxx,v $
- * $Revision: 1.9 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#ifndef _SYSTEMSHELL_HXX_
-#include "../../../inc/systemshell.hxx"
-#endif
-
-#ifndef _OSL_DIAGNOSE_H_
-#include <osl/diagnose.h>
-#endif
-
-#ifndef _OSL_FILE_HXX_
-#include <osl/file.hxx>
-#endif
-
-namespace SystemShell
-{
-
- /** Add a file to the system shells recent document list if there is any.
- This function may have no effect under Unix because there is no
- standard API among the different desktop managers.
-
- @param aFileUrl
- The file url of the document.
- */
- void AddToRecentDocumentList(const rtl::OUString& aFileUrl, const rtl::OUString& aMimeType)
- {
- rtl::OUString system_path;
- osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL(aFileUrl, system_path);
-
- OSL_ENSURE(osl::FileBase::E_None == rc, "Invalid file url");
-
- //if (osl::FileBase::E_None == rc)
- // SHAddToRecentDocs(SHARD_PATHW, system_path.getStr());
- }
-
-}; // end namespace SystemShell
-
diff --git a/shell/source/unix/sysshell/makefile.mk b/shell/source/unix/sysshell/makefile.mk
index 8089b160fb6c..2c1ace9fe187 100644
--- a/shell/source/unix/sysshell/makefile.mk
+++ b/shell/source/unix/sysshell/makefile.mk
@@ -48,10 +48,6 @@ CFLAGS+=-DSYSTEM_EXPAT
.IF "$(OS)" != "MACOSX"
-LIB1OBJFILES=$(SLO)$/systemshell.obj
-LIB1TARGET=$(SLB)$/$(TARGET).lib
-LIB1ARCHIV=$(SLB)$/lib$(TARGET).a
-
SLOFILES=$(SLO)$/recently_used_file.obj \
$(SLO)$/recently_used_file_handler.obj
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index 55f95b6e3521..faf8118d7f8d 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -31,7 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
-#include "systemshell.hxx"
#include "osl/process.h"
#include "rtl/ustring.hxx"
#include "rtl/string.hxx"
diff --git a/shell/source/unix/sysshell/systemshell.cxx b/shell/source/unix/sysshell/systemshell.cxx
deleted file mode 100644
index 85477f12921e..000000000000
--- a/shell/source/unix/sysshell/systemshell.cxx
+++ /dev/null
@@ -1,151 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: systemshell.cxx,v $
- * $Revision: 1.9 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "systemshell.hxx"
-
-#include <comphelper/processfactory.hxx>
-
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_Hpp_
-#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
-#include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include "osl/module.hxx"
-
-using namespace ::com::sun::star;
-
-#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
-
-const rtl::OUString SYM_ADD_TO_RECENTLY_USED_FILE_LIST = UNISTRING("add_to_recently_used_file_list");
-const rtl::OUString LIB_RECENT_FILE = UNISTRING("librecentfile.so");
-const rtl::OUString DEFAULT_CONTEXT = UNISTRING("DefaultContext");
-
-void * (* sym_gtk_recent_manager_get_default) () = NULL;
-void (* sym_gtk_recent_manager_add_item) (void *, const char *) = NULL;
-
-// We need to re-encode file urls because osl_getFileURLFromSystemPath converts
-// to UTF-8 before encoding non ascii characters, which is not what other apps expect.
-static rtl::OUString translateToExternalUrl(const rtl::OUString& internalUrl)
-{
- rtl::OUString extUrl;
-
- uno::Reference< lang::XMultiServiceFactory > sm = comphelper::getProcessServiceFactory();
- if (sm.is())
- {
- uno::Reference< beans::XPropertySet > pset;
- sm->queryInterface( getCppuType( &pset )) >>= pset;
- if (pset.is())
- {
- uno::Reference< uno::XComponentContext > context;
- pset->getPropertyValue(DEFAULT_CONTEXT) >>= context;
- if (context.is())
- extUrl = uri::ExternalUriReferenceTranslator::create(context)->translateToExternal(internalUrl);
- }
- }
- return extUrl;
-}
-
-namespace SystemShell {
-
- typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const rtl::OUString&, const rtl::OUString&);
-
- //##############################
- rtl::OUString get_absolute_library_url(const rtl::OUString& /*lib_name*/)
- {
- rtl::OUString url;
- if (osl::Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(AddToRecentDocumentList), url))
- {
- sal_Int32 index = url.lastIndexOf('/');
- url = url.copy(0, index + 1);
- url += LIB_RECENT_FILE;
- }
- return url;
- }
-
- bool init_recent_manager_api()
- {
- oslModule hDefault;
- if( osl_getModuleHandle( NULL, &hDefault ) )
- {
- sym_gtk_recent_manager_get_default = (void * (*)())
- osl_getAsciiFunctionSymbol(hDefault, "gtk_recent_manager_get_default");
- sym_gtk_recent_manager_add_item = (void (*)(void *, const char *))
- osl_getAsciiFunctionSymbol(hDefault, "gtk_recent_manager_add_item");
-
- }
- bool ret = (NULL != sym_gtk_recent_manager_get_default) && (NULL != sym_gtk_recent_manager_add_item);
- return ret;
- }
-
-
- //##############################
- void AddToRecentDocumentList(const rtl::OUString& aFileUrl, const rtl::OUString& aMimeType)
- {
- static bool bIsRecentManagerPresent = init_recent_manager_api();
-
- // Convert file URL for external use (see above)
- rtl::OUString externalUrl = translateToExternalUrl(aFileUrl);
- if( 0 == externalUrl.getLength() )
- externalUrl = aFileUrl;
-
- if( bIsRecentManagerPresent )
- {
- void * recent_manager = sym_gtk_recent_manager_get_default();
- sym_gtk_recent_manager_add_item(recent_manager, rtl::OUStringToOString(aFileUrl, RTL_TEXTENCODING_UTF8).getStr());
- }
- else
- {
- rtl::OUString librecentfile_url = get_absolute_library_url(LIB_RECENT_FILE);
-
- if (librecentfile_url.getLength())
- {
- osl::Module module(librecentfile_url);
-
- if (module.is())
- {
- // convert from reinterpret_cast<PFUNC_ADD_TO_RECENTLY_USED_LIST>
- // not allowed in gcc 3.3 without permissive.
- PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list =
- reinterpret_cast<PFUNC_ADD_TO_RECENTLY_USED_LIST>(module.getFunctionSymbol(SYM_ADD_TO_RECENTLY_USED_FILE_LIST));
-
- if (add_to_recently_used_file_list)
- add_to_recently_used_file_list(aFileUrl, aMimeType);
- }
- }
- }
- }
-
-} // namespace SystemShell
-
diff --git a/shell/source/win32/sysshell/makefile.mk b/shell/source/win32/sysshell/makefile.mk
deleted file mode 100644
index 698566641423..000000000000
--- a/shell/source/win32/sysshell/makefile.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=shell
-TARGET=sysshell
-LIBTARGET=NO
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-LIB1OBJFILES=$(SLO)$/systemshell.obj
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1ARCHIV= $(SLB)$/lib$(TARGET).a
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/shell/source/win32/sysshell/systemshell.cxx b/shell/source/win32/sysshell/systemshell.cxx
deleted file mode 100644
index fe6409cadf22..000000000000
--- a/shell/source/win32/sysshell/systemshell.cxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: systemshell.cxx,v $
- * $Revision: 1.6 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "../../../inc/systemshell.hxx"
-#include <osl/diagnose.h>
-#include <osl/file.hxx>
-
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#pragma warning(disable:4917)
-#endif
-#include <Shlobj.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
-namespace SystemShell
-{
-
- /** Add a file to the system shells recent document list if there is any.
- This function may have no effect under Unix because there is no
- standard API among the different desktop managers.
-
- @param aFileUrl
- The file url of the document.
- */
- void AddToRecentDocumentList(const rtl::OUString& aFileUrl, const rtl::OUString& /*aMimeType*/)
- {
- rtl::OUString system_path;
- osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL(aFileUrl, system_path);
-
- OSL_ENSURE(osl::FileBase::E_None == rc, "Invalid file url");
-
- if (osl::FileBase::E_None == rc)
- SHAddToRecentDocs(SHARD_PATHW, system_path.getStr());
- }
-
-}; // end namespace SystemShell
-
diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx
index ce2b481bdcdf..a33a1b5cbd81 100644
--- a/svx/inc/galobj.hxx
+++ b/svx/inc/galobj.hxx
@@ -85,7 +85,7 @@ enum GalSoundType
// - SgaObject -
// -------------
-class SgaObject
+class SVX_DLLPUBLIC SgaObject
{
friend class GalleryTheme;
@@ -122,8 +122,8 @@ public:
BOOL IsValid() const { return bIsValid; }
BOOL IsThumbBitmap() const { return bIsThumbBmp; }
- SVX_DLLPUBLIC const String GetTitle() const;
- SVX_DLLPUBLIC void SetTitle( const String& rTitle );
+ const String GetTitle() const;
+ void SetTitle( const String& rTitle );
friend SvStream& operator<<( SvStream& rOut, const SgaObject& rObj );
friend SvStream& operator>>( SvStream& rIn, SgaObject& rObj );
diff --git a/svx/inc/svx/msdffimp.hxx b/svx/inc/svx/msdffimp.hxx
index 248a31dcf71f..603a6831fe30 100644
--- a/svx/inc/svx/msdffimp.hxx
+++ b/svx/inc/svx/msdffimp.hxx
@@ -481,6 +481,7 @@ public:
MSFilterTracer* mpTracer;
sal_Bool mbTracing;
+ Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
index 27359ebf9738..87a1de55ec0a 100644
--- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
+++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -65,6 +65,8 @@ namespace sdr { namespace contact {
::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl;
public:
+ ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
+
/// determines whether an XControl already exists, and is currently visible
bool isControlVisible() const;
@@ -98,7 +100,6 @@ namespace sdr { namespace contact {
virtual void ActionChanged();
protected:
- ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
~ViewObjectContactOfUnoControl();
// support for Primitive2D
@@ -111,36 +112,6 @@ namespace sdr { namespace contact {
};
//====================================================================
- //= UnoControlDefaultContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlDefaultContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlDefaultContact();
-
- private:
- UnoControlDefaultContact(); // never implemented
- UnoControlDefaultContact( const UnoControlDefaultContact& ); // never implemented
- UnoControlDefaultContact& operator=( const UnoControlDefaultContact& ); // never implemented
- };
-
- //====================================================================
- //= UnoControlWindowContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlWindowContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlWindowContact();
-
- private:
- UnoControlWindowContact(); // never implemented
- UnoControlWindowContact( const UnoControlWindowContact& ); // never implemented
- UnoControlWindowContact& operator=( const UnoControlWindowContact& ); // never implemented
- };
-
- //====================================================================
//= UnoControlPrintOrPreviewContact
//====================================================================
class SVX_DLLPRIVATE UnoControlPrintOrPreviewContact : public ViewObjectContactOfUnoControl
@@ -157,21 +128,6 @@ namespace sdr { namespace contact {
virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const;
};
- //====================================================================
- //= UnoControlPDFExportContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlPDFExportContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlPDFExportContact();
-
- private:
- UnoControlPDFExportContact(); // never implemented
- UnoControlPDFExportContact( const UnoControlPDFExportContact& ); // never implemented
- UnoControlPDFExportContact& operator=( const UnoControlPDFExportContact& ); // never implemented
- };
-
//........................................................................
} } // namespace sdr::contact
//........................................................................
diff --git a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
index 798e5b53d6de..0f46c2809597 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -75,7 +75,8 @@ namespace drawinglayer
const attribute::SdrTextAttribute& rText,
const attribute::SdrLineAttribute* pStroke,
bool bCellText,
- bool bWordWrap);
+ bool bWordWrap,
+ bool bClipOnBounds);
Primitive2DSequence createEmbeddedShadowPrimitive(
const Primitive2DSequence& rContent,
diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
index 132a3ecc2538..059849531566 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -219,6 +219,7 @@ namespace drawinglayer
unsigned mbUnlimitedPage : 1; // force layout with no text break
unsigned mbCellText : 1; // this is a cell text as block text
unsigned mbWordWrap : 1; // for CustomShapes text layout
+ unsigned mbClipOnBounds : 1; // for CustomShapes text layout
protected:
// local decomposition.
@@ -234,7 +235,8 @@ namespace drawinglayer
bool bFixedCellHeight,
bool bUnlimitedPage,
bool bCellText,
- bool bWordWrap);
+ bool bWordWrap,
+ bool bClipOnBounds);
// get data
const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; }
@@ -244,6 +246,7 @@ namespace drawinglayer
bool getUnlimitedPage() const { return mbUnlimitedPage; }
bool getCellText() const { return mbCellText; }
bool getWordWrap() const { return mbWordWrap; }
+ bool getClipOnBounds() const { return mbClipOnBounds; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index a4b0d8736618..4e3b1ebf4889 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -1351,7 +1351,6 @@
#define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092)
#define SID_OBJECT_MIRROR (SID_SVX_START+1093)
-#define SID_INSERT_POSTIT (SID_SVX_START+1093)
#define SID_DELETE_POSTIT (SID_SVX_START+1094)
#define SID_NEXT_POSTIT (SID_SVX_START+1095)
#define SID_PREVIOUS_POSTIT (SID_SVX_START+1096)
@@ -1359,9 +1358,10 @@
#define SID_SHOW_POSTIT (SID_SVX_START+1098)
#define SID_REPLYTO_POSTIT (SID_SVX_START+1099)
#define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100)
+#define SID_INSERT_POSTIT (SID_SVX_START+1101)
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE SID_DELETEALLBYAUTHOR_POSTIT + 1
+#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1
// --------------------------------------------------------------------------
// Overflow check for slot IDs
diff --git a/svx/prj/build.lst b/svx/prj/build.lst
index 56980702fb2d..2f595a2de9d7 100644
--- a/svx/prj/build.lst
+++ b/svx/prj/build.lst
@@ -22,7 +22,7 @@ sx svx\source\svdraw nmake - all sx_draw sx_inc NULL
sx svx\source\sdr\attribute nmake - all sx_attribute sx_inc NULL
sx svx\source\sdr\primitive2d nmake - all sx_primitive2d sx_inc NULL
sx svx\source\sdr\primitive3d nmake - all sx_primitive3d sx_inc NULL
-sx svx\source\table nmake - all sx_table NULL
+sx svx\source\table nmake - all sx_table sx_inc NULL
sx svx\source\sdr\properties nmake - all sx_properties sx_inc NULL
sx svx\source\sdr\contact nmake - all sx_contact sx_inc NULL
sx svx\source\sdr\event nmake - all sx_event sx_inc NULL
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 28f50ef89b5c..e3826708c196 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -5954,7 +5954,7 @@ SfxVoidItem InsertAnnotation SID_INSERT_POSTIT
]
//--------------------------------------------------------------------------
-SfxBoolItem ShowAnnotation SID_SHOW_POSTIT
+SfxBoolItem ShowAnnotations SID_SHOW_POSTIT
()
[
/* flags: */
diff --git a/svx/source/cui/optimprove2.cxx b/svx/source/cui/optimprove2.cxx
index 28989080ca0a..b988c7b75bad 100644
--- a/svx/source/cui/optimprove2.cxx
+++ b/svx/source/cui/optimprove2.cxx
@@ -149,7 +149,13 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
{
::rtl::OUString sLogFile( m_sLogPath );
sLogFile += C2S("/Current.csv");
- uno::Sequence< beans::PropertyValue > aArgs;
+ uno::Sequence< beans::PropertyValue > aArgs(3);
+ aArgs[0].Name = ::rtl::OUString::createFromAscii("FilterName");
+ aArgs[0].Value = uno::makeAny(::rtl::OUString::createFromAscii("Text - txt - csv (StarCalc)"));
+ aArgs[1].Name = ::rtl::OUString::createFromAscii("FilterOptions");
+ aArgs[1].Value = uno::makeAny(::rtl::OUString::createFromAscii("44,34,12,1,"));
+ aArgs[2].Name = ::rtl::OUString::createFromAscii("ReadOnly");
+ aArgs[2].Value = uno::makeAny(true);
uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
xDesktop, sLogFile, C2S("_default"), 0, aArgs );
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index f53168a273ac..afff309168ac 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -763,12 +763,18 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
Fraction aZoom = GetZoom();
// not all of these controls need to know the new zoom, but to be sure ...
- Font aFont( IsControlFont() ? GetControlFont() : GetPointFont());
+ Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
+ if ( IsControlFont() )
+ aFont.Merge( GetControlFont() );
+
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
{
pWindows[i]->SetZoom(aZoom);
pWindows[i]->SetZoomedPointFont(aFont);
}
+
+ SetZoomedPointFont( aFont );
+
// rearrange the controls
m_nDefaultWidth = ArrangeControls();
}
@@ -1075,18 +1081,13 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat )
{
if ( m_bNavigationBar )
{
- m_aBar.SetZoom( GetZoom() );
-
Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont();
if ( IsControlFont() )
- {
m_aBar.SetControlFont( GetControlFont() );
- aFont.Merge( GetControlFont() );
- }
else
m_aBar.SetControlFont();
- m_aBar.SetZoomedPointFont( aFont );
+ m_aBar.SetZoom( GetZoom() );
}
}
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 10c0978288a6..fc7f1aa78558 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -101,6 +101,7 @@ namespace svx
//====================================================================
static SfxSlotId pTextControlSlots[] =
{
+ SID_CLIPBOARD_FORMAT_ITEMS,
SID_CUT,
SID_COPY,
SID_PASTE,
@@ -140,7 +141,6 @@ namespace svx
// SID_TEXTDIRECTION_TOP_TO_BOTTOM,
SID_ATTR_CHAR_SCALEWIDTH, /* 911 */
SID_ATTR_CHAR_RELIEF,
- SID_CLIPBOARD_FORMAT_ITEMS, /* 922 */
SID_ATTR_PARA_LEFT_TO_RIGHT, /* 950 */
SID_ATTR_PARA_RIGHT_TO_LEFT,
0
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 0e751e3181e7..c9cfde91547a 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -3234,6 +3234,8 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
{
// MapUnit eMap( rManager.GetModel()->GetScaleUnit() );
+ sal_Bool bHasShadow = sal_False;
+
for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() )
{
UINT32 nRecType = GetCurKey();
@@ -3305,8 +3307,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
break;
case DFF_Prop_fshadowObscured :
{
- sal_Bool bHasShadow = ( nContent & 2 ) != 0;
- rSet.Put( SdrShadowItem( bHasShadow ) );
+ bHasShadow = ( nContent & 2 ) != 0;
if ( bHasShadow )
{
if ( !IsProperty( DFF_Prop_shadowOffsetX ) )
@@ -3319,6 +3320,44 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
}
}
+ if ( bHasShadow )
+ {
+ // #160376# sj: activating shadow only if fill and or linestyle is used
+ // this is required because of the latest drawing layer core changes.
+ // Issue i104085 is related to this.
+ UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
+ if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType ))
+ nLineFlags &= ~0x08;
+ UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
+ if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType ))
+ nFillFlags &= ~0x10;
+ if ( nFillFlags & 0x10 )
+ {
+ MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid );
+ switch( eMSO_FillType )
+ {
+ case mso_fillSolid :
+ case mso_fillPattern :
+ case mso_fillTexture :
+ case mso_fillPicture :
+ case mso_fillShade :
+ case mso_fillShadeCenter :
+ case mso_fillShadeShape :
+ case mso_fillShadeScale :
+ case mso_fillShadeTitle :
+ break;
+ // case mso_fillBackground :
+ default:
+ nFillFlags &=~0x10; // no fillstyle used
+ break;
+ }
+ }
+ if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) ) // if there is no fillstyle and linestyle
+ bHasShadow = sal_False; // we are turning shadow off.
+
+ if ( bHasShadow )
+ rSet.Put( SdrShadowItem( bHasShadow ) );
+ }
ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269#
ApplyFillAttributes( rIn, rSet, rObjData );
if ( rObjData.eShapeType != mso_sptNil )
@@ -3770,14 +3809,37 @@ FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor
return TRUE;
}
+// sj: the documentation is not complete, especially in ppt the normal rgb for text
+// color is written as 0xfeRRGGBB, this can't be explained by the documentation, nearly
+// every bit in the upper code is set -> so there seems to be a special handling for
+// ppt text colors, i decided not to fix this in MSO_CLR_ToColor because of possible
+// side effects, instead MSO_TEXT_CLR_ToColor is called for PPT text colors, to map
+// the color code to something that behaves like the other standard color codes used by
+// fill and line color
+Color SvxMSDffManager::MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const
+{
+ // Fuer Textfarben: Header ist 0xfeRRGGBB
+ if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
+ nColorCode &= 0x00ffffff;
+ else
+ {
+ // for colorscheme colors the color index are the lower three bits of the upper byte
+ if ( ( nColorCode & 0xf8000000 ) == 0 ) // this must be a colorscheme index
+ {
+ nColorCode >>= 24;
+ nColorCode |= 0x8000000;
+ }
+ }
+ return MSO_CLR_ToColor( nColorCode );
+}
Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContentProperty ) const
{
Color aColor( mnDefaultColor );
// Fuer Textfarben: Header ist 0xfeRRGGBB
- if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
- nColorCode &= 0x00ffffff;
+ if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) // sj: it needs to be checked if 0xfe is used in
+ nColorCode &= 0x00ffffff; // other cases than ppt text -> if not this code can be removed
sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 );
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx
index 3da9e8dbecac..fc144cf4304f 100644
--- a/svx/source/outliner/outliner.cxx
+++ b/svx/source/outliner/outliner.cxx
@@ -1867,6 +1867,20 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
return 0;
}
+static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& rN2 )
+{
+ if( rN1.GetNumberingType() != rN2.GetNumberingType() )
+ return false;
+
+ if( rN1.GetNumStr(1) != rN2.GetNumStr(1) )
+ return false;
+
+ if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) )
+ return false;
+
+ return true;
+}
+
sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt )
{
sal_uInt16 nNumber = pParaFmt->GetStart() - 1;
@@ -1879,8 +1893,8 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
pPara = pParaList->GetParagraph( nPara );
const sal_Int16 nDepth = pPara->GetDepth();
- // ignore paragraphs that are below our paragraph
- if( nDepth > nParaDepth )
+ // ignore paragraphs that are below our paragraph or have no numbering
+ if( (nDepth > nParaDepth) || (nDepth == -1) )
continue;
// stop on paragraphs that are above our paragraph
@@ -1888,8 +1902,13 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
break;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
- if( pFmt == 0 || (*pFmt != *pParaFmt) )
- break; // change in number format, stop here
+
+ if( pFmt == 0 )
+ continue; // ignore paragraphs without bullets
+
+ // check if numbering is the same
+ if( !isSameNumbering( *pFmt, *pParaFmt ) )
+ break;
const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx
index 098a4055ce0f..a69776df14e8 100644
--- a/svx/source/outliner/outlvw.cxx
+++ b/svx/source/outliner/outlvw.cxx
@@ -1010,6 +1010,14 @@ void OutlinerView::PasteSpecial()
pOwner->bPasting = TRUE;
pEditView->PasteSpecial();
+ if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ {
+ const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount();
+
+ for( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+ pOwner->ImplSetLevelDependendStyleSheet( nPara );
+ }
+
pEditView->SetEditEngineUpdateMode( TRUE );
pOwner->UndoActionEnd( OLUNDO_INSERT );
pEditView->ShowCursor( TRUE, TRUE );
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 6a92cb27ff8c..7527b177b3a4 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -310,6 +310,7 @@ namespace sdr
false,
false,
false,
+ false,
false);
// decompose immediately with neutral ViewInformation. This will
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index 9d6548a1b791..7bea25feeeed 100644
--- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
@@ -121,36 +121,18 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
ViewObjectContact& ViewContactOfUnoControl::CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact )
{
+ // print or print preview requires special handling
+ const OutputDevice* pDevice = _rObjectContact.TryToGetOutputDevice();
+ bool bPrintOrPreview = ( pDevice != NULL ) && ( pDevice->GetOutDevType() == OUTDEV_PRINTER );
+
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &_rObjectContact );
- if ( pPageViewContact )
- {
- // special classes for special devices:
- // - PDF export
- ::vcl::PDFExtOutDevData* pPDFExport = PTR_CAST( ::vcl::PDFExtOutDevData, pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetExtOutDevData() );
- if ( pPDFExport != NULL )
- return *new UnoControlPDFExportContact( *pPageViewContact, *this );
-
- // - print preview
- if ( pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview() )
- return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
-
- OutDevType eDeviceType = pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetOutDevType();
- // - printing
- if ( eDeviceType == OUTDEV_PRINTER )
- return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
-
- // - any other virtual device
- if ( eDeviceType == OUTDEV_VIRDEV )
- return *new UnoControlDefaultContact( *pPageViewContact, *this );
-
- // - normal windows have special, design-mode dependent handling
- if ( eDeviceType == OUTDEV_WINDOW )
- return *new UnoControlWindowContact( *pPageViewContact, *this );
- }
+ bPrintOrPreview |= ( pPageViewContact != NULL ) && pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview();
+
+ if ( bPrintOrPreview )
+ return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
- // if we're not working for a ObjectContactOfPageView, then we can't use a ViewObjectContactOfUnoControl, or any
- // of its derivees. Fall back to a "normal" SdrObj's contact object.
- return *new ViewObjectContactOfSdrObj( _rObjectContact, *this );
+ // all others are nowadays served by the same implementation
+ return *new ViewObjectContactOfUnoControl( _rObjectContact, *this );
}
//--------------------------------------------------------------------
@@ -173,7 +155,7 @@ namespace sdr { namespace contact {
aTransform.set(0, 2, aRange.getMinX());
aTransform.set(1, 2, aRange.getMinY());
- // create control primitive WITHOUT evtl. existing XControl; this would be done in
+ // create control primitive WITHOUT possibly existing XControl; this would be done in
// the VOC in createPrimitive2DSequence()
const drawinglayer::primitive2d::Primitive2DReference xRetval(new drawinglayer::primitive2d::ControlPrimitive2D(
aTransform, xControlModel));
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 667129e27653..bbfe3eaf65ab 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -402,7 +402,7 @@ namespace sdr { namespace contact {
//= InvisibleControlViewAccess
//====================================================================
/** is a ->IPageViewAccess implementation which can be used to create an invisble control for
- an arbitrary device
+ an arbitrary window
*/
class InvisibleControlViewAccess : public IPageViewAccess
{
@@ -446,6 +446,47 @@ namespace sdr { namespace contact {
}
//====================================================================
+ //= DummyPageViewAccess
+ //====================================================================
+ /** is a ->IPageViewAccess implementation which can be used to create a control for an arbitrary
+ non-Window device
+
+ The implementation will report the "PageView" as being in design mode, all layers to be visible,
+ and will not return any ControlContainer, so all control container related features (notifications etc)
+ are not available.
+ */
+ class DummyPageViewAccess : public IPageViewAccess
+ {
+ public:
+ DummyPageViewAccess()
+ {
+ }
+
+ virtual bool isDesignMode() const;
+ virtual Reference< XControlContainer >
+ getControlContainer( const OutputDevice& _rDevice ) const;
+ virtual bool isLayerVisible( SdrLayerID _nLayerID ) const;
+ };
+
+ //--------------------------------------------------------------------
+ bool DummyPageViewAccess::isDesignMode() const
+ {
+ return true;
+ }
+
+ //--------------------------------------------------------------------
+ Reference< XControlContainer > DummyPageViewAccess::getControlContainer( const OutputDevice& /*_rDevice*/ ) const
+ {
+ return NULL;
+ }
+
+ //--------------------------------------------------------------------
+ bool DummyPageViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const
+ {
+ return true;
+ }
+
+ //====================================================================
//= ViewObjectContactOfUnoControl_Impl
//====================================================================
typedef ::cppu::WeakImplHelper4 < XWindowListener
@@ -763,8 +804,9 @@ namespace sdr { namespace contact {
This method cares for this, by retrieving the very original OutputDevice.
*/
- static const OutputDevice& imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact );
- const OutputDevice& imp_getPageViewDevice_nothrow() const;
+ static const OutputDevice& impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact );
+
+ const OutputDevice& impl_getOutputDevice_throw() const;
private:
ViewObjectContactOfUnoControl_Impl(); // never implemented
@@ -829,6 +871,13 @@ namespace sdr { namespace contact {
static void getTransformation( const ViewContactOfUnoControl& _rVOC, ::basegfx::B2DHomMatrix& _out_Transformation );
private:
+ void impl_positionAndZoomControl( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
+ {
+ if ( !_rViewInformation.getViewport().isEmpty() )
+ m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() );
+ }
+
+ private:
::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pVOCImpl;
/** The geometry is part of the identity of an primitive, so we cannot calculate it on demand
(since the data the calculation is based on might have changed then), but need to calc
@@ -854,9 +903,15 @@ namespace sdr { namespace contact {
DBG_CTOR( ViewObjectContactOfUnoControl_Impl, NULL );
DBG_ASSERT( m_pAntiImpl, "ViewObjectContactOfUnoControl_Impl::ViewObjectContactOfUnoControl_Impl: invalid AntiImpl!" );
- const OutputDevice& rPageViewDevice( imp_getPageViewDevice_nothrow() );
+ const OutputDevice& rPageViewDevice( impl_getOutputDevice_throw() );
m_aZoomLevelNormalization = rPageViewDevice.GetInverseViewTransformation();
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ m_aZoomLevelNormalization.decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
+
::basegfx::B2DHomMatrix aScaleNormalization;
MapMode aCurrentDeviceMapMode( rPageViewDevice.GetMapMode() );
aScaleNormalization.set( 0, 0, (double)aCurrentDeviceMapMode.GetScaleX() );
@@ -953,27 +1008,40 @@ namespace sdr { namespace contact {
return false;
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
- DBG_ASSERT( pPageViewContact, "ViewObjectContactOfUnoControl_Impl::ensureControl: cannot create a control if I don't have a PageView!" );
- if ( !pPageViewContact )
- return false;
+ if ( pPageViewContact )
+ {
+ SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
+ return impl_ensureControl_nothrow(
+ aPVAccess,
+ impl_getPageViewOutputDevice_nothrow( *pPageViewContact )
+ );
+ }
- SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
+ DummyPageViewAccess aNoPageView;
return impl_ensureControl_nothrow(
- aPVAccess,
- imp_getPageViewDevice_nothrow( *pPageViewContact )
+ aNoPageView,
+ impl_getOutputDevice_throw()
);
}
//--------------------------------------------------------------------
- const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow() const
+ const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getOutputDevice_throw() const
{
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
- ENSURE_OR_THROW( pPageViewContact, "need a ObjectContactOfPageView." );
- return imp_getPageViewDevice_nothrow( *pPageViewContact );
+ if ( pPageViewContact )
+ {
+ // do not use ObjectContact::TryToGetOutputDevice here, it would not care for the PageWindow's
+ // OriginalPaintWindow
+ return impl_getPageViewOutputDevice_nothrow( *pPageViewContact );
+ }
+
+ const OutputDevice* pDevice = m_pAntiImpl->GetObjectContact().TryToGetOutputDevice();
+ ENSURE_OR_THROW( pDevice, "no output device -> no control" );
+ return *pDevice;
}
//--------------------------------------------------------------------
- const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact )
+ const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact )
{
// if the PageWindow has a patched PaintWindow, use the original PaintWindow
// this ensures that our control is _not_ re-created just because somebody
@@ -1522,18 +1590,28 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::get2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
{
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
if ( m_pVOCImpl->hasControl() )
- m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() );
+ impl_positionAndZoomControl( _rViewInformation );
return BasePrimitive2D::get2DDecomposition( _rViewInformation );
}
//--------------------------------------------------------------------
::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocalDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
{
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
// force control here to make it a VCL ChildWindow. Will be fetched
// and used below by getExistentControl()
m_pVOCImpl->ensureControl();
- m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() );
+ impl_positionAndZoomControl( _rViewInformation );
// get needed data
const ViewContactOfUnoControl& rViewContactOfUnoControl( m_pVOCImpl->getViewContact() );
@@ -1704,40 +1782,6 @@ namespace sdr { namespace contact {
}
//====================================================================
- //= UnoControlDefaultContact
- //====================================================================
- DBG_NAME( UnoControlDefaultContact )
- //--------------------------------------------------------------------
- UnoControlDefaultContact::UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlDefaultContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlDefaultContact::~UnoControlDefaultContact()
- {
- DBG_DTOR( UnoControlDefaultContact, NULL );
- }
-
- //====================================================================
- //= UnoControlWindowContact
- //====================================================================
- DBG_NAME( UnoControlWindowContact )
- //--------------------------------------------------------------------
- UnoControlWindowContact::UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlWindowContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlWindowContact::~UnoControlWindowContact()
- {
- DBG_DTOR( UnoControlWindowContact, NULL );
- }
-
- //====================================================================
//= UnoControlPrintOrPreviewContact
//====================================================================
DBG_NAME( UnoControlPrintOrPreviewContact )
@@ -1762,23 +1806,6 @@ namespace sdr { namespace contact {
return ViewObjectContactOfUnoControl::createPrimitive2DSequence( rDisplayInfo );
}
- //====================================================================
- //= UnoControlPDFExportContact
- //====================================================================
- DBG_NAME( UnoControlPDFExportContact )
- //--------------------------------------------------------------------
- UnoControlPDFExportContact::UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlPDFExportContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlPDFExportContact::~UnoControlPDFExportContact()
- {
- DBG_DTOR( UnoControlPDFExportContact, NULL );
- }
-
//........................................................................
} } // namespace sdr::contact
//........................................................................
diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
index 3c8feb7ff2b2..73d5689350c2 100644
--- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
@@ -123,6 +123,7 @@ namespace drawinglayer
*getSdrLFSTAttribute().getText(),
getSdrLFSTAttribute().getLine(),
false,
+ false,
false));
}
diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
index 0edbe1a35046..a04021ae21ad 100644
--- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
@@ -72,7 +72,7 @@ namespace drawinglayer
// add text
if(getSdrLSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index 497266433d67..e2dce7b551ed 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -60,8 +60,9 @@ namespace drawinglayer
getTextBox(),
*getSdrSTAttribute().getText(),
0,
- isForceTextClipToTextRange(), // #SJ# use CellText mode; text upper-left
- getWordWrap()));
+ false,
+ getWordWrap(),
+ isForceTextClipToTextRange()));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 09769a2a013e..cd426edfdd05 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -173,7 +173,8 @@ namespace drawinglayer
const attribute::SdrTextAttribute& rText,
const attribute::SdrLineAttribute* pStroke,
bool bCellText,
- bool bWordWrap)
+ bool bWordWrap,
+ bool bClipOnBounds)
{
basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform);
SdrTextPrimitive2D* pNew = 0;
@@ -297,7 +298,8 @@ namespace drawinglayer
rText.isFixedCellHeight(),
rText.isScroll(),
bCellText,
- bWordWrap);
+ bWordWrap,
+ bClipOnBounds);
}
}
diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
index ed3062184f1a..4f7e2c768669 100644
--- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
@@ -94,7 +94,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
@@ -191,7 +191,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index f5f2f4e876dc..63d050a775af 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -104,7 +104,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index 4b5dc8a3b48e..cb2452e8ba1f 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -136,6 +136,7 @@ namespace drawinglayer
pTextAttribute->isScroll(),
false,
false,
+ false,
false);
aTextRange = pBlockText->getB2DRange(aViewInformation);
}
diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
index ab5d23962719..7c44311d3c5a 100644
--- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
@@ -110,7 +110,7 @@ namespace drawinglayer
// always supported by the old paints, too
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
index 91ed0bd2adce..96da706fb66a 100644
--- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
@@ -89,7 +89,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index 64ac716b40e9..edb2837ef670 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -110,7 +110,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
index 748270c36977..47e85894f37e 100644
--- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
@@ -382,7 +382,8 @@ namespace drawinglayer
bool bFixedCellHeight,
bool bUnlimitedPage,
bool bCellText,
- bool bWordWrap)
+ bool bWordWrap,
+ bool bClipOnBounds)
: SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
maTextRangeTransform(rTextRangeTransform),
maSdrTextHorzAdjust(aSdrTextHorzAdjust),
@@ -390,7 +391,8 @@ namespace drawinglayer
mbFixedCellHeight(bFixedCellHeight),
mbUnlimitedPage(bUnlimitedPage),
mbCellText(bCellText),
- mbWordWrap(bWordWrap)
+ mbWordWrap(bWordWrap),
+ mbClipOnBounds(bClipOnBounds)
{
}
@@ -406,7 +408,8 @@ namespace drawinglayer
&& isFixedCellHeight() == rCompare.isFixedCellHeight()
&& getUnlimitedPage() == rCompare.getUnlimitedPage()
&& getCellText() == rCompare.getCellText()
- && getWordWrap() == rCompare.getWordWrap());
+ && getWordWrap() == rCompare.getWordWrap()
+ && getClipOnBounds() == rCompare.getClipOnBounds());
}
return false;
@@ -423,7 +426,8 @@ namespace drawinglayer
isFixedCellHeight(),
getUnlimitedPage(),
getCellText(),
- getWordWrap());
+ getWordWrap(),
+ getClipOnBounds());
}
// provide unique ID
diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx
index d0b01f6a820f..af38c34e0749 100644
--- a/svx/source/svdraw/svdfppt.cxx
+++ b/svx/source/svdraw/svdfppt.cxx
@@ -3972,7 +3972,7 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager,
aFont.SetFamily( pAtom->eFamily );
aFont.SetPitch( pAtom->ePitch );
}
- Color aCol( rManager.MSO_CLR_ToColor( nBulletColor ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nBulletColor ) );
aFont.SetColor( aCol );
sal_uInt16 nBuChar = (sal_uInt16)nBulletChar;
@@ -5886,14 +5886,14 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
{
if ( GetAttrib( PPT_CharAttr_FontColor, nVal, nDestinationInstance ) ) // Textfarbe (4Byte-Arg)
{
- Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
if ( nDestinationInstance == 0xffffffff )
mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet = aCol;
}
else if ( nVal & 0x0f000000 ) // this is not a hard attribute, but maybe the page has a different colerscheme,
{ // so that in this case we must use a hard color attribute
- Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
Color& aColorInSheet = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet;
if ( aColorInSheet != aCol )
rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
@@ -6315,7 +6315,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
nColor = rParaLevel.mnBulletColor;
else
nColor = rCharLevel.mnFontColor;
- aNumberFormat2.SetBulletColor( rManager.MSO_CLR_ToColor( nColor ) );
+ aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
pRule->SetLevel( i, aNumberFormat2 );
}
}
@@ -7611,8 +7611,8 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
{
Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
aBorderLine.Color = aLineColor.GetColor();
- aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() );
- aBorderLine.InnerLineWidth = 0;
+ aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
+ aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
aBorderLine.LineDistance = 0;
}
break;
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 93d3651e3f01..e72b606f3b53 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -800,24 +800,32 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
const bool bVerticalWritintg(rSdrBlockTextPrimitive.getOutlinerParaObject().IsVertical());
const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight));
+ // check if block text is used (only one of them can be true)
+ const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg);
+ const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg);
+
+ // set minimal paper size hor/ver if needed
+ if(bHorizontalIsBlock)
+ {
+ rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
+ }
+ else if(bVerticalIsBlock)
+ {
+ rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
+ }
+
if(bIsCell)
{
// cell text is formated neither like a text object nor like a object
// text, so use a special setup here
- rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
rOutliner.SetPaperSize(aAnchorTextSize);
- rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
- rOutliner.SetUpdateMode(TRUE);
+ rOutliner.SetUpdateMode(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
- rOutliner.SetUpdateMode(TRUE);
rOutliner.SetControlWord(nOriginalControlWord);
}
else
{
- // check if block text is used (only one of them can be true)
- const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg);
- const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg);
if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
{
@@ -843,16 +851,6 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize);
}
- // set minimal paper size hor/ver if needed
- if(bHorizontalIsBlock)
- {
- rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
- }
- else if(bVerticalIsBlock)
- {
- rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
- }
-
rOutliner.SetPaperSize(aNullSize);
rOutliner.SetUpdateMode(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
@@ -931,7 +929,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
// as the master shape we are working on. For vertical, use the top-right
// corner
const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX());
- aNewTransformA.translate(fStartInX, aAdjustTranslate.getY());
+ const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY());
+ aNewTransformA.translate(aAdjOffset.getX(), aAdjOffset.getY());
// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
// move the null point which was top left to bottom right.
@@ -948,10 +947,10 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
// #SJ# create ClipRange (if needed)
basegfx::B2DRange aClipRange;
- if(bIsCell)
+ if(rSdrBlockTextPrimitive.getClipOnBounds())
{
- aClipRange.expand(basegfx::B2DTuple(0.0, 0.0));
- aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()));
+ aClipRange.expand(-aAdjOffset);
+ aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset);
}
// now break up text primitives.
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 45a24211f7b2..e53f41251ff2 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -123,7 +123,7 @@ namespace drawinglayer
getTransform(),
*getSdrFTAttribute().getText(),
0,
- true, false));
+ true, false, false));
}
}
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 7f7aedf860e9..c0e301f3792e 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -252,7 +252,10 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField(
{
nId = ID_EXT_FILEFIELD;
}
- else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
+ else if (aFieldType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("docinfo.Title") ) ||
+ aFieldType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
{
nId = ID_FILEFIELD;
}
diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx
index efb4226f9c12..6ff4c2aafe3e 100644
--- a/svx/source/unoedit/unofield.cxx
+++ b/svx/source/unoedit/unofield.cxx
@@ -1062,7 +1062,7 @@ OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeExc
return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextField"));
}
-static const sal_Char* pServiceNames[] =
+static const sal_Char* pOldServiceNames[] =
{
"com.sun.star.text.TextField.DateTime",
"com.sun.star.text.TextField.URL",
@@ -1081,14 +1081,34 @@ static const sal_Char* pServiceNames[] =
"com.sun.star.presentation.TextField.DateTime"
};
+static const sal_Char* pNewServiceNames[] =
+{
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.URL",
+ "com.sun.star.text.textfield.PageNumber",
+ "com.sun.star.text.textfield.PageCount",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.docinfo.Title", // SvxFileField is used for title
+ "com.sun.star.text.textfield.SheetName",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.FileName",
+ "com.sun.star.text.textfield.Author",
+ "com.sun.star.text.textfield.Measure",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.presentation.textfield.Header",
+ "com.sun.star.presentation.textfield.Footer",
+ "com.sun.star.presentation.textfield.DateTime"
+};
+
uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSeq( 3 );
+ uno::Sequence< OUString > aSeq( 4 );
OUString* pServices = aSeq.getArray();
- pServices[0] = OUString::createFromAscii( pServiceNames[mnServiceId] );
- pServices[1] = OUString::createFromAscii( "com.sun.star.text.TextContent" ),
- pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextField" );
+ pServices[0] = OUString::createFromAscii( pNewServiceNames[mnServiceId] );
+ pServices[1] = OUString::createFromAscii( pOldServiceNames[mnServiceId] );
+ pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextContent" ),
+ pServices[3] = OUString::createFromAscii( "com.sun.star.text.TextField" );
return aSeq;
}
diff --git a/svx/source/xml/xmltxtexp.cxx b/svx/source/xml/xmltxtexp.cxx
index 4f034b098db7..5db6cc809bce 100644
--- a/svx/source/xml/xmltxtexp.cxx
+++ b/svx/source/xml/xmltxtexp.cxx
@@ -247,7 +247,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( co
return uno::Reference< uno::XInterface >(
SvxCreateNumRule( (SdrModel*)NULL ), uno::UNO_QUERY );
}
- if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime") ) )
+ if ( (0 == aServiceSpecifier.reverseCompareToAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.textfield.DateTime")))
+ || (0 == aServiceSpecifier.reverseCompareToAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime")))
+ )
{
return (::cppu::OWeakObject * )new SvxUnoTextField( ID_EXT_DATEFIELD );
}
diff --git a/uui/source/ids.src b/uui/source/ids.src
index cb011f27a7c0..fc82161bbb81 100644
--- a/uui/source/ids.src
+++ b/uui/source/ids.src
@@ -45,12 +45,12 @@ String RID_SAVE_PASSWORD
};
-String( STR_WARNING_BROKENSIGNATURE_TITLE )
+String STR_WARNING_BROKENSIGNATURE_TITLE
{
Text [ en-US ] = "Invalid Document Signature" ;
};
-String( STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE )
+String STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE
{
Text [ en-US ] = "Non-Encrypted Streams" ;
};
diff --git a/xmlhelp/source/com/sun/star/help/makefile.mk b/xmlhelp/source/com/sun/star/help/makefile.mk
index 1e1a2c518fa0..db6e619b31e3 100644
--- a/xmlhelp/source/com/sun/star/help/makefile.mk
+++ b/xmlhelp/source/com/sun/star/help/makefile.mk
@@ -58,8 +58,6 @@ CFLAGS+=-DSYSTEM_EXPAT
JAVACLASSFILES = \
- $(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpIndexerTool.class \
- $(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpFileDocument.class \
$(CLASSDIR)$/$(PACKAGE)$/HelpSearch.class \
$(CLASSDIR)$/$(PACKAGE)$/HelpComponent.class \
$(CLASSDIR)$/$(PACKAGE)$/HelpIndexer.class
@@ -75,9 +73,7 @@ TRANSEX3FILES = \
ADDFILES = $(subst,$(SOLARBINDIR)$/help,$(CLASSDIR) $(TRANSEX3FILES))
-#JAVAFILES = $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES)))
-
-JARFILES = ridl.jar jurt.jar unoil.jar juh.jar HelpIndexerTool.jar
+JARFILES = ridl.jar jurt.jar unoil.jar juh.jar
.IF "$(SYSTEM_LUCENE)" == "YES"
XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR)
COMP=fix_system_lucene
@@ -96,6 +92,7 @@ CUSTOMMANIFESTFILE = MANIFEST.MF
ALLTAR : $(ADDFILES)
.IF "$(JARTARGETN)"!=""
+$(JAVATARGET) : $(ADDFILES)
$(JARTARGETN) : $(ADDFILES)
$(JARTARGETN) : $(COMP)
.ENDIF
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 050b5d419c99..c0980017c2ed 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -802,6 +802,10 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
for( sal_uInt32 i = 0; i < id.size(); ++i )
{
+ // the following object must live longer than the
+ // pointer returned by aDBData.getData()
+ DBData aDBData;
+
listId[i] = id[i];
listAnchor[i] = anchor[i];
@@ -813,7 +817,6 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
DBHelp* pDBHelp = pDb->getDBHelp();
if( pDBHelp != NULL )
{
- DBData aDBData;
bool bSuccess = pDBHelp->getValueForKey( idi, aDBData );
if( bSuccess )
{
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index d46758ba2ee7..c8685645c6fd 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -1080,6 +1080,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
ugblData = &userData;
+ xmlInitParser();
xmlRegisterInputCallbacks(zipMatch, zipOpen, zipRead, uriClose);
xmlRegisterInputCallbacks(helpMatch, helpOpen, helpRead, uriClose);
xmlRegisterInputCallbacks(fileMatch, fileOpen, fileRead, fileClose);
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index d4dc48ede241..0dece7c6965c 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1629,6 +1629,7 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion
if ( aODFVersion.getLength() && aODFVersion.compareTo( ODFVER_012_TEXT ) >= 0 )
{
// check the consistency only for the ODF1.2 and later ( according to content.xml )
+ // manifest.xml might have no version, it should be checked here and the correct version should be set
try
{
uno::Reference< document::XStorageBasedDocument > xDoc( mxModel, uno::UNO_QUERY_THROW );
@@ -1654,7 +1655,24 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion
::rtl::OUString aStorVersion;
xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) )
>>= aStorVersion;
- bResult = aODFVersion.equals( aStorVersion );
+
+ // if the storage version is set in manifest.xml, it must be the same as in content.xml
+ // if not, set it explicitly to be used further ( it will work even for readonly storage )
+ // This workaround is not nice, but I see no other way to handle it, since there are
+ // ODF1.2 documents without version in manifest.xml
+ if ( aStorVersion.getLength() )
+ bResult = aODFVersion.equals( aStorVersion );
+ else
+ xStorProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ),
+ uno::makeAny( aODFVersion ) );
+
+ if ( bResult )
+ {
+ sal_Bool bInconsistent = sal_False;
+ xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsInconsistent" ) ) )
+ >>= bInconsistent;
+ bResult = !bInconsistent;
+ }
}
}
}
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 198938fdc8f6..708133efaf45 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -115,18 +115,31 @@ static sal_Char __READONLY_DATA FIELD_SERVICE_CONDITIONAL_TEXT[] = "ConditionalT
static sal_Char __READONLY_DATA FIELD_SERVICE_HIDDEN_TEXT[] = "HiddenText";
static sal_Char __READONLY_DATA FIELD_SERVICE_HIDDEN_PARAGRAPH[] = "HiddenParagraph";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR[] = "DocInfo.ChangeAuthor";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR2[] = "docinfo.ChangeAuthor";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME[] = "DocInfo.ChangeDateTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME2[] = "docinfo.ChangeDateTime";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_EDIT_TIME[] = "DocInfo.EditTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_EDIT_TIME2[] = "docinfo.EditTime";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_DESCRIPTION[] = "DocInfo.Description";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_DESCRIPTION2[] = "docinfo.Description";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR[] = "DocInfo.CreateAuthor";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR2[] = "docinfo.CreateAuthor";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME[] = "DocInfo.CreateDateTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME2[] = "docinfo.CreateDateTime";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CUSTOM[] = "DocInfo.Custom";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CUSTOM2[] = "docinfo.Custom";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR[] = "DocInfo.PrintAuthor";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR2[] = "docinfo.PrintAuthor";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME[] = "DocInfo.PrintDateTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME2[] = "docinfo.PrintDateTime";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_KEY_WORDS[] = "DocInfo.KeyWords";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_KEY_WORDS2[] = "docinfo.KeyWords";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_SUBJECT[] = "DocInfo.Subject";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_SUBJECT2[] = "docinfo.Subject";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_TITLE[] = "DocInfo.Title";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_TITLE2[] = "docinfo.Title";
static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_REVISION[] = "DocInfo.Revision";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_REVISION2[] = "docinfo.Revision";
static sal_Char __READONLY_DATA FIELD_SERVICE_FILE_NAME[] = "FileName";
static sal_Char __READONLY_DATA FIELD_SERVICE_CHAPTER[] = "Chapter";
static sal_Char __READONLY_DATA FIELD_SERVICE_TEMPLATE_NAME[] = "TemplateName";
@@ -177,18 +190,31 @@ SvXMLEnumStringMapEntry __READONLY_DATA aFieldServiceNameMapping[] =
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DB_NAME, FIELD_ID_DATABASE_NAME ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR, FIELD_ID_DOCINFO_CREATION_AUTHOR ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR2, FIELD_ID_DOCINFO_CREATION_AUTHOR ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME, FIELD_ID_DOCINFO_CREATION_TIME),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME2, FIELD_ID_DOCINFO_CREATION_TIME),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR, FIELD_ID_DOCINFO_SAVE_AUTHOR ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR2, FIELD_ID_DOCINFO_SAVE_AUTHOR ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME, FIELD_ID_DOCINFO_SAVE_TIME ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME2, FIELD_ID_DOCINFO_SAVE_TIME ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_EDIT_TIME, FIELD_ID_DOCINFO_EDIT_DURATION ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_EDIT_TIME2, FIELD_ID_DOCINFO_EDIT_DURATION ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_DESCRIPTION, FIELD_ID_DOCINFO_DESCRIPTION ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_DESCRIPTION2, FIELD_ID_DOCINFO_DESCRIPTION ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CUSTOM, FIELD_ID_DOCINFO_CUSTOM ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_CUSTOM2, FIELD_ID_DOCINFO_CUSTOM ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR, FIELD_ID_DOCINFO_PRINT_AUTHOR ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR2, FIELD_ID_DOCINFO_PRINT_AUTHOR ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME, FIELD_ID_DOCINFO_PRINT_TIME ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME2, FIELD_ID_DOCINFO_PRINT_TIME ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_KEY_WORDS, FIELD_ID_DOCINFO_KEYWORDS ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_KEY_WORDS2, FIELD_ID_DOCINFO_KEYWORDS ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_SUBJECT, FIELD_ID_DOCINFO_SUBJECT ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_SUBJECT2, FIELD_ID_DOCINFO_SUBJECT ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_TITLE, FIELD_ID_DOCINFO_TITLE ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_TITLE2, FIELD_ID_DOCINFO_TITLE ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_REVISION, FIELD_ID_DOCINFO_REVISION ),
+ ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_DOC_INFO_REVISION2, FIELD_ID_DOCINFO_REVISION ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_CONDITIONAL_TEXT, FIELD_ID_CONDITIONAL_TEXT ),
ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_HIDDEN_TEXT, FIELD_ID_HIDDEN_TEXT ),
@@ -365,7 +391,7 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
// search for TextField service name
while( nCount-- )
{
- if( 0 == pNames->compareTo(sServicePrefix, sServicePrefix.getLength()))
+ if (pNames->matchIgnoreAsciiCase(sServicePrefix))
{
// TextField found => postfix is field type!
sFieldName = pNames->copy(sServicePrefix.getLength());