summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-09-16 17:08:52 +0200
committersb <sb@openoffice.org>2009-09-16 17:08:52 +0200
commit11418032c587bcee688fcb4f76739c0e2520193b (patch)
treefd69455f64f6f2940f9eab860e45b06e8abaf748
parentca107138e1786b636b8f81ebbcc9994ac7dd393f (diff)
parenta11aa70b384e3ca0df953b53cff6b4d7f9699147 (diff)
merged in DEV300_m59
-rw-r--r--configmgr/source/tree/localizedtreeactions.cxx5
-rwxr-xr-xconnectivity/inc/connectivity/DriversConfig.hxx4
-rwxr-xr-xconnectivity/source/commontools/DriversConfig.cxx23
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx35
-rwxr-xr-xconnectivity/source/drivers/ado/ado.xcu10
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/makefile.mk5
-rw-r--r--connectivity/source/drivers/mozab/makefile.mk2
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/makefile.mk2
-rwxr-xr-xconnectivity/source/drivers/mysql/mysql.xcu77
-rw-r--r--desktop/inc/deployment.hrc3
-rw-r--r--desktop/os2/source/applauncher/launcher.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.src4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.src2
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx31
-rw-r--r--desktop/source/deployment/unopkg/unopkg.src9
-rw-r--r--desktop/source/migration/pages.cxx7
-rw-r--r--desktop/source/migration/wizard.src2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx23
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx11
-rw-r--r--desktop/source/splash/makefile.mk1
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx6
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx10
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx10
-rw-r--r--embeddedobj/source/inc/commonembobj.hxx7
-rw-r--r--formula/source/core/api/token.cxx21
-rw-r--r--formula/util/makefile.mk10
-rw-r--r--framework/source/classes/bmkmenu.cxx2
-rw-r--r--framework/source/classes/menumanager.cxx6
-rw-r--r--framework/source/helper/actiontriggerhelper.cxx2
-rw-r--r--framework/source/services/backingwindow.cxx5
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx4
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx6
-rw-r--r--framework/source/uielement/newmenucontroller.cxx4
-rw-r--r--framework/source/uielement/toolbarmanager.cxx6
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu572
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu11
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu9
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs19
-rwxr-xr-xreadlicense_oo/util/makefile.pmk6
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc1
-rw-r--r--sfx2/sdi/sfx.sdi25
-rw-r--r--sfx2/source/appl/app.src4
-rw-r--r--sfx2/source/appl/shutdowniconOs2.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx66
-rw-r--r--shell/source/unix/exec/shellexec.cxx21
-rw-r--r--shell/source/unix/misc/open-url.c40
-rw-r--r--shell/source/unix/misc/senddoc.c40
-rw-r--r--svx/source/cui/macropg.src4
-rw-r--r--svx/source/cui/optaccessibility.cxx4
-rw-r--r--svx/source/cui/selector.cxx9
-rw-r--r--svx/source/cui/selector.hxx1
-rw-r--r--svx/source/dialog/imapwnd.cxx3
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx23
-rw-r--r--svx/source/fmcomp/gridcell.cxx854
-rw-r--r--svx/source/form/fmPropBrw.cxx14
-rw-r--r--svx/source/form/fmctrler.cxx8
-rw-r--r--svx/source/form/fmpgeimp.cxx95
-rw-r--r--svx/source/form/fmshimp.cxx10
-rw-r--r--svx/source/form/fmstring.src103
-rw-r--r--svx/source/form/fmview.cxx4
-rw-r--r--svx/source/form/formcontrolfactory.cxx70
-rw-r--r--svx/source/form/navigatortree.cxx2
-rw-r--r--svx/source/inc/fmPropBrw.hxx1
-rw-r--r--svx/source/inc/fmpgeimp.hxx13
-rw-r--r--svx/source/inc/fmresids.hrc46
-rw-r--r--svx/source/inc/formcontrolfactory.hxx17
-rw-r--r--svx/source/inc/gridcell.hxx199
-rw-r--r--svx/source/msfilter/msdffimp.cxx4
-rw-r--r--svx/source/svdraw/svdfppt.cxx41
-rw-r--r--svx/source/svdraw/svdoole2.cxx8
-rw-r--r--svx/source/xml/xmleohlp.cxx28
-rw-r--r--svx/util/makefile.mk4
-rw-r--r--uui/source/iahndl.cxx19
-rw-r--r--uui/source/iahndl.hxx4
-rw-r--r--uui/source/interactionhandler.cxx52
-rw-r--r--uui/source/interactionhandler.hxx8
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpLinker.cxx4
-rw-r--r--xmloff/inc/txtflde.hxx2
-rw-r--r--xmloff/inc/xmloff/txtparae.hxx9
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx1
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx25
-rw-r--r--xmloff/source/chart/SchXMLChartContext.hxx7
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx7
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx9
-rw-r--r--xmloff/source/core/xmlimp.cxx1
-rw-r--r--xmloff/source/core/xmltoken.cxx1
-rw-r--r--xmloff/source/style/GradientStyle.cxx2
-rw-r--r--xmloff/source/style/HatchStyle.cxx2
-rw-r--r--xmloff/source/style/TransGradientStyle.cxx2
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx165
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.hxx26
-rw-r--r--xmloff/source/text/txtflde.cxx15
-rw-r--r--xmloff/source/text/txtparae.cxx57
-rw-r--r--xmloff/source/text/txtparai.cxx256
-rw-r--r--xmloff/source/text/txtparaimphint.hxx23
97 files changed, 2367 insertions, 1074 deletions
diff --git a/configmgr/source/tree/localizedtreeactions.cxx b/configmgr/source/tree/localizedtreeactions.cxx
index 8cd40c4da79f..b2ed23a730b3 100644
--- a/configmgr/source/tree/localizedtreeactions.cxx
+++ b/configmgr/source/tree/localizedtreeactions.cxx
@@ -178,8 +178,11 @@ namespace
// -- -----------------------------
OSL_ENSURE( aValueType != uno::Type(), "VOID result type found");
- OSL_ENSURE( aValueType == parseTemplateName(_aSubtree.getElementTemplateName()),
+#if OSL_DEBUG_LEVEL > 0
+ uno::Type aTemplateType = parseTemplateName( _aSubtree.getElementTemplateName() );
+ OSL_ENSURE( ( aValueType == aTemplateType ) || ( aTemplateType.getTypeClass() == uno::TypeClass_ANY ),
"ERROR: Found Value Type doesn't match encoded value type in pseudo template name");
+#endif
OSL_POSTCOND( static_cast<ValueNode&>(*pResult).getValueType() == aValueType,
"ERROR: Resulting Value Type doesn't match original value type" );
diff --git a/connectivity/inc/connectivity/DriversConfig.hxx b/connectivity/inc/connectivity/DriversConfig.hxx
index 8a33019d57ed..bd86e9ce4397 100755
--- a/connectivity/inc/connectivity/DriversConfig.hxx
+++ b/connectivity/inc/connectivity/DriversConfig.hxx
@@ -73,6 +73,10 @@ namespace connectivity
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;
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index 906024f452a4..a72816d6427b 100755
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -139,6 +139,29 @@ DriversConfig::DriversConfig(const uno::Reference< lang::XMultiServiceFactory >&
{
m_aNode->Load(_rxORB,m_aDrivers);
}
+
+// -----------------------------------------------------------------------------
+DriversConfig::~DriversConfig()
+{
+}
+
+// -----------------------------------------------------------------------------
+DriversConfig::DriversConfig( const DriversConfig& _rhs )
+{
+ *this = _rhs;
+}
+
+// -----------------------------------------------------------------------------
+DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs )
+{
+ if ( this != &_rhs )
+ {
+ m_aDrivers = _rhs.m_aDrivers;
+ m_aNode = _rhs.m_aNode;
+ }
+ return *this;
+}
+
// -----------------------------------------------------------------------------
::rtl::OUString DriversConfig::getDriverFactoryName(const ::rtl::OUString& _sURL) const
{
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index 7eccb8e8463e..70220b1cd563 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -31,8 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
-#include <connectivity/dbmetadata.hxx>
-#include <connectivity/dbexception.hxx>
+#include "connectivity/dbmetadata.hxx"
+#include "connectivity/dbexception.hxx"
+#include "connectivity/DriversConfig.hxx"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
@@ -52,6 +53,7 @@
#include <tools/diagnose_ex.h>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <boost/optional.hpp>
@@ -90,9 +92,19 @@ namespace dbtools
{
Reference< XConnection > xConnection;
Reference< XDatabaseMetaData > xConnectionMetaData;
+ ::connectivity::DriversConfig aDriverConfig;
::boost::optional< ::rtl::OUString > sCachedIdentifierQuoteString;
::boost::optional< ::rtl::OUString > sCachedCatalogSeparator;
+
+ DatabaseMetaData_Impl()
+ :xConnection()
+ ,xConnectionMetaData()
+ ,aDriverConfig( ::comphelper::getProcessServiceFactory() )
+ ,sCachedIdentifierQuoteString()
+ ,sCachedCatalogSeparator()
+ {
+ }
};
//--------------------------------------------------------------------
@@ -122,6 +134,17 @@ namespace dbtools
}
//................................................................
+ static bool lcl_getDriverSetting( const sal_Char* _asciiName, const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
+ {
+ lcl_checkConnected( _metaData );
+ const ::comphelper::NamedValueCollection& rDriverMetaData = _metaData.aDriverConfig.getMetaData( _metaData.xConnectionMetaData->getURL() );
+ if ( !rDriverMetaData.has( _asciiName ) )
+ return false;
+ _out_setting = rDriverMetaData.get( _asciiName );
+ return true;
+ }
+
+ //................................................................
static bool lcl_getConnectionSetting( const sal_Char* _asciiName, const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
{
try
@@ -278,11 +301,11 @@ namespace dbtools
//--------------------------------------------------------------------
bool DatabaseMetaData::isAutoIncrementPrimaryKey() const
{
- bool doGenerate( true );
+ bool is( true );
Any setting;
- if ( lcl_getConnectionSetting( "AutoIncrementIsPrimaryKey", *m_pImpl, setting ) )
- OSL_VERIFY( setting >>= doGenerate );
- return doGenerate;
+ if ( lcl_getDriverSetting( "AutoIncrementIsPrimaryKey", *m_pImpl, setting ) )
+ OSL_VERIFY( setting >>= is );
+ return is;
}
//--------------------------------------------------------------------
sal_Int32 DatabaseMetaData::getBooleanComparisonMode() const
diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu
index 949d6fb86a19..236d38bd7ff7 100755
--- a/connectivity/source/drivers/ado/ado.xcu
+++ b/connectivity/source/drivers/ado/ado.xcu
@@ -147,6 +147,11 @@
<value></value>
</prop>
</node>
+ <node oor:name="BooleanComparisonMode" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:int">
+ <value>3</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseSQL92NamingConstraints" oor:op="replace">
@@ -216,11 +221,6 @@
<value>mdb</value>
</prop>
</node>
- <node oor:name="BooleanComparisonMode" oor:op="replace">
- <prop oor:name="Value" oor:type="xs:int">
- <value>3</value>
- </prop>
- </node>
</node>
</node>
<node oor:name="sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=*" oor:op="replace">
diff --git a/connectivity/source/drivers/mozab/bootstrap/makefile.mk b/connectivity/source/drivers/mozab/bootstrap/makefile.mk
index a22b3699760a..9b4b05868cd2 100644
--- a/connectivity/source/drivers/mozab/bootstrap/makefile.mk
+++ b/connectivity/source/drivers/mozab/bootstrap/makefile.mk
@@ -44,6 +44,11 @@ USE_DEFFILE=TRUE
ENABLE_EXCEPTIONS=TRUE
VISIBILITY_HIDDEN=TRUE
+.IF "$(OS)" == "OS2"
+all:
+ @echo " Not building under OS/2"
+.ENDIF
+
# --- Settings ----------------------------------
.IF "$(DBGUTIL_OJ)"!=""
ENVCFLAGS+=/FR$(SLO)$/
diff --git a/connectivity/source/drivers/mozab/makefile.mk b/connectivity/source/drivers/mozab/makefile.mk
index 42ce1ab8ca6e..677e605096c4 100644
--- a/connectivity/source/drivers/mozab/makefile.mk
+++ b/connectivity/source/drivers/mozab/makefile.mk
@@ -35,7 +35,7 @@ TARGET=mozab
TARGET2=$(TARGET)drv
VISIBILITY_HIDDEN=TRUE
-.IF ( "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || ( "$(OS)" == "MACOSX" )
+.IF ( "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || ( "$(OS)" == "MACOSX" ) || ( "$(OS)" == "OS2" )
all:
@echo " Not building the mozilla address book driver"
@echo " dependency to Mozilla developer snapshots not feasable at the moment"
diff --git a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk
index e350365d3442..e31d4c7e412b 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk
+++ b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk
@@ -52,7 +52,7 @@ ENVCFLAGS+=/FR$(SLO)$/
.INCLUDE : settings.mk
-.IF ("$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO"
+.IF ("$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || "$(OS)" == "OS2"
dummy:
@echo " Not building the mozillasrc stuff in OpenOffice.org build"
@echo " dependency to Mozilla developer snapshots not feasable at the moment"
diff --git a/connectivity/source/drivers/mysql/mysql.xcu b/connectivity/source/drivers/mysql/mysql.xcu
index c730df2af5c7..a3babe090bf4 100755
--- a/connectivity/source/drivers/mysql/mysql.xcu
+++ b/connectivity/source/drivers/mysql/mysql.xcu
@@ -80,11 +80,6 @@
<value>true</value>
</prop>
</node>
- <node oor:name="EscapeDateTime" oor:op="replace">
- <prop oor:name="Value" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
</node>
<node oor:name="MetaData">
<node oor:name="SupportsTableCreation" oor:op="replace">
@@ -149,19 +144,83 @@
<value>true</value>
</prop>
</node>
- <node oor:name="EscapeDateTime" oor:op="replace">
+ </node>
+ <node oor:name="MetaData">
+ <node oor:name="SupportsTableCreation" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="SupportsBrowsing" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
<value>true</value>
</prop>
</node>
+ <node oor:name="Authentication" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:string">
+ <value>UserPassword</value>
+ </prop>
+ </node>
</node>
- <node oor:name="MetaData">
- <node oor:name="SupportsTableCreation" oor:op="replace">
+ </node>
+ <node oor:name="sdbc:mysql:mysqlc:*" oor:op="replace">
+ <prop oor:name="Driver">
+ <value>org.openoffice.comp.drivers.MySQL.Driver</value>
+ </prop>
+ <prop oor:name="DriverTypeDisplayName" oor:type="xs:string">
+ <value xml:lang="en-US">MySQL (Native)</value>
+ </prop>
+ <node oor:name="Properties">
+ <node oor:name="CharSet" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:string">
+ <value></value>
+ </prop>
+ </node>
+ <node oor:name="LocalSocket" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:string">
+ <value></value>
+ </prop>
+ </node>
+ <node oor:name="NamedPipe" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:string">
+ <value></value>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="Features">
+ <node oor:name="UseKeywordAsBeforeAlias" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
<value>true</value>
</prop>
</node>
- <node oor:name="SupportsBrowsing" oor:op="replace">
+ <node oor:name="IgnoreDriverPrivileges" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="DisplayVersionColumns" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="UseDOSLineEnds" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="BooleanComparisonMode" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="FormsCheckRequiredFields" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="MetaData">
+ <node oor:name="SupportsTableCreation" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
<value>true</value>
</prop>
diff --git a/desktop/inc/deployment.hrc b/desktop/inc/deployment.hrc
index da349b81848b..e29d1229bd18 100644
--- a/desktop/inc/deployment.hrc
+++ b/desktop/inc/deployment.hrc
@@ -72,7 +72,8 @@
#define RID_STR_UNOPKG_ACCEPT_LIC_Y (RID_DEPLOYMENT_UNOPKG_START+6)
#define RID_STR_UNOPKG_ACCEPT_LIC_NO (RID_DEPLOYMENT_UNOPKG_START+7)
#define RID_STR_UNOPKG_ACCEPT_LIC_N (RID_DEPLOYMENT_UNOPKG_START+8)
-#define RID_STR_CONCURRENTINSTANCE (RID_DEPLOYMENT_UNOPKG_START+9)
+#define RID_STR_UNOPKG_ERROR (RID_DEPLOYMENT_UNOPKG_START+9)
+#define RID_STR_CONCURRENTINSTANCE (RID_DEPLOYMENT_UNOPKG_START+10)
#define RID_DEPLOYMENT_DEPENDENCIES_START (RID_DEPLOYMENT_START + 4400)
#define RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN RID_DEPLOYMENT_DEPENDENCIES_START
diff --git a/desktop/os2/source/applauncher/launcher.cxx b/desktop/os2/source/applauncher/launcher.cxx
index a17838687a0f..1d1280c71bf1 100644
--- a/desktop/os2/source/applauncher/launcher.cxx
+++ b/desktop/os2/source/applauncher/launcher.cxx
@@ -66,7 +66,11 @@ int main( int argc, char* argv[])
DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH);
// make sure we load DLL from our path only, so multiple instances/versions
// can be loaded.
+#if 0
+ // YD this feature is not compatible with innowin b20,
+ // java cannot load with this flag enabled
DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT);
+#endif
// adjust exe name
_splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src
index 0ca9f9e74362..7e4004bca1d4 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.src
@@ -169,12 +169,12 @@ Image RID_IMG_WARNING_HC
Image RID_IMG_LOCKED
{
- ImageBitmap = Bitmap { File = "lock_16.png"; };
+ ImageBitmap = Bitmap { File = "shared_16.png"; };
};
Image RID_IMG_LOCKED_HC
{
- ImageBitmap = Bitmap { File = "lock_16_h.png"; };
+ ImageBitmap = Bitmap { File = "shared_16_h.png"; };
};
Image RID_IMG_EXTENSION
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src
index 319d953b1430..49d3c1c0cf8e 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.src
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src
@@ -236,7 +236,7 @@ ModalDialog RID_DLG_UPDATE {
Text[en-US] = "No descriptions available for this extension.";
};
String RID_DLG_UPDATE_NOINSTALL {
- Text[en-US] = "The extension cannot be installed because:";
+ Text[en-US] = "The extension cannot be updated because:";
};
String RID_DLG_UPDATE_NODEPENDENCY {
Text[en-US] = "Required OpenOffice.org version doesn't match:";
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index afd44f83cff6..05e514305415 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -660,10 +660,15 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
{
check();
if (m_readOnly)
+ {
+ OUString message;
+ if (m_context == OUSTR("shared"))
+ message = OUSTR("You need write permissions to install a shared extension!");
+ else
+ message = OUSTR("You need write permissions to install this extension!");
throw deployment::DeploymentException(
- OUSTR("operating on read-only context!"),
- static_cast<OWeakObject *>(this), Any() );
-
+ message, static_cast<OWeakObject *>(this), Any() );
+ }
Reference<XCommandEnvironment> xCmdEnv;
if (m_xLogFile.is())
xCmdEnv.set( new CmdEnvWrapperImpl( xCmdEnv_, m_xLogFile ) );
@@ -893,9 +898,15 @@ void PackageManagerImpl::removePackage(
{
check();
if (m_readOnly)
+ {
+ OUString message;
+ if (m_context == OUSTR("shared"))
+ message = OUSTR("You need write permissions in order to remove a shared extension!");
+ else
+ message = OUSTR("You need write permissions in order to remove this extension!");
throw deployment::DeploymentException(
- OUSTR("operating on read-only context!"),
- static_cast<OWeakObject *>(this), Any() );
+ message, static_cast<OWeakObject *>(this), Any() );
+ }
Reference<XCommandEnvironment> xCmdEnv;
if (m_xLogFile.is())
@@ -1117,9 +1128,15 @@ void PackageManagerImpl::reinstallDeployedPackages(
{
check();
if (m_readOnly)
+ {
+ OUString message;
+ if (m_context == OUSTR("shared"))
+ message = OUSTR("You need write permissions in order to install shared extensions!");
+ else
+ message = OUSTR("You need write permissions in order to install extensions!");
throw deployment::DeploymentException(
- OUSTR("operating on read-only context!"),
- static_cast<OWeakObject *>(this), Any() );
+ message, static_cast<OWeakObject *>(this), Any() );
+ }
if (office_is_running())
throw RuntimeException(
diff --git a/desktop/source/deployment/unopkg/unopkg.src b/desktop/source/deployment/unopkg/unopkg.src
index a3b2bac56cc5..bb5be7e8bbd6 100644
--- a/desktop/source/deployment/unopkg/unopkg.src
+++ b/desktop/source/deployment/unopkg/unopkg.src
@@ -81,5 +81,12 @@ String RID_STR_UNOPKG_ACCEPT_LIC_N
String RID_STR_CONCURRENTINSTANCE
{
- Text [ en-US ] = "You need to close the already opened Extension Manager to continue.";
+ Text [ en-US ] = "unopkg cannot be started. The lock file indicates it as already running. "
+ "If this does not apply, delete the lock file at:";
};
+
+String RID_STR_UNOPKG_ERROR
+{
+ Text [ en-US ] = "ERROR: ";
+};
+
diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx
index 461ced320da4..0122caba945e 100644
--- a/desktop/source/migration/pages.cxx
+++ b/desktop/source/migration/pages.cxx
@@ -37,6 +37,7 @@
#include "migration.hxx"
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
+#include <vos/security.hxx>
#include <app.hxx>
#include <rtl/ustring.hxx>
#include <osl/file.hxx>
@@ -60,7 +61,6 @@
#include <unotools/bootstrap.hxx>
#include <tools/config.hxx>
-
using namespace rtl;
using namespace osl;
using namespace utl;
@@ -388,6 +388,10 @@ UserPage::UserPage( svt::OWizardMachine* parent, const ResId& resid)
SvtUserOptions aUserOpt;
m_edFirst.SetText(aUserOpt.GetFirstName());
m_edLast.SetText(aUserOpt.GetLastName());
+ rtl::OUString aUserName;
+ vos::OSecurity().getUserName( aUserName );
+ aUserOpt.SetID( aUserName );
+
m_edInitials.SetText(aUserOpt.GetID());
if (m_lang == LANGUAGE_RUSSIAN)
{
@@ -403,6 +407,7 @@ sal_Bool UserPage::commitPage( CommitPageReason )
aUserOpt.SetFirstName(m_edFirst.GetText());
aUserOpt.SetLastName(m_edLast.GetText());
aUserOpt.SetID( m_edInitials.GetText());
+
if (m_lang == LANGUAGE_RUSSIAN)
aUserOpt.SetFathersName(m_edFather.GetText());
diff --git a/desktop/source/migration/wizard.src b/desktop/source/migration/wizard.src
index 05f637fe7027..3b49e070fa6d 100644
--- a/desktop/source/migration/wizard.src
+++ b/desktop/source/migration/wizard.src
@@ -305,7 +305,7 @@ TabPage TP_UPDATE_CHECK
#define USERINDENT 40
#define EDHEIGHT 12
-#define INITIALSWIDTH 25
+#define INITIALSWIDTH 50
#define FTADD 2
TabPage TP_USER
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index a5d1fd2f746e..5fc4136a9501 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -470,14 +470,23 @@ extern "C" int unopkg_main()
}
catch (deployment::DeploymentException & exc)
{
+ OUString cause;
+ if (option_verbose)
+ {
+ cause = ::comphelper::anyToString(exc.Cause);
+ }
+ else
+ {
+ css::uno::Exception e;
+ if (exc.Cause >>= e)
+ cause = e.Message;
+ }
+
dp_misc::writeConsoleError(
- OUSTR("\nERROR: ") +
- exc.Message + OUSTR("\n") +
- OUSTR(" Cause: ") +
- OUString(option_verbose ? ::comphelper::anyToString(exc.Cause):
- reinterpret_cast< css::uno::Exception const *>(
- exc.Cause.getValue())->Message) +
- OUSTR("\n"));
+ OUSTR("\nERROR: ") + exc.Message + OUSTR("\n"));
+ if (cause.getLength())
+ dp_misc::writeConsoleError(
+ OUSTR(" Cause: ") + cause + OUSTR("\n"));
}
catch (LockFileException & e)
{
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index de8fedae2bdb..70b469fa58fa 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -471,10 +471,10 @@ Reference<XComponentContext> getUNO(
{
if (! s_lockfile.check( 0 ))
{
- //String sMsg(ResId(RID_STR_CONCURRENTINSTANCE, *DeploymentResMgr::get()));
- OUString sMsg(RTL_CONSTASCII_USTRINGPARAM(
- "unopkg cannot be started. The lock file indicates it as already running. "
- "If this does not apply, delete the lock file at:"));
+ String sMsg(ResId(RID_STR_CONCURRENTINSTANCE, *DeploymentResMgr::get()));
+ //Create this string before we call DeInitVCL, because this will kill
+ //the ResMgr
+ String sError(ResId(RID_STR_UNOPKG_ERROR, *DeploymentResMgr::get()));
sMsg = sMsg + OUSTR("\n") + getLockFilePath();
@@ -497,9 +497,8 @@ Reference<XComponentContext> getUNO(
DeInitVCL();
}
-// String sError(ResId(RID_STR_UNOPKG_ERROR, *DeploymentResMgr::get()));
throw LockFileException(
- OUSTR("\n") + OUSTR("ERROR: ") + sMsg + OUSTR("\n"));
+ OUSTR("\n") + sError + sMsg + OUSTR("\n"));
}
}
diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk
index 0447c0c2020e..3ca31875c937 100644
--- a/desktop/source/splash/makefile.mk
+++ b/desktop/source/splash/makefile.mk
@@ -72,6 +72,7 @@ SHL1STDLIBS= \
$(UCBHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPULIB) \
+ $(VOSLIB) \
$(SALLIB) \
$(SFXLIB)
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 668c4a53508f..85f9b8b0b2c9 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -696,3 +696,9 @@ void SAL_CALL OCommonEmbeddedObject::setParent( const com::sun::star::uno::Refer
}
}
+// XDefaultSizeTransmitter
+void SAL_CALL OCommonEmbeddedObject::setDefaultSize( const ::com::sun::star::awt::Size& rSize_100TH_MM ) throw (::com::sun::star::uno::RuntimeException)
+{
+ //#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method
+ m_aDefaultSizeForChart_In_100TH_MM = rSize_100TH_MM;
+}
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index 58a5e87fe418..e557437e336d 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -361,9 +361,14 @@ uno::Any SAL_CALL OCommonEmbeddedObject::queryInterface( const uno::Type& rType
{
uno::Any aReturn;
- aReturn <<= ::cppu::queryInterface(
+ if ( rType == ::getCppuType( (uno::Reference< embed::XEmbeddedObject > const *)0 ))
+ {
+ void * p = static_cast< embed::XEmbeddedObject * >( this );
+ return uno::Any( &p, rType );
+ }
+ else
+ aReturn <<= ::cppu::queryInterface(
rType,
- static_cast< embed::XEmbeddedObject* >( this ),
static_cast< embed::XInplaceObject* >( this ),
static_cast< embed::XVisualObject* >( this ),
static_cast< embed::XCommonEmbedPersist* >( static_cast< embed::XEmbedPersist* >( this ) ),
@@ -374,6 +379,7 @@ uno::Any SAL_CALL OCommonEmbeddedObject::queryInterface( const uno::Type& rType
static_cast< embed::XComponentSupplier* >( this ),
static_cast< util::XCloseable* >( this ),
static_cast< container::XChild* >( this ),
+ static_cast< chart2::XDefaultSizeTransmitter* >( this ),
static_cast< document::XEventBroadcaster* >( this ) );
if ( aReturn.hasValue() )
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 8d33935168b6..47b16bf961af 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -58,6 +58,7 @@
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/IllegalTypeException.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
#include <comphelper/fileformat.h>
#include <comphelper/storagehelper.hxx>
@@ -463,6 +464,15 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag
uno::Reference< util::XCloseable > xDocument( CreateDocument( m_xFactory, GetDocumentServiceName(),
m_bEmbeddedScriptSupport ) );
+ //#i103460# ODF: take the size given from the parent frame as default
+ uno::Reference< chart2::XChartDocument > xChart( xDocument, uno::UNO_QUERY );
+ if( xChart.is() )
+ {
+ uno::Reference< embed::XVisualObject > xChartVisualObject( xChart, uno::UNO_QUERY );
+ if( xChartVisualObject.is() )
+ xChartVisualObject->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, m_aDefaultSizeForChart_In_100TH_MM );
+ }
+
uno::Reference< frame::XLoadable > xLoadable( xDocument, uno::UNO_QUERY );
uno::Reference< document::XStorageBasedDocument > xDoc
#ifdef USE_STORAGEBASED_DOCUMENT
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx
index afd199af9207..5a2827de3aa6 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -47,6 +47,7 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/document/XEventBroadcaster.hpp>
#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/chart2/XDefaultSizeTransmitter.hpp>
#include <cppuhelper/weak.hxx>
namespace com { namespace sun { namespace star {
@@ -85,6 +86,7 @@ class OCommonEmbeddedObject : public ::com::sun::star::embed::XEmbeddedObject
, public ::com::sun::star::embed::XLinkageSupport
, public ::com::sun::star::embed::XInplaceObject
, public ::com::sun::star::container::XChild
+ , public ::com::sun::star::chart2::XDefaultSizeTransmitter
, public ::cppu::OWeakObject
{
protected:
@@ -159,6 +161,7 @@ protected:
sal_Bool m_bHasClonedSize; // the object has cached size
::com::sun::star::awt::Size m_aClonedSize;
sal_Int32 m_nClonedMapUnit;
+ ::com::sun::star::awt::Size m_aDefaultSizeForChart_In_100TH_MM;//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this member
private:
void CommonInit_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aObjectProps );
@@ -492,6 +495,10 @@ public:
// XChild
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ // XDefaultSizeTransmitter
+ //#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method
+ virtual void SAL_CALL setDefaultSize( const ::com::sun::star::awt::Size& rSize_100TH_MM ) throw (::com::sun::star::uno::RuntimeException);
};
#endif
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 3cb3eb10f1eb..ae9848778622 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -900,6 +900,8 @@ inline bool MissingConvention::isRewriteNeeded( OpCode eOp ) const
case ocGammaDist:
case ocPoissonDist:
case ocAddress:
+ case ocLogNormDist:
+ case ocNormDist:
return true;
case ocMissing:
case ocLog:
@@ -943,6 +945,25 @@ void FormulaMissingContext::AddMoreArgs( FormulaTokenArray *pNewArr, const Missi
pNewArr->AddDouble( 1.0 ); // 3rd, Cumulative=TRUE()
}
break;
+ case ocNormDist:
+ if ( mnCurArg == 2 )
+ {
+ pNewArr->AddOpCode( ocSep );
+ pNewArr->AddDouble( 1.0 ); // 4th, Cumulative=TRUE()
+ }
+ break;
+ case ocLogNormDist:
+ if ( mnCurArg == 0 )
+ {
+ pNewArr->AddOpCode( ocSep );
+ pNewArr->AddDouble( 0.0 ); // 2nd, mean = 0.0
+ }
+ if ( mnCurArg <= 1 )
+ {
+ pNewArr->AddOpCode( ocSep );
+ pNewArr->AddDouble( 1.0 ); // 3rd, standard deviation = 1.0
+ }
+ break;
case ocLog:
if ( !rConv.isODFF() && mnCurArg == 0 )
{
diff --git a/formula/util/makefile.mk b/formula/util/makefile.mk
index 6852a53e499d..d1d78c11bbc2 100644
--- a/formula/util/makefile.mk
+++ b/formula/util/makefile.mk
@@ -98,7 +98,11 @@ SHL2STDLIBS= \
$(CPPUHELPERLIB) \
$(SALLIB)
-.IF "$(GUI)"!="WNT" || "$(COM)"=="GCC"
+.IF "$(GUI)"=="OS2"
+SHL2STDLIBS+= \
+ $(LB)$/ifor.lib
+SHL2DEPN=$(LB)$/i$(TARGET).lib
+.ELIF "$(GUI)"!="WNT" || "$(COM)"=="GCC"
SHL2STDLIBS+= \
-lfor$(DLLPOSTFIX)
SHL2DEPN=$(SHL1TARGETN)
@@ -113,6 +117,10 @@ SHL2IMPLIB=i$(TARGET2)
SHL2LIBS=$(LIB2TARGET)
SHL2DEF=$(MISC)$/$(SHL2TARGET).def
DEF2NAME=$(SHL2TARGET)
+.IF "$(GUI)"=="OS2"
+DEFLIB2NAME=$(TARGET2)
+.ENDIF
+
SHL2USE_EXPORTS=name
# SHL2VERSIONMAP=$(TARGET2).map
diff --git a/framework/source/classes/bmkmenu.cxx b/framework/source/classes/bmkmenu.cxx
index 5abb25f17c13..efa66b3a6140 100644
--- a/framework/source/classes/bmkmenu.cxx
+++ b/framework/source/classes/bmkmenu.cxx
@@ -175,7 +175,7 @@ void BmkMenu::Initialize()
::rtl::OUString aTargetFrame;
::rtl::OUString aImageId;
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
UINT32 i, nCount = aDynamicMenuEntries.getLength();
for ( i = 0; i < nCount; ++i )
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index e57934a5a65f..bb850b876e5c 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -157,7 +157,7 @@ MenuManager::MenuManager(
SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
@@ -371,7 +371,7 @@ MenuManager::MenuManager(
m_bIsBookmarkMenu = sal_True;
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
@@ -919,7 +919,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
// Check if some modes have changed so we have to update our menu images
- sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
if ( m_bWasHiContrast != bIsHiContrast || bShowMenuImages != m_bShowMenuImages )
{
diff --git a/framework/source/helper/actiontriggerhelper.cxx b/framework/source/helper/actiontriggerhelper.cxx
index b2acbfd3409b..dae7002d08ff 100644
--- a/framework/source/helper/actiontriggerhelper.cxx
+++ b/framework/source/helper/actiontriggerhelper.cxx
@@ -119,7 +119,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta
{
AddonsOptions aAddonOptions;
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- sal_Bool bHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bHiContrast = rSettings.GetHighContrastMode();
OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index c58334ab085b..40e4a9f7a6b9 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -245,6 +245,7 @@ void BackingWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( rDCEvt.GetFlags() & SETTINGS_STYLE )
{
initBackground();
+ Invalidate();
}
}
@@ -252,7 +253,7 @@ void BackingWindow::initBackground()
{
SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
- bool bDark = GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
maWelcomeTextColor = maLabelTextColor = bDark ? Color( COL_WHITE ) : Color( 0x26, 0x35, 0x42 );
Color aTextBGColor( bDark ? COL_BLACK : COL_WHITE );
@@ -527,7 +528,7 @@ void BackingWindow::layoutButtonAndText(
void BackingWindow::Paint( const Rectangle& )
{
- bool bDark = GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
Color aBackColor( bDark ? COL_BLACK : COL_WHITE );
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 0872e778a727..311db615ed2a 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -227,7 +227,7 @@ ControlMenuController::ControlMenuController( const ::com::sun::star::uno::Refer
m_pResPopupMenu( 0 )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
}
@@ -369,7 +369,7 @@ void SAL_CALL ControlMenuController::activate( const css::awt::MenuEvent& ) thro
// Check if some modes have changed so we have to update our menu images
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus();
sal_Bool bUpdateImages = (( m_bWasHiContrast != bIsHiContrast ) || ( bShowMenuImages != m_bShowMenuImages ));
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index 17fb412aeff5..ed941ea58b71 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -143,7 +143,7 @@ ImageButtonToolbarController::ImageButtonToolbarController(
ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand )
{
sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
- sal_Bool bHiContrast( pToolbar->GetDisplayBackground().GetColor().IsDark() );
+ sal_Bool bHiContrast( pToolbar->GetSettings().GetStyleSettings().GetHighContrastMode() );
Image aImage = AddonsOptions().GetImageFromURL( aCommand, bBigImages, bHiContrast, sal_True );
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 4e1df67d69fb..4c20b96f00dc 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -870,7 +870,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
MenuManager::UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
// Check if some modes have changed so we have to update our menu images
- sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle();
if ( m_bRetrieveImages ||
@@ -1267,7 +1267,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
m_xDispatchProvider = rDispatchProvider;
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
m_bRetrieveImages = sal_False;
@@ -2049,7 +2049,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen
UNO_QUERY );
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
Reference< XStatusListener > xStatusListener;
Reference< XDispatch > xDispatch;
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index fea156dceb9d..37580f86f546 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -486,7 +486,7 @@ void SAL_CALL NewMenuController::activate( const css::awt::MenuEvent& ) throw (R
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
sal_Bool bShowImages( rSettings.GetUseImagesInMenus() );
- sal_Bool bHiContrast( rSettings.GetMenuColor().IsDark() );
+ sal_Bool bHiContrast( rSettings.GetHighContrastMode() );
PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
@@ -563,7 +563,7 @@ void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments )
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_bShowImages = rSettings.GetUseImagesInMenus();
- m_bHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bHiContrast = rSettings.GetHighContrastMode();
m_bNewMenu = m_aCommandURL.equalsAscii( ".uno:AddDirect" );
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 88ecaae88ad1..55c8d16af2ec 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -243,7 +243,7 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic
ThreadHelpBase( &Application::GetSolarMutex() ),
OWeakObject(),
m_bDisposed( sal_False ),
- m_bIsHiContrast( pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark() ),
+ m_bIsHiContrast( pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode() ),
m_bSmallSymbols( !SvtMiscOptions().AreCurrentSymbolsLarge() ),
m_bModuleIdentified( sal_False ),
m_bAddedToTaskPaneList( sal_True ),
@@ -371,7 +371,7 @@ void ToolBarManager::CheckAndUpdateImages()
sal_Bool bRefreshImages = sal_False;
// Check if high contrast/normal mode have changed
- if ( m_pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+ if ( m_pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode() )
{
if ( !m_bIsHiContrast )
{
@@ -1365,7 +1365,7 @@ void ToolBarManager::RequestImages()
}
sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
- m_bIsHiContrast = m_pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+ m_bIsHiContrast = m_pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode();
sal_Int16 p = getImageTypeFromBools( SvtMiscOptions().AreCurrentSymbolsLarge(), m_bIsHiContrast );
if ( m_xDocImageManager.is() )
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 80c4c013a71b..3b359eea97c2 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -211,7 +211,7 @@ void ToolbarsMenuController::addCommand(
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
if ( rSettings.GetUseImagesInMenus() )
- aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetMenuColor().IsDark() );
+ aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetHighContrastMode() );
VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu );
if ( pPopupMenu )
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu
index e574c72b314e..296a16a9e697 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu
@@ -3,64 +3,62 @@
<oor:component-data oor:name="ChartCommands" oor:package="org.openoffice.Office.UI" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<node oor:name="UserInterface">
<node oor:name="Commands">
- <node oor:name=".uno:DiagramData" oor:op="replace">
+
+ <!-- Menu-Insert -->
+ <node oor:name=".uno:InsertMenuTitles" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Chart ~Data Table...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
+ <value xml:lang="en-US">~Titles...</value>
</prop>
</node>
- <node oor:name=".uno:DataRanges" oor:op="replace">
+ <node oor:name=".uno:InsertMenuLegend" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Data ~Ranges...</value>
+ <value xml:lang="en-US">~Legend...</value>
</prop>
</node>
- <node oor:name=".uno:InsertTitle" oor:op="replace">
+ <node oor:name=".uno:InsertMenuAxes" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">~Title...</value>
+ <value xml:lang="en-US">~Axes...</value>
</prop>
</node>
- <node oor:name=".uno:InsertLegend" oor:op="replace">
+ <node oor:name=".uno:InsertMenuGrids" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">~Legend...</value>
+ <value xml:lang="en-US">~Grids...</value>
</prop>
</node>
- <node oor:name=".uno:InsertDescription" oor:op="replace">
+ <node oor:name=".uno:InsertMenuDataLabels" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
<value xml:lang="en-US">~Data Labels...</value>
</prop>
</node>
- <node oor:name=".uno:InsertAxis" oor:op="replace">
+ <node oor:name=".uno:InsertMenuTrendlines" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">~Axes...</value>
+ <value xml:lang="en-US">Tre~nd Lines...</value>
</prop>
</node>
- <node oor:name=".uno:ChartTitle" oor:op="replace">
+ <node oor:name=".uno:InsertMenuMeanValues" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Chart Title</value>
+ <value xml:lang="en-US">Mean ~Value Lines</value>
</prop>
</node>
- <node oor:name=".uno:Legend" oor:op="replace">
+ <node oor:name=".uno:InsertMenuYErrorBars" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Y Error ~Bars...</value>
+ </prop>
+ </node>
- <value xml:lang="en-US">~Legend...</value>
+ <!-- Menu - Format -->
+ <node oor:name=".uno:FormatSelection" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Selection...</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGrid" oor:op="replace">
+ <node oor:name=".uno:Legend" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Edit Grid</value>
+ <value xml:lang="en-US">~Legend...</value>
</prop>
</node>
<node oor:name=".uno:DiagramWall" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
<value xml:lang="en-US">Chart ~Wall...</value>
</prop>
</node>
@@ -74,11 +72,6 @@
<value xml:lang="en-US">Chart ~Area...</value>
</prop>
</node>
- <node oor:name=".uno:View3D" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~3D View...</value>
- </prop>
- </node>
<node oor:name=".uno:DiagramType" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Chart T~ype...</value>
@@ -87,101 +80,91 @@
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:ToggleTitle" oor:op="replace">
+ <node oor:name=".uno:DataRanges" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Title On/Off</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
+ <value xml:lang="en-US">~Data Ranges...</value>
</prop>
</node>
- <node oor:name=".uno:ToggleLegend" oor:op="replace">
+ <node oor:name=".uno:DiagramData" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Legend On/Off</value>
+ <value xml:lang="en-US">Chart ~Data Table...</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:ToggleAxisDescr" oor:op="replace">
+ <node oor:name=".uno:View3D" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Show/Hide Axis Description(s)</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
+ <value xml:lang="en-US">~3D View...</value>
</prop>
</node>
- <node oor:name=".uno:ToggleGridHorizontal" oor:op="replace">
+
+ <!-- sub menu - format arrangement -->
+
+ <node oor:name=".uno:Forward" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Horizontal Grid On/Off</value>
+ <value xml:lang="en-US">Bring ~Forward</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:ToggleGridVertical" oor:op="replace">
+ <node oor:name=".uno:Backward" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Vertical Grid On/Off</value>
+ <value xml:lang="en-US">Send Back~ward</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:DataInRows" oor:op="replace">
+
+ <!-- sub menu: format title-->
+ <node oor:name=".uno:MainTitle" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Data in Rows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
+ <value xml:lang="en-US">~Main Title...</value>
</prop>
</node>
- <node oor:name=".uno:DataInColumns" oor:op="replace">
+ <node oor:name=".uno:SubTitle" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Data in Columns</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
+ <value xml:lang="en-US">~Subtitle...</value>
</prop>
</node>
- <node oor:name=".uno:ToolSelect" oor:op="replace">
+ <node oor:name=".uno:XTitle" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Select Tool</value>
+ <value xml:lang="en-US">~X Axis Title...</value>
</prop>
</node>
- <node oor:name=".uno:ContextType" oor:op="replace">
+ <node oor:name=".uno:YTitle" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">Chart Type</value>
+ <value xml:lang="en-US">~Y Axis Title...</value>
</prop>
</node>
- <node oor:name=".uno:NewArrangement" oor:op="replace">
+ <node oor:name=".uno:ZTitle" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Automatic Layout</value>
+ <value xml:lang="en-US">~Z Axis Title...</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
+ </node>
+ <node oor:name=".uno:SecondaryXTitle" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">S~econdary X Axis Title...</value>
</prop>
</node>
- <node oor:name=".uno:InsertGrids" oor:op="replace">
+ <node oor:name=".uno:SecondaryYTitle" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
-
- <value xml:lang="en-US">~Grids...</value>
+ <value xml:lang="en-US">Se~condary Y Axis Title...</value>
</prop>
</node>
- <node oor:name=".uno:Update" oor:op="replace">
+ <node oor:name=".uno:AllTitles" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Update Chart</value>
+ <value xml:lang="en-US">~All Titles...</value>
</prop>
</node>
+
+ <!-- sub menu: format axis-->
<node oor:name=".uno:DiagramAxisX" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
@@ -200,235 +183,502 @@
<value xml:lang="en-US">~Z Axis...</value>
</prop>
</node>
+ <node oor:name=".uno:DiagramAxisA" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Secondary X Axis...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DiagramAxisB" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">S~econdary Y Axis...</value>
+ </prop>
+ </node>
<node oor:name=".uno:DiagramAxisAll" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~All Axes...</value>
</prop>
</node>
- <node oor:name=".uno:InsertTrendlines" oor:op="replace">
+
+ <!-- sub menu: format grid-->
+ <node oor:name=".uno:DiagramGridXMain" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">T~rend Lines...</value>
+ <value xml:lang="en-US">~Y Axis Major Grid...</value>
</prop>
</node>
- <node oor:name=".uno:InsertMeanValues" oor:op="replace">
+ <node oor:name=".uno:DiagramGridYMain" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Mean ~Value Lines</value>
+ <value xml:lang="en-US">~X Axis Major Grid...</value>
</prop>
</node>
- <node oor:name=".uno:InsertYErrorbars" oor:op="replace">
+ <node oor:name=".uno:DiagramGridZMain" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Y Error Bars...</value>
+ <value xml:lang="en-US">~Z Axis Major Grid...</value>
</prop>
</node>
- <node oor:name=".uno:MainTitle" oor:op="replace">
+ <node oor:name=".uno:DiagramGridXHelp" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Main Title...</value>
+ <value xml:lang="en-US">Y Axis Minor ~Grid...</value>
</prop>
</node>
- <node oor:name=".uno:SubTitle" oor:op="replace">
+ <node oor:name=".uno:DiagramGridYHelp" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Subtitle...</value>
+
+ <value xml:lang="en-US">X Axis ~Minor Grid...</value>
</prop>
</node>
- <node oor:name=".uno:XTitle" oor:op="replace">
+ <node oor:name=".uno:DiagramGridZHelp" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~X Axis Title...</value>
+
+ <value xml:lang="en-US">Z Ax~is Minor Grid...</value>
</prop>
</node>
- <node oor:name=".uno:YTitle" oor:op="replace">
+ <node oor:name=".uno:DiagramGridAll" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Y Axis Title...</value>
+ <value xml:lang="en-US">~All Grids...</value>
</prop>
</node>
- <node oor:name=".uno:ZTitle" oor:op="replace">
+
+ <!-- context menu - insert/delete/formatof several elements-->
+
+ <node oor:name=".uno:FormatWall" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Z Axis Title...</value>
+
+ <value xml:lang="en-US">Format Wall...</value>
</prop>
</node>
- <node oor:name=".uno:SecondaryXTitle" oor:op="replace">
+ <node oor:name=".uno:FormatFloor" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">S~econdary X Axis Title...</value>
+ <value xml:lang="en-US">Format Floor...</value>
</prop>
</node>
- <node oor:name=".uno:SecondaryYTitle" oor:op="replace">
+ <node oor:name=".uno:FormatChartArea" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Se~condary Y Axis Title...</value>
+ <value xml:lang="en-US">Format Chart Area...</value>
</prop>
</node>
- <node oor:name=".uno:AllTitles" oor:op="replace">
+
+ <!-- title -->
+ <node oor:name=".uno:InsertTitles" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert Titles...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatTitle" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Title...</value>
+ </prop>
+ </node>
- <value xml:lang="en-US">~All Titles...</value>
+ <!-- legend -->
+
+ <node oor:name=".uno:InsertLegend" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert Legend</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridXMain" oor:op="replace">
+ <node oor:name=".uno:DeleteLegend" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Y Axis Major Grid...</value>
+ <value xml:lang="en-US">Delete Legend</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridYMain" oor:op="replace">
+ <node oor:name=".uno:FormatLegend" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~X Axis Major Grid...</value>
+ <value xml:lang="en-US">Format Legend...</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridZMain" oor:op="replace">
+
+ <!-- axis -->
+
+ <node oor:name=".uno:InsertRemoveAxes" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Z Axis Major Grid...</value>
+ <value xml:lang="en-US">Insert/Delete Axes...</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridAll" oor:op="replace">
+ <node oor:name=".uno:InsertAxis" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~All Grids...</value>
+
+ <value xml:lang="en-US">Insert Axis</value>
</prop>
</node>
- <node oor:name=".uno:DiagramObjects" oor:op="replace">
+ <node oor:name=".uno:DeleteAxis" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Object Properties...</value>
+
+ <value xml:lang="en-US">Delete Axis</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridXHelp" oor:op="replace">
+ <node oor:name=".uno:FormatAxis" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Axis...</value>
+ </prop>
+ </node>
- <value xml:lang="en-US">Y Axis Minor ~Grid...</value>
+ <node oor:name=".uno:InsertAxisTitle" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Insert Axis Title</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridYHelp" oor:op="replace">
+
+ <!-- grids -->
+
+ <node oor:name=".uno:InsertMajorGrid" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">X Axis ~Minor Grid...</value>
+ <value xml:lang="en-US">Insert Major Grid</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridZHelp" oor:op="replace">
+ <node oor:name=".uno:DeleteMajorGrid" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Z Ax~is Minor Grid...</value>
+ <value xml:lang="en-US">Delete Major Grid</value>
</prop>
</node>
- <node oor:name=".uno:ScaleText" oor:op="replace">
+ <node oor:name=".uno:FormatMajorGrid" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Scale Text</value>
+ <value xml:lang="en-US">Format Major Grid...</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
+ </node>
+
+ <node oor:name=".uno:InsertMinorGrid" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Insert Minor Grid</value>
</prop>
</node>
- <node oor:name=".uno:DataDescriptionType" oor:op="replace">
+ <node oor:name=".uno:DeleteMinorGrid" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Caption Type for Chart Data</value>
+ <value xml:lang="en-US">Delete Minor Grid</value>
</prop>
</node>
- <node oor:name=".uno:LegendPosition" oor:op="replace">
+ <node oor:name=".uno:FormatMinorGrid" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Legend Position</value>
+ <value xml:lang="en-US">Format Minor Grid...</value>
</prop>
</node>
- <node oor:name=".uno:DefaultColors" oor:op="replace">
+
+ <!-- trend line -->
+
+ <node oor:name=".uno:InsertTrendline" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert Tre~nd Line...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteTrendline" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Delete Tre~nd Line</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatTrendline" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Trend Line...</value>
+ </prop>
+ </node>
+
+ <!-- trend line equation -->
+
+ <node oor:name=".uno:InsertTrendlineEquation" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert Trend Line ~Equation</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertTrendlineEquationAndR2" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert R² and Trend Line Equation</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertR2Value" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert R²</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteR2Value" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Delete R²</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteTrendlineEquation" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Delete Trend Line ~Equation</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatTrendlineEquation" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Trend Line Equation...</value>
+ </prop>
+ </node>
- <value xml:lang="en-US">Default Colors for Data Series</value>
+ <!-- mean value -->
+
+ <node oor:name=".uno:InsertMeanValue" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert Mean ~Value Line</value>
</prop>
</node>
- <node oor:name=".uno:BarWidth" oor:op="replace">
+ <node oor:name=".uno:DeleteMeanValue" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Delete Mean ~Value Line</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatMeanValue" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Bar Width</value>
+ <value xml:lang="en-US">Format Mean Value Line...</value>
</prop>
</node>
- <node oor:name=".uno:NumberOfLines" oor:op="replace">
+
+ <!-- error bars -->
+
+ <node oor:name=".uno:InsertYErrorBars" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert Y Error ~Bars...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteYErrorBars" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Delete Y Error ~Bars</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatYErrorBars" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Y Error Bars...</value>
+ </prop>
+ </node>
- <value xml:lang="en-US">Number of lines in combination chart</value>
+ <!-- data labels -->
+
+ <node oor:name=".uno:InsertDataLabels" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Insert Data Labels</value>
</prop>
</node>
- <node oor:name=".uno:Forward" oor:op="replace">
+ <node oor:name=".uno:DeleteDataLabels" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Bring ~Forward</value>
+ <value xml:lang="en-US">Delete Data Labels</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatDataLabels" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Data Labels...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertDataLabel" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Insert Single Data Label</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteDataLabel" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Delete Single Data Label</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatDataLabel" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Single Data Label...</value>
+ </prop>
+ </node>
+
+ <!-- data series and point -->
+
+ <node oor:name=".uno:FormatDataSeries" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Data Series...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatDataPoint" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Data Point...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ResetDataPoint" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Reset Data Point</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ResetAllDataPoints" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Reset all Data Points</value>
+ </prop>
+ </node>
+
+
+ <node oor:name=".uno:FormatStockLoss" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Stock Loss...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FormatStockGain" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Format Stock Gain...</value>
+ </prop>
+ </node>
+
+ <!-- some toolbar button commands -->
+
+ <node oor:name=".uno:ChartElementSelector" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Select Chart Element</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:Backward" oor:op="replace">
+
+ <node oor:name=".uno:ToggleGridHorizontal" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Horizontal Grid On/Off</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ScaleText" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Scale Text</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:NewArrangement" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Automatic Layout</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
- <value xml:lang="en-US">Send Back~ward</value>
+ <!-- unused? -->
+ <node oor:name=".uno:Update" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Update Chart</value>
+ </prop>
+ </node>
+
+ <node oor:name=".uno:ToggleTitle" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Title On/Off</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:DiagramAxisA" oor:op="replace">
+ <node oor:name=".uno:ToggleLegend" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Legend On/Off</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ToggleAxisDescr" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Show/Hide Axis Description(s)</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
- <value xml:lang="en-US">~Secondary X Axis...</value>
+ <node oor:name=".uno:ToggleGridVertical" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Vertical Grid On/Off</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
</prop>
</node>
- <node oor:name=".uno:DiagramAxisB" oor:op="replace">
+
+ <node oor:name=".uno:DataInRows" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">S~econdary Y Axis...</value>
+ <value xml:lang="en-US">Data in Rows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
</prop>
</node>
- </node>
- <node oor:name="Popups">
- <node oor:name=".uno:ArrangeRow" oor:op="replace">
+ <node oor:name=".uno:DataInColumns" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Arrange~ment</value>
+ <value xml:lang="en-US">Data in Columns</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
</prop>
</node>
- <node oor:name=".uno:DiagramAxisMenu" oor:op="replace">
+ <node oor:name=".uno:ToolSelect" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">A~xis</value>
+
+ <value xml:lang="en-US">Select Tool</value>
</prop>
</node>
- <node oor:name=".uno:ChartTitleMenu" oor:op="replace">
+ <node oor:name=".uno:ContextType" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Title</value>
+ <value xml:lang="en-US">Chart Type</value>
</prop>
</node>
- <node oor:name=".uno:DiagramGridMenu" oor:op="replace">
+
+ <node oor:name=".uno:DataDescriptionType" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Grid</value>
+ <value xml:lang="en-US">Caption Type for Chart Data</value>
</prop>
</node>
- <node oor:name=".uno:InsertTrendline" oor:op="replace">
+ <node oor:name=".uno:LegendPosition" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert Tre~nd Line...</value>
+
+ <value xml:lang="en-US">Legend Position</value>
</prop>
</node>
- <node oor:name=".uno:InsertMeanValue" oor:op="replace">
+ <node oor:name=".uno:DefaultColors" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert Mean ~Value Line</value>
+
+ <value xml:lang="en-US">Default Colors for Data Series</value>
</prop>
</node>
- <node oor:name=".uno:InsertTrendlineEquation" oor:op="replace">
+ <node oor:name=".uno:BarWidth" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert Trend Line ~Equation</value>
+
+ <value xml:lang="en-US">Bar Width</value>
</prop>
</node>
- <node oor:name=".uno:InsertYErrorbar" oor:op="replace">
+ <node oor:name=".uno:NumberOfLines" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert ~Y Error Bars...</value>
+
+ <value xml:lang="en-US">Number of lines in combination chart</value>
</prop>
</node>
- <node oor:name=".uno:DeleteMeanValue" oor:op="replace">
+ </node>
+
+ <!-- menu items with sub menu -->
+
+ <node oor:name="Popups">
+ <node oor:name=".uno:ArrangeRow" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Delete Mean ~Value Line</value>
+ <value xml:lang="en-US">Arrange~ment</value>
</prop>
</node>
- <node oor:name=".uno:DeleteTrendline" oor:op="replace">
+ <node oor:name=".uno:ChartTitleMenu" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Delete Tre~ndline</value>
+ <value xml:lang="en-US">~Title</value>
</prop>
</node>
- <node oor:name=".uno:DeleteYErrorbar" oor:op="replace">
+ <node oor:name=".uno:DiagramAxisMenu" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Delete ~Y Error Bars</value>
+ <value xml:lang="en-US">A~xis</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DiagramGridMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~Grid</value>
</prop>
</node>
</node>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index fb4b18aa9f78..3f3caf1f8be3 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -221,6 +221,17 @@
<value>com.sun.star.svx.FontHeightToolBoxController</value>
</prop>
</node>
+ <node oor:name="c3" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ChartElementSelector</value>
+ </prop>
+ <prop oor:name="Module">
+ <value>com.sun.star.chart2.ChartDocument</value>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.chart.ElementSelectorToolbarController</value>
+ </prop>
+ </node>
</node>
<node oor:name="StatusBar">
<node oor:name="c1" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 23caee9af12d..9edbd84d74ce 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -4144,13 +4144,20 @@
</node>
<node oor:name=".uno:ExportDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Dialog exportieren</value>
<value xml:lang="en-US">Export Dialog</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:ImportDialog" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Import Dialog</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:CompileBasic" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Compile</value>
diff --git a/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs b/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs
index c6eec8845e00..cb684017c7c3 100644
--- a/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs
@@ -197,14 +197,25 @@
<info>
<author>OJ</author>
</info>
- <group oor:name="ApplicationIntegration">
+ <group oor:name="Policies">
<info>
- <desc>Specifies sevaral settings related to integrating data access functionality into the main applications.</desc>
+ <desc>Defines different policies for working with OpenOffice.org Base.</desc>
</info>
- <group oor:name="InstalledFeatures">
+ <group oor:name="Features">
<info>
- <desc>Specifies which data-access related features are available in non-Base applications.</desc>
+ <desc>controls availability of certain database access related features in the OpenOffice.org applications.</desc>
</info>
+ <group oor:name="Base">
+ <info>
+ <desc>controls availability of features within OpenOffice.org Base.</desc>
+ </info>
+ <prop oor:name="CreateLocalDatabase" oor:type="xs:boolean">
+ <info>
+ <desc>Specifies that the user is able to creatte new local database documents in the "Create Database" wizard.</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
<group oor:name="Writer">
<info>
<desc>Specifies which data-access related features are available in OpenOffice.org Writer.</desc>
diff --git a/readlicense_oo/util/makefile.pmk b/readlicense_oo/util/makefile.pmk
index aa66ec0657b9..b5c9099a1aa6 100755
--- a/readlicense_oo/util/makefile.pmk
+++ b/readlicense_oo/util/makefile.pmk
@@ -70,6 +70,12 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
chmod g+w $(MISC)$/$(GUI)
.ENDIF # "$(GUI)"=="UNX"
+$(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual'
+ $(XSLTPROC) --nonet -o $@ \
+ --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
+ --stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
+ ..$/readme.xsl $(MERGEDXRM)
+
# no percent-rule to avoid ambiguous inference chains for README_<lang>.html
$(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl
$(XSLTPROC) --nonet -o $@ \
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index e600c812a373..545464e09433 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -871,6 +871,7 @@
#define SID_HELP_PI (SID_SFX_START + 962)
#define SID_BASIC_ENABLED (SID_SFX_START + 964)
#define SID_EXPORT_DIALOG (SID_SFX_START + 965)
+#define SID_IMPORT_DIALOG (SID_SFX_START + 966)
#define SID_BASICBREAK (SID_SFX_START +1521)
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 32db454b17e5..db625a9386c3 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -5898,6 +5898,31 @@ SfxVoidItem ExportDialog SID_EXPORT_DIALOG
]
//--------------------------------------------------------------------------
+SfxVoidItem ImportDialog SID_IMPORT_DIALOG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
SfxVoidItem SaveConfiguration SID_SAVECONFIG
(SfxStringItem FileName SID_CFGFILE)
[
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 1337c74e7947..eacfefddc689 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -519,12 +519,12 @@ String STR_EVENT_CREATEDOC
String STR_EVENT_CLOSEDOC
{
- Text [ en-US ] = "Document is closing" ;
+ Text [ en-US ] = "Document closed" ;
};
String STR_EVENT_PREPARECLOSEDOC
{
- Text [ en-US ] = "Close Document" ;
+ Text [ en-US ] = "Document is closing" ;
};
String STR_EVENT_OPENDOC
diff --git a/sfx2/source/appl/shutdowniconOs2.cxx b/sfx2/source/appl/shutdowniconOs2.cxx
index e527519d1564..6b69b5d0fae8 100644
--- a/sfx2/source/appl/shutdowniconOs2.cxx
+++ b/sfx2/source/appl/shutdowniconOs2.cxx
@@ -51,7 +51,7 @@ using namespace ::osl;
//
// This ObjectID must match the one created in WarpIN scripts!!
//
-#define QUICKSTART_OBJID "OO2B_QUICKSTART"
+#define QUICKSTART_OBJID "OO2_QUICKSTART"
bool ShutdownIcon::IsQuickstarterInstalled()
{
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 89f2fe74e2f9..5a4aed274c30 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -136,6 +136,12 @@
#include "appbaslib.hxx"
#include "appdata.hxx"
+#ifdef OS2
+#include <osl/file.hxx>
+#include <stdio.h>
+#include <sys/ea.h>
+#endif
+
#include "../appl/app.hrc"
extern sal_uInt32 CheckPasswd_Impl( SfxObjectShell*, SfxItemPool&, SfxMedium* );
@@ -1784,6 +1790,66 @@ sal_Bool SfxObjectShell::SaveTo_Impl
catch( Exception& )
{
}
+
+#ifdef OS2
+ {
+#define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
+ // Header for a single-valued ASCII EA data item
+ typedef struct _EA_ASCII_header {
+ USHORT usAttr; /* value: EAT_ASCII */
+ USHORT usLen; /* length of data */
+ CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */
+ } EA_ASCII_HEADER;
+ char filePath[_MAX_PATH];
+ char fileExt[_MAX_PATH];
+ char docType[_MAX_PATH];
+ int rc;
+ oslFileError eRet;
+ ::rtl::OUString aSystemFileURL;
+ const ::rtl::OUString aFileURL = rMedium.GetName();
+ // close medium
+ rMedium.Close();
+
+ // convert file URL to system path
+ if (osl::FileBase::getSystemPathFromFileURL( aFileURL, aSystemFileURL) == osl::FileBase::E_None) {
+ EA_ASCII_HEADER eaAscii;
+ struct _ea eaType;
+ strcpy( filePath, CHAR_POINTER( aSystemFileURL));
+ strcpy( docType, CHAR_POINTER( rMedium.GetFilter()->GetServiceName()));
+#if OSL_DEBUG_LEVEL>1
+ printf( "file name: %s\n", filePath);
+ printf( "filter name: %s\n", CHAR_POINTER(rMedium.GetFilter()->GetFilterName()));
+ printf( "service name: %s\n", docType);
+#endif
+ // initialize OS/2 EA data structure
+ eaAscii.usAttr = EAT_ASCII;
+ _splitpath ( filePath, NULL, NULL, NULL, fileExt);
+ if (!stricmp( fileExt, ".pdf"))
+ strcpy( eaAscii.szType, "Acrobat Document");
+ else if (!strcmp( docType, "com.sun.star.text.TextDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Writer Document");
+ else if (!strcmp( docType, "com.sun.star.sheet.SpreadsheetDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Calc Document");
+ else if (!strcmp( docType, "com.sun.star.presentation.PresentationDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Impress Document");
+ else if (!strcmp( docType, "com.sun.star.drawing.DrawingDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Draw Document");
+ else
+ strcpy( eaAscii.szType, "OpenOfficeOrg Document");
+ eaAscii.usLen = strlen( eaAscii.szType);
+ // fill libc EA data structure
+ eaType.flags = 0;
+ eaType.size = sizeof(USHORT)*2 + eaAscii.usLen;
+ eaType.value = &eaAscii;
+ // put EA to file
+ rc = _ea_put( &eaType, filePath, 0, ".TYPE");
+#if OSL_DEBUG_LEVEL>1
+ printf( "ea name: %s, rc %d, errno %d\n", eaAscii.szType, rc, errno);
+#endif
+ }
+ }
+#endif
+
}
return bOk;
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 315f78c517ff..4ee0f32eb072 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -97,12 +97,10 @@ void escapeForShell( rtl::OStringBuffer & rBuffer, const rtl::OString & rURL)
{
// escape every non alpha numeric characters (excluding a few "known good") by prepending a '\'
sal_Char c = rURL[n];
- if( ( c < 'A' || c > 'Z' ) && ( c < 'a' || c > 'z' ) && ( c < '0' || c > '9' )
-#ifdef OS2 // YD we don't need to escape ':', '-', '\\', '_'
- && c != ':' && c != '-' && c != '\\' && c != '_'
-#endif
- && c != '/' && c != '.' )
+#ifndef OS2 // YD shell does not support escaped chars
+ if( ( c < 'A' || c > 'Z' ) && ( c < 'a' || c > 'z' ) && ( c < '0' || c > '9' ) && c != '/' && c != '.' )
rBuffer.append( '\\' );
+#endif
rBuffer.append( c );
}
@@ -210,6 +208,19 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
static_cast < XSystemShellExecute * > (this), ENOENT );
}
+#ifdef OS2
+ OStringBuffer aProg = OUStringToOString(aProgram, osl_getThreadTextEncoding());
+ aProg.append("open-url.exe");
+ OString aUrl = OUStringToOString(aURL, osl_getThreadTextEncoding());
+ if ( -1 == spawnl(P_NOWAIT, aProg.getStr(), aProg.getStr(), aUrl.getStr() , NULL) )
+ {
+ int nerr = errno;
+ throw SystemShellExecuteException(OUString::createFromAscii( strerror( nerr ) ),
+ static_cast < XSystemShellExecute * > (this), nerr );
+ }
+ return;
+#endif
+
OString aTmp = OUStringToOString(aProgram, osl_getThreadTextEncoding());
escapeForShell(aBuffer, aTmp);
diff --git a/shell/source/unix/misc/open-url.c b/shell/source/unix/misc/open-url.c
index 00a2e3bff774..f8e76f26ec5d 100644
--- a/shell/source/unix/misc/open-url.c
+++ b/shell/source/unix/misc/open-url.c
@@ -1,35 +1,27 @@
/*************************************************************************
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * $RCSfile:$
+ * Copyright 2008 by Sun Microsystems, Inc.
*
- * $Revision:$
+ * OpenOffice.org - a multi-platform office productivity suite
*
- * last change: $Author:$
+ * This file is part of OpenOffice.org.
*
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
+ * 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).
*
- * 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
+ * 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.
*
************************************************************************/
diff --git a/shell/source/unix/misc/senddoc.c b/shell/source/unix/misc/senddoc.c
index e918ba69c86d..bbe96420699d 100644
--- a/shell/source/unix/misc/senddoc.c
+++ b/shell/source/unix/misc/senddoc.c
@@ -1,35 +1,27 @@
/*************************************************************************
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * $RCSfile:$
+ * Copyright 2008 by Sun Microsystems, Inc.
*
- * $Revision:$
+ * OpenOffice.org - a multi-platform office productivity suite
*
- * last change: $Author:$
+ * This file is part of OpenOffice.org.
*
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
+ * 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).
*
- * 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
+ * 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.
*
************************************************************************/
diff --git a/svx/source/cui/macropg.src b/svx/source/cui/macropg.src
index 0de8a8c5e1dd..e9b6c10d6014 100644
--- a/svx/source/cui/macropg.src
+++ b/svx/source/cui/macropg.src
@@ -172,12 +172,12 @@ String RID_SVXSTR_EVENT_CREATEDOC
String RID_SVXSTR_EVENT_CLOSEDOC
{
- Text [ en-US ] = "Document is closing" ;
+ Text [ en-US ] = "Document closed" ;
};
String RID_SVXSTR_EVENT_PREPARECLOSEDOC
{
- Text [ en-US ] = "Close Document" ;
+ Text [ en-US ] = "Document is closing" ;
};
String RID_SVXSTR_EVENT_OPENDOC
diff --git a/svx/source/cui/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx
index 749e98a7d5c2..eb7cac6d8c5d 100644
--- a/svx/source/cui/optaccessibility.cxx
+++ b/svx/source/cui/optaccessibility.cxx
@@ -145,14 +145,14 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& )
if(m_pImpl->m_aConfig.IsModified())
m_pImpl->m_aConfig.Commit();
-#ifndef UNX
AllSettings aAllSettings = Application::GetSettings();
MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
+#ifndef UNX
aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() );
+#endif
aAllSettings.SetMiscSettings(aMiscSettings);
Application::SetSettings(aAllSettings);
Application::MergeSystemSettings( aAllSettings );
-#endif
return FALSE;
}
diff --git a/svx/source/cui/selector.cxx b/svx/source/cui/selector.cxx
index 39e22e5ab9f2..83e4aa2b1612 100644
--- a/svx/source/cui/selector.cxx
+++ b/svx/source/cui/selector.cxx
@@ -1053,6 +1053,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
aCategories.SetSelectHdl(
LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
aCommands.SetSelectHdl( LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
+ aCommands.SetDoubleClickHdl( LINK( this, SvxScriptSelectorDialog, FunctionDoubleClickHdl ) );
aOKButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
aCancelButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
@@ -1140,6 +1141,14 @@ IMPL_LINK( SvxScriptSelectorDialog, SelectHdl, Control*, pCtrl )
return 0;
}
+IMPL_LINK( SvxScriptSelectorDialog, FunctionDoubleClickHdl, Control*, pCtrl )
+{
+ (void)pCtrl;
+ if ( aOKButton.IsEnabled() )
+ return ClickHdl( &aOKButton );
+ return 0;
+}
+
// Check if command is selected and enable the OK button accordingly
// Grab the help text for this id if available and update the description field
void
diff --git a/svx/source/cui/selector.hxx b/svx/source/cui/selector.hxx
index fe6152131c9d..10346f251563 100644
--- a/svx/source/cui/selector.hxx
+++ b/svx/source/cui/selector.hxx
@@ -216,6 +216,7 @@ class SvxScriptSelectorDialog : public ModelessDialog
DECL_LINK( ClickHdl, Button * );
DECL_LINK( SelectHdl, Control* );
+ DECL_LINK( FunctionDoubleClickHdl, Control* );
void UpdateUI();
void ResizeControls();
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 40c94d2128c3..d835dd1a129e 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -819,11 +819,12 @@ void IMapWindow::DoMacroAssign()
if ( pSdrObj )
{
- SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG );
+ SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
aNamesItem.AddEvent( String::CreateFromAscii( "MouseOver" ), String(), SFX_EVENT_MOUSEOVER_OBJECT );
aNamesItem.AddEvent( String::CreateFromAscii( "MouseOut" ), String(), SFX_EVENT_MOUSEOUT_OBJECT );
+ aSet.Put( aNamesItem );
SvxMacroItem aMacroItem(SID_ATTR_MACROITEM);
IMapObject* pIMapObj = GetIMapObj( pSdrObj );
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 20de4e139b9d..c210919bd09d 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -889,9 +889,6 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
break;
case SID_FM_SHOWCOLS_MORE:
{
- //CHINA001 FmShowColsDialog dlg(NULL);
- //CHINA001 dlg.SetColumns(xCols);
- //CHINA001 dlg.Execute();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
@@ -960,24 +957,14 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
}
else
{
- // Standardlabel setzen
- ::rtl::OUString sLabelBase = String( SVX_RES( RID_STR_COLUMN ) );
- // disambiguate the name
- Reference< XNameAccess > xColNames( xCols, UNO_QUERY );
- ::rtl::OUString sLabel;
- for ( sal_Int32 i=1; i<65535; ++i )
- {
- sLabel = sLabelBase;
- sLabel += ::rtl::OUString::valueOf( (sal_Int32)i );
- if ( !xColNames->hasByName( sLabel ) )
- break;
- }
- // no fallback in case the name is not unique (which is rather improbable) ....
+ FormControlFactory factory( ::comphelper::getProcessServiceFactory() );
+
+ ::rtl::OUString sLabel = factory.getDefaultUniqueName_ByComponentType(
+ Reference< XNameAccess >( xCols, UNO_QUERY_THROW ), xNewCol );
xNewCol->setPropertyValue( FM_PROP_LABEL, makeAny( sLabel ) );
xNewCol->setPropertyValue( FM_PROP_NAME, makeAny( sLabel ) );
- FormControlFactory determine( ::comphelper::getProcessServiceFactory() );
- determine.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xNewCol );
+ factory.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xNewCol );
xCols->insertByIndex( nPos, makeAny( xNewCol ) );
}
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 45a67a09e52d..ff7cfd422eb8 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -30,55 +30,52 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "gridcell.hxx"
-#include "fmtools.hxx"
-#include <stdio.h>
-#ifndef _SVX_FMPROP_HRC
+
+
#include "fmprop.hrc"
-#endif
+#include "fmresids.hrc"
+#include "fmtools.hxx"
+#include "gridcell.hxx"
#include "gridcols.hxx"
#include "sdbdatacolumn.hxx"
+
+#include <com/sun/star/awt/LineEndFormat.hpp>
+#include <com/sun/star/awt/MouseWheelBehavior.hpp>
#include <com/sun/star/awt/VisualEffect.hpp>
-#include <com/sun/star/sdbc/XStatement.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/form/FormComponentType.hpp>
+#include <com/sun/star/form/XBoundComponent.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
-#ifndef _COM_SUN_STAR_SDDB_XCOLUMNSSUPPLIER_HPP_
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/form/XBoundComponent.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/sdbc/XStatement.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/awt/LineEndFormat.hpp>
-#include <com/sun/star/awt/MouseWheelBehavior.hpp>
-#ifndef _COM_SUN_STAR_SCRTIP_XEVENTATTACHERMANAGER_HPP_
-#include <com/sun/star/script/XEventAttacherManager.hpp>
-#endif
-#include <svtools/fmtfield.hxx>
-#include <svtools/numuno.hxx>
-#include <svtools/calendar.hxx>
-#include <vcl/longcurr.hxx>
-#include <svx/dialmgr.hxx>
-#ifndef _SVX_FMRESIDS_HRC
-#include "fmresids.hrc"
-#endif
-#include <tools/shl.hxx>
-#include <tools/diagnose_ex.h>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+
+#include <comphelper/extract.hxx>
#include <comphelper/numbers.hxx>
#include <comphelper/property.hxx>
-#include <comphelper/extract.hxx>
+#include <connectivity/formattedcolumnvalue.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <i18npool/lang.h>
-#include <connectivity/formattedcolumnvalue.hxx>
-#include <math.h>
#include <rtl/math.hxx>
+#include <svtools/calendar.hxx>
+#include <svtools/fmtfield.hxx>
+#include <svtools/numuno.hxx>
#include <svtools/svmedit.hxx>
+#include <svx/dialmgr.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/shl.hxx>
+#include <vcl/longcurr.hxx>
+
+#include <math.h>
+#include <stdio.h>
using namespace ::connectivity;
using namespace ::connectivity::simple;
@@ -228,13 +225,15 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< ::com::s
{
switch (nTypeId)
{
- case TYPE_CHECKBOX: m_pCell = new FmXCheckBoxCell(this, pCellControl); break;
- case TYPE_LISTBOX: m_pCell = new FmXListBoxCell(this, pCellControl); break;
+ case TYPE_CHECKBOX: m_pCell = new FmXCheckBoxCell( this, *pCellControl ); break;
+ case TYPE_LISTBOX: m_pCell = new FmXListBoxCell( this, *pCellControl ); break;
+ case TYPE_COMBOBOX: m_pCell = new FmXComboBoxCell( this, *pCellControl ); break;
default:
- m_pCell = new FmXEditCell(this, pCellControl);
+ m_pCell = new FmXEditCell( this, *pCellControl );
}
}
m_pCell->acquire();
+ m_pCell->init();
impl_toggleScriptManager_nothrow( true );
@@ -3199,13 +3198,33 @@ TYPEINIT0(FmXGridCell);
DBG_NAME(FmXGridCell);
//-----------------------------------------------------------------------------
-FmXGridCell::FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl)
+FmXGridCell::FmXGridCell( DbGridColumn* pColumn, DbCellControl* _pControl )
:OComponentHelper(m_aMutex)
,m_pColumn(pColumn)
- ,m_pCellControl(pControl)
+ ,m_pCellControl( _pControl )
+ ,m_aWindowListeners( m_aMutex )
+ ,m_aFocusListeners( m_aMutex )
+ ,m_aKeyListeners( m_aMutex )
+ ,m_aMouseListeners( m_aMutex )
+ ,m_aMouseMotionListeners( m_aMutex )
{
DBG_CTOR(FmXGridCell,NULL);
+}
+
+//-----------------------------------------------------------------------------
+void FmXGridCell::init()
+{
+ Window* pEventWindow( getEventWindow() );
+ if ( pEventWindow )
+ pEventWindow->AddEventListener( LINK( this, FmXGridCell, OnWindowEvent ) );
+}
+//-----------------------------------------------------------------------------
+Window* FmXGridCell::getEventWindow() const
+{
+ if ( m_pCellControl )
+ return &m_pCellControl->GetWindow();
+ return NULL;
}
//-----------------------------------------------------------------------------
@@ -3236,25 +3255,34 @@ void FmXGridCell::SetTextLineColor(const Color& _rColor)
// XTypeProvider
//------------------------------------------------------------------
-Sequence< sal_Int8 > SAL_CALL FmXGridCell::getImplementationId() throw(RuntimeException)
-{
- static ::cppu::OImplementationId* pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+Sequence< Type > SAL_CALL FmXGridCell::getTypes( ) throw (RuntimeException)
+{
+ Sequence< uno::Type > aTypes = ::comphelper::concatSequences(
+ ::cppu::OComponentHelper::getTypes(),
+ FmXGridCell_Base::getTypes()
+ );
+ if ( m_pCellControl )
+ aTypes = ::comphelper::concatSequences(
+ aTypes,
+ FmXGridCell_WindowBase::getTypes()
+ );
+ return aTypes;
}
+//------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXGridCell )
+
// OComponentHelper
//-----------------------------------------------------------------------------
void FmXGridCell::disposing()
{
+ lang::EventObject aEvent( *this );
+ m_aWindowListeners.disposeAndClear( aEvent );
+ m_aFocusListeners.disposeAndClear( aEvent );
+ m_aKeyListeners.disposeAndClear( aEvent );
+ m_aMouseListeners.disposeAndClear( aEvent );
+ m_aMouseMotionListeners.disposeAndClear( aEvent );
+
OComponentHelper::disposing();
m_pColumn = NULL;
DELETEZ(m_pCellControl);
@@ -3263,12 +3291,13 @@ void FmXGridCell::disposing()
//------------------------------------------------------------------
Any SAL_CALL FmXGridCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
- Any aReturn = OComponentHelper::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XControl* >(this),
- static_cast< ::com::sun::star::form::XBoundControl* >(this)
- );
+ Any aReturn = OComponentHelper::queryAggregation( _rType );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXGridCell_Base::queryInterface( _rType );
+
+ if ( !aReturn.hasValue() && ( m_pCellControl != NULL ) )
+ aReturn = FmXGridCell_WindowBase::queryInterface( _rType );
return aReturn;
}
@@ -3305,6 +3334,231 @@ void FmXGridCell::setLock(sal_Bool _bLock) throw( RuntimeException )
}
}
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setPosSize( ::sal_Int32 _XX, ::sal_Int32 _Y, ::sal_Int32 _Width, ::sal_Int32 _Height, ::sal_Int16 _Flags ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setPosSize: not implemented" );
+ (void)_XX;
+ (void)_Y;
+ (void)_Width;
+ (void)_Height;
+ (void)_Flags;
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+awt::Rectangle SAL_CALL FmXGridCell::getPosSize( ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::getPosSize: not implemented" );
+ return awt::Rectangle();
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setVisible( ::sal_Bool _Visible ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setVisible: not implemented" );
+ (void)_Visible;
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setEnable( ::sal_Bool _Enable ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setEnable: not implemented" );
+ (void)_Enable;
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setFocus( ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setFocus: not implemented" );
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addWindowListener( const Reference< awt::XWindowListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aWindowListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeWindowListener( const Reference< awt::XWindowListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aWindowListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addFocusListener( const Reference< awt::XFocusListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aFocusListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeFocusListener( const Reference< awt::XFocusListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aFocusListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addKeyListener( const Reference< awt::XKeyListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aKeyListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeKeyListener( const Reference< awt::XKeyListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aKeyListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addMouseListener( const Reference< awt::XMouseListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeMouseListener( const Reference< awt::XMouseListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addMouseMotionListener( const Reference< awt::XMouseMotionListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseMotionListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeMouseMotionListener( const Reference< awt::XMouseMotionListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseMotionListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addPaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::addPaintListener: not implemented" );
+ (void)_rxListener;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removePaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::removePaintListener: not implemented" );
+ (void)_rxListener;
+}
+
+//------------------------------------------------------------------
+IMPL_LINK( FmXGridCell, OnWindowEvent, VclWindowEvent*, _pEvent )
+{
+ ENSURE_OR_THROW( _pEvent, "illegal event pointer" );
+ ENSURE_OR_THROW( _pEvent->GetWindow(), "illegal window" );
+ onWindowEvent( _pEvent->GetId(), *_pEvent->GetWindow(), _pEvent->GetData() );
+ return 1L;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridCell::onFocusGained( const awt::FocusEvent& _rEvent )
+{
+ m_aFocusListeners.notifyEach( &awt::XFocusListener::focusGained, _rEvent );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridCell::onFocusLost( const awt::FocusEvent& _rEvent )
+{
+ m_aFocusListeners.notifyEach( &awt::XFocusListener::focusLost, _rEvent );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+ switch ( _nEventId )
+ {
+ case VCLEVENT_CONTROL_GETFOCUS:
+ case VCLEVENT_WINDOW_GETFOCUS:
+ case VCLEVENT_CONTROL_LOSEFOCUS:
+ case VCLEVENT_WINDOW_LOSEFOCUS:
+ {
+ if ( ( _rWindow.IsCompoundControl()
+ && ( _nEventId == VCLEVENT_CONTROL_GETFOCUS
+ || _nEventId == VCLEVENT_CONTROL_LOSEFOCUS
+ )
+ )
+ || ( !_rWindow.IsCompoundControl()
+ && ( _nEventId == VCLEVENT_WINDOW_GETFOCUS
+ || _nEventId == VCLEVENT_WINDOW_LOSEFOCUS
+ )
+ )
+ )
+ {
+ if ( !m_aFocusListeners.getLength() )
+ break;
+
+ bool bFocusGained = ( _nEventId == VCLEVENT_CONTROL_GETFOCUS ) || ( _nEventId == VCLEVENT_WINDOW_GETFOCUS );
+
+ awt::FocusEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.FocusFlags = _rWindow.GetGetFocusFlags();
+ aEvent.Temporary = sal_False;
+
+ if ( bFocusGained )
+ onFocusGained( aEvent );
+ else
+ onFocusLost( aEvent );
+ }
+ }
+ break;
+ case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
+ case VCLEVENT_WINDOW_MOUSEBUTTONUP:
+ {
+ if ( !m_aMouseListeners.getLength() )
+ break;
+
+ const bool bButtonDown = ( _nEventId == VCLEVENT_WINDOW_MOUSEBUTTONDOWN );
+
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast< const ::MouseEvent* >( _pEventData ), *this ) );
+ m_aMouseListeners.notifyEach( bButtonDown ? &awt::XMouseListener::mousePressed : &awt::XMouseListener::mouseReleased, aEvent );
+ }
+ break;
+ case VCLEVENT_WINDOW_MOUSEMOVE:
+ {
+ const MouseEvent& rMouseEvent = *static_cast< const ::MouseEvent* >( _pEventData );
+ if ( rMouseEvent.IsEnterWindow() || rMouseEvent.IsLeaveWindow() )
+ {
+ if ( m_aMouseListeners.getLength() != 0 )
+ {
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( rMouseEvent, *this ) );
+ m_aMouseListeners.notifyEach( rMouseEvent.IsEnterWindow() ? &awt::XMouseListener::mouseEntered: &awt::XMouseListener::mouseExited, aEvent );
+ }
+ }
+ else if ( !rMouseEvent.IsEnterWindow() && !rMouseEvent.IsLeaveWindow() )
+ {
+ if ( m_aMouseMotionListeners.getLength() != 0 )
+ {
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( rMouseEvent, *this ) );
+ aEvent.ClickCount = 0;
+ const bool bSimpleMove = ( ( rMouseEvent.GetMode() & MOUSE_SIMPLEMOVE ) != 0 );
+ m_aMouseMotionListeners.notifyEach( bSimpleMove ? &awt::XMouseMotionListener::mouseMoved: &awt::XMouseMotionListener::mouseDragged, aEvent );
+ }
+ }
+ }
+ break;
+ case VCLEVENT_WINDOW_KEYINPUT:
+ case VCLEVENT_WINDOW_KEYUP:
+ {
+ if ( !m_aKeyListeners.getLength() )
+ break;
+
+ const bool bKeyPressed = ( _nEventId == VCLEVENT_WINDOW_KEYINPUT );
+ awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent( *static_cast< const ::KeyEvent* >( _pEventData ), *this ) );
+ m_aKeyListeners.notifyEach( bKeyPressed ? &awt::XKeyListener::keyPressed: &awt::XKeyListener::keyReleased, aEvent );
+ }
+ break;
+ }
+}
+
/*************************************************************************/
TYPEINIT1(FmXDataCell, FmXGridCell);
//------------------------------------------------------------------------------
@@ -3326,6 +3580,12 @@ void FmXDataCell::UpdateFromColumn()
/*************************************************************************/
TYPEINIT1(FmXTextCell, FmXDataCell);
+FmXTextCell::FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXDataCell( pColumn, _rControl )
+ ,m_bFastPaint( sal_True )
+{
+}
+
//------------------------------------------------------------------------------
void FmXTextCell::PaintFieldToCell(OutputDevice& rDev,
const Rectangle& rRect,
@@ -3372,15 +3632,16 @@ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev,
DBG_NAME(FmXEditCell);
//------------------------------------------------------------------------------
-FmXEditCell::FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXTextCell(pColumn, pControl)
+FmXEditCell::FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXTextCell( pColumn, _rControl )
,m_aTextListeners(m_aMutex)
+ ,m_aChangeListeners( m_aMutex )
,m_pEditImplementation( NULL )
,m_bOwnEditImplementation( false )
{
DBG_CTOR(FmXEditCell,NULL);
- DbTextField* pTextField = PTR_CAST( DbTextField, pControl );
+ DbTextField* pTextField = PTR_CAST( DbTextField, &_rControl );
if ( pTextField )
{
@@ -3390,11 +3651,9 @@ FmXEditCell::FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl)
}
else
{
- m_pEditImplementation = new EditImplementation( *static_cast< Edit* >( pControl->GetControl() ) );
+ m_pEditImplementation = new EditImplementation( static_cast< Edit& >( _rControl.GetWindow() ) );
m_bOwnEditImplementation = true;
}
-
- m_pEditImplementation->SetModifyHdl( LINK( this, FmXEditCell, OnTextChanged ) );
}
//------------------------------------------------------------------
@@ -3416,6 +3675,7 @@ void FmXEditCell::disposing()
{
::com::sun::star::lang::EventObject aEvt(*this);
m_aTextListeners.disposeAndClear(aEvt);
+ m_aChangeListeners.disposeAndClear(aEvt);
m_pEditImplementation->SetModifyHdl( Link() );
if ( m_bOwnEditImplementation )
@@ -3428,27 +3688,26 @@ void FmXEditCell::disposing()
//------------------------------------------------------------------
Any SAL_CALL FmXEditCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
- Any aReturn = FmXDataCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XTextComponent* >(this)
- );
+ Any aReturn = FmXTextCell::queryAggregation( _rType );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXEditCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXEditCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XTextComponent >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXTextCell::getTypes(),
+ FmXEditCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXEditCell )
+
// ::com::sun::star::awt::XTextComponent
//------------------------------------------------------------------------------
void SAL_CALL FmXEditCell::addTextListener(const Reference< ::com::sun::star::awt::XTextListener >& l) throw( RuntimeException )
@@ -3473,7 +3732,7 @@ void SAL_CALL FmXEditCell::setText( const ::rtl::OUString& aText ) throw( Runtim
// In JAVA wird auch ein textChanged ausgeloest, in VCL nicht.
// ::com::sun::star::awt::Toolkit soll JAVA-komform sein...
- OnTextChanged( NULL );
+ onTextChanged();
}
}
@@ -3583,30 +3842,70 @@ void SAL_CALL FmXEditCell::setMaxTextLen( sal_Int16 nLen ) throw( RuntimeExcepti
}
//------------------------------------------------------------------------------
-IMPL_LINK( FmXEditCell, OnTextChanged, void*, EMPTYARG )
+void SAL_CALL FmXEditCell::addChangeListener( const Reference< form::XChangeListener >& _Listener ) throw (RuntimeException)
{
- if ( m_pEditImplementation )
+ m_aChangeListeners.addInterface( _Listener );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::removeChangeListener( const Reference< form::XChangeListener >& _Listener ) throw (RuntimeException)
+{
+ m_aChangeListeners.removeInterface( _Listener );
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onTextChanged()
+{
+ ::com::sun::star::awt::TextEvent aEvent;
+ aEvent.Source = *this;
+ m_aTextListeners.notifyEach( &awt::XTextListener::textChanged, aEvent );
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onFocusGained( const awt::FocusEvent& _rEvent )
+{
+ FmXTextCell::onFocusGained( _rEvent );
+ m_sValueOnEnter = getText();
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onFocusLost( const awt::FocusEvent& _rEvent )
+{
+ FmXTextCell::onFocusLost( _rEvent );
+
+ if ( getText() != m_sValueOnEnter )
{
- ::cppu::OInterfaceIteratorHelper aIt( m_aTextListeners );
- ::com::sun::star::awt::TextEvent aEvt;
- aEvt.Source = *this;
- while( aIt.hasMoreElements() )
- ((::com::sun::star::awt::XTextListener *)aIt.next())->textChanged( aEvt );
+ lang::EventObject aEvent( *this );
+ m_aChangeListeners.notifyEach( &XChangeListener::changed, aEvent );
}
- return 1;
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+ switch ( _nEventId )
+ {
+ case VCLEVENT_EDIT_MODIFY:
+ {
+ if ( m_pEditImplementation && m_aTextListeners.getLength() )
+ onTextChanged();
+ return;
+ }
+ }
+
+ FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
}
/*************************************************************************/
DBG_NAME(FmXCheckBoxCell);
//------------------------------------------------------------------------------
-FmXCheckBoxCell::FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXDataCell(pColumn, pControl)
+FmXCheckBoxCell::FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXDataCell( pColumn, _rControl )
,m_aItemListeners(m_aMutex)
- ,m_pBox(&((CheckBoxControl*)pControl->GetControl())->GetBox())
+ ,m_aActionListeners( m_aMutex )
+ ,m_pBox( & static_cast< CheckBoxControl& >( _rControl.GetWindow() ).GetBox() )
{
DBG_CTOR(FmXCheckBoxCell,NULL);
-
- ((CheckBoxControl*)pControl->GetControl())->SetClickHdl( LINK( this, FmXCheckBoxCell, OnClick ) );
}
//------------------------------------------------------------------
@@ -3627,8 +3926,9 @@ void FmXCheckBoxCell::disposing()
{
::com::sun::star::lang::EventObject aEvt(*this);
m_aItemListeners.disposeAndClear(aEvt);
+ m_aActionListeners.disposeAndClear(aEvt);
- ((CheckBoxControl*)m_pCellControl->GetControl())->SetClickHdl(Link());
+ static_cast< CheckBoxControl& >( m_pCellControl->GetWindow() ).SetClickHdl(Link());
m_pBox = NULL;
FmXDataCell::disposing();
@@ -3637,27 +3937,26 @@ void FmXCheckBoxCell::disposing()
//------------------------------------------------------------------
Any SAL_CALL FmXCheckBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
- Any aReturn = FmXDataCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XCheckBox* >(this)
- );
+ Any aReturn = FmXDataCell::queryAggregation( _rType );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXCheckBoxCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXCheckBoxCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XCheckBox >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXDataCell::getTypes(),
+ FmXCheckBoxCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXCheckBoxCell )
+
//------------------------------------------------------------------
void SAL_CALL FmXCheckBoxCell::addItemListener( const Reference< ::com::sun::star::awt::XItemListener >& l ) throw( RuntimeException )
{
@@ -3671,17 +3970,6 @@ void SAL_CALL FmXCheckBoxCell::removeItemListener( const Reference< ::com::sun::
}
//------------------------------------------------------------------
-void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& rLabel ) throw( RuntimeException )
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- if (m_pBox)
- {
- UpdateFromColumn();
- m_pBox->SetText( rLabel );
- }
-}
-
-//------------------------------------------------------------------
void SAL_CALL FmXCheckBoxCell::setState( short n ) throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -3716,42 +4004,89 @@ void SAL_CALL FmXCheckBoxCell::enableTriState( sal_Bool b ) throw( RuntimeExcept
}
//------------------------------------------------------------------
-IMPL_LINK( FmXCheckBoxCell, OnClick, void*, EMPTYARG )
+void SAL_CALL FmXCheckBoxCell::addActionListener( const Reference< awt::XActionListener >& _Listener ) throw (RuntimeException)
{
- if (m_pBox)
+ m_aActionListeners.addInterface( _Listener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::removeActionListener( const Reference< awt::XActionListener >& _Listener ) throw (RuntimeException)
+{
+ m_aActionListeners.removeInterface( _Listener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& _Label ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( m_pColumn )
+ {
+ DbGridControl& rGrid( m_pColumn->GetParent() );
+ rGrid.SetColumnTitle( rGrid.GetColumnId( m_pColumn->GetFieldPos() ), _Label );
+ }
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::setActionCommand( const ::rtl::OUString& _Command ) throw (RuntimeException)
+{
+ m_aActionCommand = _Command;
+}
+
+//------------------------------------------------------------------
+Window* FmXCheckBoxCell::getEventWindow() const
+{
+ return m_pBox;
+}
+
+//------------------------------------------------------------------
+void FmXCheckBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+ switch ( _nEventId )
+ {
+ case VCLEVENT_CHECKBOX_TOGGLE:
{
// check boxes are to be committed immediately (this holds for ordinary check box controls in
// documents, and this must hold for check boxes in grid columns, too
// 91210 - 22.08.2001 - frank.schoenheit@sun.com
m_pCellControl->Commit();
- // notify our listeners
- ::cppu::OInterfaceIteratorHelper aIt( m_aItemListeners );
-
- ::com::sun::star::awt::ItemEvent aEvent;
- aEvent.Source = *this;
- aEvent.Highlighted = sal_False;
- aEvent.Selected = m_pBox->GetState();
+ Reference< XWindow > xKeepAlive( this );
+ if ( m_aItemListeners.getLength() && m_pBox )
+ {
+ awt::ItemEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Highlighted = sal_False;
+ aEvent.Selected = m_pBox->GetState();
+ m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent );
+ }
+ if ( m_aActionListeners.getLength() )
+ {
+ awt::ActionEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.ActionCommand = m_aActionCommand;
+ m_aActionListeners.notifyEach( &awt::XActionListener::actionPerformed, aEvent );
+ }
+ }
+ break;
- while ( aIt.hasMoreElements() )
- static_cast< awt::XItemListener* >( aIt.next() )->itemStateChanged( aEvent );
+ default:
+ FmXDataCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
+ break;
}
- return 1;
}
/*************************************************************************/
DBG_NAME(FmXListBoxCell);
//------------------------------------------------------------------------------
-FmXListBoxCell::FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXTextCell(pColumn, pControl)
+FmXListBoxCell::FmXListBoxCell(DbGridColumn* pColumn, DbCellControl& _rControl)
+ :FmXTextCell( pColumn, _rControl )
,m_aItemListeners(m_aMutex)
,m_aActionListeners(m_aMutex)
- ,m_pBox((ListBox*)pControl->GetControl())
+ ,m_pBox( &static_cast< ListBox& >( _rControl.GetWindow() ) )
{
DBG_CTOR(FmXListBoxCell,NULL);
- m_pBox->AddEventListener( LINK( this, FmXListBoxCell, OnSelect ) );
m_pBox->SetDoubleClickHdl( LINK( this, FmXListBoxCell, OnDoubleClick ) );
}
@@ -3786,26 +4121,25 @@ void FmXListBoxCell::disposing()
Any SAL_CALL FmXListBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
Any aReturn = FmXTextCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XListBox* >(this)
- );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXListBoxCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXListBoxCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XListBox >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXTextCell::getTypes(),
+ FmXListBoxCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXListBoxCell )
+
//------------------------------------------------------------------
void SAL_CALL FmXListBoxCell::addItemListener(const Reference< ::com::sun::star::awt::XItemListener >& l) throw( RuntimeException )
{
@@ -4042,10 +4376,10 @@ void SAL_CALL FmXListBoxCell::makeVisible(sal_Int16 nEntry) throw( RuntimeExcept
}
//------------------------------------------------------------------
-IMPL_LINK(FmXListBoxCell, OnSelect, VclWindowEvent*, _pEvent )
+void FmXListBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
{
- if ( ( _pEvent->GetWindow() == m_pBox )
- && ( _pEvent->GetId() == VCLEVENT_LISTBOX_SELECT )
+ if ( ( &_rWindow == m_pBox )
+ && ( _nEventId == VCLEVENT_LISTBOX_SELECT )
)
{
OnDoubleClick( NULL );
@@ -4059,8 +4393,10 @@ IMPL_LINK(FmXListBoxCell, OnSelect, VclWindowEvent*, _pEvent )
? m_pBox->GetSelectEntryPos() : 0xFFFF;
m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent );
+ return;
}
- return 1;
+
+ FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
}
@@ -4083,6 +4419,203 @@ IMPL_LINK( FmXListBoxCell, OnDoubleClick, void*, EMPTYARG )
/*************************************************************************/
+
+DBG_NAME( FmXComboBoxCell );
+
+//------------------------------------------------------------------------------
+FmXComboBoxCell::FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXTextCell( pColumn, _rControl )
+ ,m_aItemListeners( m_aMutex )
+ ,m_aActionListeners( m_aMutex )
+ ,m_pComboBox( &static_cast< ComboBox& >( _rControl.GetWindow() ) )
+{
+ DBG_CTOR( FmXComboBoxCell, NULL );
+}
+
+//------------------------------------------------------------------------------
+FmXComboBoxCell::~FmXComboBoxCell()
+{
+ if ( !OComponentHelper::rBHelper.bDisposed )
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR( FmXComboBoxCell, NULL );
+}
+
+//-----------------------------------------------------------------------------
+void FmXComboBoxCell::disposing()
+{
+ ::com::sun::star::lang::EventObject aEvt(*this);
+ m_aItemListeners.disposeAndClear(aEvt);
+ m_aActionListeners.disposeAndClear(aEvt);
+
+ FmXTextCell::disposing();
+}
+
+//------------------------------------------------------------------
+Any SAL_CALL FmXComboBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
+{
+ Any aReturn = FmXTextCell::queryAggregation(_rType);
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXComboBoxCell_Base::queryInterface( _rType );
+
+ return aReturn;
+}
+
+//-------------------------------------------------------------------------
+Sequence< Type > SAL_CALL FmXComboBoxCell::getTypes( ) throw(RuntimeException)
+{
+ return ::comphelper::concatSequences(
+ FmXTextCell::getTypes(),
+ FmXComboBoxCell_Base::getTypes()
+ );
+}
+
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXComboBoxCell )
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addItemListener(const Reference< awt::XItemListener >& l) throw( RuntimeException )
+{
+ m_aItemListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::removeItemListener(const Reference< awt::XItemListener >& l) throw( RuntimeException )
+{
+ m_aItemListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addActionListener(const Reference< awt::XActionListener >& l) throw( RuntimeException )
+{
+ m_aActionListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::removeActionListener(const Reference< awt::XActionListener >& l) throw( RuntimeException )
+{
+ m_aActionListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addItem( const ::rtl::OUString& _Item, sal_Int16 _Pos ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ m_pComboBox->InsertEntry( _Item, _Pos );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addItems( const Sequence< ::rtl::OUString >& _Items, sal_Int16 _Pos ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ {
+ sal_uInt16 nP = _Pos;
+ for ( sal_uInt16 n = 0; n < _Items.getLength(); n++ )
+ {
+ m_pComboBox->InsertEntry( _Items.getConstArray()[n], nP );
+ if ( _Pos != -1 )
+ nP++;
+ }
+ }
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::removeItems( sal_Int16 _Pos, sal_Int16 _Count ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ {
+ for ( sal_uInt16 n = _Count; n; )
+ m_pComboBox->RemoveEntry( _Pos + (--n) );
+ }
+}
+
+//------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXComboBoxCell::getItemCount() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pComboBox ? m_pComboBox->GetEntryCount() : 0;
+}
+
+//------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXComboBoxCell::getItem( sal_Int16 _Pos ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ String sItem;
+ if ( m_pComboBox )
+ sItem = m_pComboBox->GetEntry( _Pos );
+ return sItem;
+}
+//------------------------------------------------------------------
+Sequence< ::rtl::OUString > SAL_CALL FmXComboBoxCell::getItems() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ Sequence< ::rtl::OUString > aItems;
+ if ( m_pComboBox )
+ {
+ sal_uInt16 nEntries = m_pComboBox->GetEntryCount();
+ aItems.realloc( nEntries );
+ ::rtl::OUString* pItem = aItems.getArray();
+ for ( sal_uInt16 n=0; n<nEntries; ++n, ++pItem )
+ *pItem = m_pComboBox->GetEntry( n );
+ }
+ return aItems;
+}
+
+//------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXComboBoxCell::getDropDownLineCount() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Int16 nLines = 0;
+ if ( m_pComboBox )
+ nLines = m_pComboBox->GetDropDownLineCount();
+
+ return nLines;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::setDropDownLineCount(sal_Int16 nLines) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ m_pComboBox->SetDropDownLineCount( nLines );
+}
+
+//------------------------------------------------------------------------------
+void FmXComboBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+
+ switch ( _nEventId )
+ {
+ case VCLEVENT_COMBOBOX_SELECT:
+ {
+ awt::ItemEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Highlighted = sal_False;
+
+ // Bei Mehrfachselektion 0xFFFF, sonst die ID
+ aEvent.Selected = ( m_pComboBox->GetSelectEntryCount() == 1 )
+ ? m_pComboBox->GetSelectEntryPos()
+ : 0xFFFF;
+ m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent );
+ }
+ break;
+
+ default:
+ FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
+ break;
+ }
+}
+
+/*************************************************************************/
TYPEINIT1(FmXFilterCell, FmXGridCell);
//------------------------------------------------------------------------------
@@ -4093,8 +4626,8 @@ Reference< XInterface > FmXFilterCell_CreateInstance(const Reference< ::com::su
DBG_NAME(FmXFilterCell);
//------------------------------------------------------------------------------
-FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXGridCell(pColumn, pControl)
+FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl )
+ :FmXGridCell( pColumn, pControl )
,m_aTextListeners(m_aMutex)
{
DBG_CTOR(FmXFilterCell,NULL);
@@ -4180,26 +4713,25 @@ void FmXFilterCell::disposing()
Any SAL_CALL FmXFilterCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
Any aReturn = FmXGridCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XTextComponent* >(this)
- );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXFilterCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXFilterCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XTextComponent >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXGridCell::getTypes(),
+ FmXFilterCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXFilterCell )
+
// ::com::sun::star::awt::XTextComponent
//------------------------------------------------------------------------------
void SAL_CALL FmXFilterCell::addTextListener(const Reference< ::com::sun::star::awt::XTextListener >& l) throw( RuntimeException )
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index d968342d6ef5..ccce6b50ee20 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -190,7 +190,7 @@ using namespace ::svxform;
case FormComponentType::IMAGECONTROL:
nClassNameResourceId = RID_STR_PROPTITLE_IMAGECONTROL; break;
case FormComponentType::HIDDENCONTROL:
- nClassNameResourceId = RID_STR_HIDDEN_CLASSNAME; break;
+ nClassNameResourceId = RID_STR_PROPTITLE_HIDDEN; break;
case FormComponentType::SCROLLBAR:
nClassNameResourceId = RID_STR_PROPTITLE_SCROLLBAR; break;
case FormComponentType::SPINBUTTON:
@@ -199,7 +199,7 @@ using namespace ::svxform;
nClassNameResourceId = RID_STR_PROPTITLE_NAVBAR; break;
case FormComponentType::CONTROL:
default:
- nClassNameResourceId = RID_STR_CONTROL_CLASSNAME; break;
+ nClassNameResourceId = RID_STR_CONTROL; break;
}
if ( !nClassNameResourceId )
@@ -218,6 +218,7 @@ FmPropBrw::FmPropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBinding
:SfxFloatingWindow(_pBindings, _pMgr, _pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_3DLOOK|WB_ROLLABLE) )
,SfxControllerItem(SID_FM_PROPERTY_CONTROL, *_pBindings)
,m_bInitialStateChange(sal_True)
+ ,m_bInStateChange( false )
,m_xORB(_xORB)
{
DBG_CTOR(FmPropBrw,NULL);
@@ -668,11 +669,12 @@ void FmPropBrw::impl_ensurePropertyBrowser_nothrow( FmFormShell* _pFormShell )
//-----------------------------------------------------------------------
void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
+ if (!pState || SID_FM_PROPERTY_CONTROL != nSID)
+ return;
+
+ m_bInStateChange = true;
try
{
- if (!pState || SID_FM_PROPERTY_CONTROL != nSID)
- return;
-
if (eState >= SFX_ITEM_AVAILABLE)
{
FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
@@ -719,5 +721,5 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
{
DBG_ERROR("FmPropBrw::StateChanged: Exception occured!");
}
-
+ m_bInStateChange = false;
}
diff --git a/svx/source/form/fmctrler.cxx b/svx/source/form/fmctrler.cxx
index 935bdbc74fe8..48db5acbb01e 100644
--- a/svx/source/form/fmctrler.cxx
+++ b/svx/source/form/fmctrler.cxx
@@ -129,6 +129,7 @@ struct ColumnInfo
Reference< XColumn > xColumn;
sal_Int32 nNullable;
sal_Bool bAutoIncrement;
+ sal_Bool bReadOnly;
::rtl::OUString sName;
// information about the control(s) bound to this column
@@ -148,6 +149,7 @@ struct ColumnInfo
:xColumn()
,nNullable( ColumnValue::NULLABLE_UNKNOWN )
,bAutoIncrement( sal_False )
+ ,bReadOnly( sal_False )
,sName()
,xFirstControlWithInputRequired()
,xFirstGridWithInputRequiredColumn()
@@ -202,6 +204,7 @@ ColumnInfoCache::ColumnInfoCache( const Reference< XColumnsSupplier >& _rxColSup
OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_ISNULLABLE ) >>= aColInfo.nNullable );
OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_AUTOINCREMENT ) >>= aColInfo.bAutoIncrement );
OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_NAME ) >>= aColInfo.sName );
+ OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_ISREADONLY ) >>= aColInfo.bReadOnly );
m_aColumns.push_back( aColInfo );
}
@@ -227,6 +230,7 @@ namespace
OSL_VERIFY( _rxControlModel->getPropertyValue( FM_PROP_INPUT_REQUIRED ) >>= bInputRequired );
return ( bInputRequired != sal_False );
}
+
void lcl_resetColumnControlInfo( ColumnInfo& _rColInfo )
{
_rColInfo.xFirstControlWithInputRequired.clear();
@@ -2956,7 +2960,6 @@ void FmXFormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
aRow[(*iter).xText] = sCriteria;
}
}
- break;
}
}
}
@@ -3502,6 +3505,9 @@ sal_Bool SAL_CALL FmXFormController::approveRowChange(const RowChangeEvent& _rEv
if ( rColInfo.bAutoIncrement )
continue;
+ if ( rColInfo.bReadOnly )
+ continue;
+
if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() )
continue;
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index b4a5b209956f..ed4cd890ec9e 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -38,6 +38,7 @@
#include "fmprop.hrc"
#include "fmservs.hxx"
#include "fmobj.hxx"
+#include "formcontrolfactory.hxx"
#include "svditer.hxx"
#include "fmresids.hrc"
#include "svx/dbtoolsclient.hxx"
@@ -551,18 +552,12 @@ Reference< ::com::sun::star::form::XForm > FmFormPageImpl::findPlaceInFormCompo
xFormProps->setPropertyValue(FM_PROP_COMMANDTYPE, makeAny(nCommandType));
Reference< ::com::sun::star::container::XNameAccess > xNamedSet( getForms(), UNO_QUERY );
- ::rtl::OUString aName;
- if ((CommandType::TABLE == nCommandType) || (CommandType::QUERY == nCommandType))
- {
- // Namen der ::com::sun::star::form ueber den Titel der CursorSource setzen
- aName = getUniqueName(rCursorSource, xNamedSet);
- }
- else
- // ansonsten StandardformName verwenden
- aName = getUniqueName(::rtl::OUString(String(SVX_RES(RID_STR_STDFORMNAME))), xNamedSet);
+ const bool bTableOrQuery = ( CommandType::TABLE == nCommandType ) || ( CommandType::QUERY == nCommandType );
+ ::rtl::OUString sName = FormControlFactory::getUniqueName( xNamedSet,
+ bTableOrQuery ? rCursorSource : ::rtl::OUString( String( SVX_RES( RID_STR_STDFORMNAME ) ) ) );
- xFormProps->setPropertyValue(FM_PROP_NAME, makeAny(aName));
+ xFormProps->setPropertyValue( FM_PROP_NAME, makeAny( sName ) );
if( bUndo )
{
@@ -574,7 +569,7 @@ Reference< ::com::sun::star::form::XForm > FmFormPageImpl::findPlaceInFormCompo
xContainer->getCount()));
}
- getForms()->insertByName(aName, makeAny(xForm));
+ getForms()->insertByName( sName, makeAny( xForm ) );
if( bUndo )
pModel->EndUndo();
@@ -672,7 +667,6 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
//------------------------------------------------------------------------------
::rtl::OUString FmFormPageImpl::setUniqueName(const Reference< XFormComponent > & xFormComponent, const Reference< XForm > & xControls)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::setUniqueName" );
#if OSL_DEBUG_LEVEL > 0
try
{
@@ -696,9 +690,10 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
// setzen eines default Namens ueber die ClassId
sal_Int16 nClassId( FormComponentType::CONTROL );
xSet->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId;
- Reference< XServiceInfo > xSI( xSet, UNO_QUERY );
- ::rtl::OUString sDefaultName = getDefaultName( nClassId, xControls, xSI );
+ ::rtl::OUString sDefaultName = FormControlFactory::getDefaultUniqueName_ByComponentType(
+ Reference< XNameAccess >( xControls, UNO_QUERY ), xSet );
+
// bei Radiobuttons, die einen Namen haben, diesen nicht ueberschreiben!
if (!sName.getLength() || nClassId != ::com::sun::star::form::FormComponentType::RADIOBUTTON)
{
@@ -711,78 +706,6 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
return sName;
}
-
-UniString FmFormPageImpl::getDefaultName( sal_Int16 _nClassId, const Reference< XServiceInfo >& _rxObject )
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getDefaultName" );
- sal_uInt16 nResId;
-
- switch (_nClassId)
- {
- case FormComponentType::COMMANDBUTTON: nResId = RID_STR_BUTTON_CLASSNAME; break;
- case FormComponentType::RADIOBUTTON: nResId = RID_STR_RADIOBUTTON_CLASSNAME; break;
- case FormComponentType::CHECKBOX: nResId = RID_STR_CHECKBOX_CLASSNAME; break;
- case FormComponentType::LISTBOX: nResId = RID_STR_LISTBOX_CLASSNAME; break;
- case FormComponentType::COMBOBOX: nResId = RID_STR_COMBOBOX_CLASSNAME; break;
- case FormComponentType::GROUPBOX: nResId = RID_STR_GROUPBOX_CLASSNAME; break;
- case FormComponentType::IMAGEBUTTON: nResId = RID_STR_IMAGE_CLASSNAME; break;
- case FormComponentType::FIXEDTEXT: nResId = RID_STR_FIXEDTEXT_CLASSNAME; break;
- case FormComponentType::GRIDCONTROL: nResId = RID_STR_GRID_CLASSNAME; break;
- case FormComponentType::FILECONTROL: nResId = RID_STR_FILECONTROL_CLASSNAME; break;
- case FormComponentType::DATEFIELD: nResId = RID_STR_DATEFIELD_CLASSNAME; break;
- case FormComponentType::TIMEFIELD: nResId = RID_STR_TIMEFIELD_CLASSNAME; break;
- case FormComponentType::NUMERICFIELD: nResId = RID_STR_NUMERICFIELD_CLASSNAME; break;
- case FormComponentType::CURRENCYFIELD: nResId = RID_STR_CURRENCYFIELD_CLASSNAME; break;
- case FormComponentType::PATTERNFIELD: nResId = RID_STR_PATTERNFIELD_CLASSNAME; break;
- case FormComponentType::IMAGECONTROL: nResId = RID_STR_IMAGECONTROL_CLASSNAME; break;
- case FormComponentType::HIDDENCONTROL: nResId = RID_STR_HIDDEN_CLASSNAME; break;
- case FormComponentType::SCROLLBAR: nResId = RID_STR_CLASSNAME_SCROLLBAR; break;
- case FormComponentType::SPINBUTTON: nResId = RID_STR_CLASSNAME_SPINBUTTON; break;
- case FormComponentType::NAVIGATIONBAR: nResId = RID_STR_NAVBAR_CLASSNAME; break;
-
- case FormComponentType::TEXTFIELD:
- nResId = RID_STR_EDIT_CLASSNAME;
- if ( _rxObject.is() && _rxObject->supportsService( FM_SUN_COMPONENT_FORMATTEDFIELD ) )
- nResId = RID_STR_FORMATTED_CLASSNAME;
- break;
-
- default:
- nResId = RID_STR_CONTROL_CLASSNAME; break;
- }
-
- return SVX_RES(nResId);
-}
-
-//------------------------------------------------------------------------------
-::rtl::OUString FmFormPageImpl::getDefaultName(
- sal_Int16 _nClassId, const Reference< XForm >& _rxControls, const Reference< XServiceInfo >& _rxObject ) const
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getDefaultName" );
- ::rtl::OUString aClassName=getDefaultName( _nClassId, _rxObject );
-
- Reference< ::com::sun::star::container::XNameAccess > xNamedSet( _rxControls, UNO_QUERY );
- return getUniqueName(aClassName, xNamedSet);
-}
-
-//------------------------------------------------------------------
-::rtl::OUString FmFormPageImpl::getUniqueName(const ::rtl::OUString& rName, const Reference< ::com::sun::star::container::XNameAccess > & xNamedSet) const
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getUniqueName" );
- Reference< ::com::sun::star::container::XIndexAccess > xIndexSet(xNamedSet, UNO_QUERY);
- ::rtl::OUString sName( rName );
-
- if ( !xIndexSet.is() )
- return sName;
-
- sal_Int32 n = 0;
- ::rtl::OUString sClassName = rName;
-
- while ( xNamedSet->hasByName( sName ) )
- sName = sClassName + ::rtl::OUString::valueOf(++n);
-
- return sName;
-}
-
//------------------------------------------------------------------
void FmFormPageImpl::formObjectInserted( const FmFormObj& _object )
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 87149994839b..8c5ca61f6691 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -785,7 +785,7 @@ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( Ru
void FmXFormShell::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::disposing" );
- OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........\n", this );
+ OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........", this );
impl_checkDisposed();
FmXFormShell_BASE::disposing();
@@ -3936,7 +3936,7 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem)
void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeactivateController /* = sal_True */ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewDeactivated" );
- OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........\n", this, &_rCurrentView );
+ OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........", this, &_rCurrentView );
if ( _rCurrentView.GetImpl() && !_rCurrentView.IsDesignMode() )
{
@@ -3971,7 +3971,7 @@ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeacti
// remove callbacks at the page
if ( pPage )
{
- OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p\n", this, pPage );
+ OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p", this, pPage );
pPage->GetImpl().SetFormsCreationHdl( Link() );
}
UpdateForms( sal_True );
@@ -4010,7 +4010,7 @@ IMPL_LINK( FmXFormShell, OnFormsCreated, FmFormPage*, /*_pPage*/ )
void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncAction /* = sal_False */ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewActivated" );
- OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........\n", this, &_rCurrentView );
+ OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........", this, &_rCurrentView );
FmFormPage* pPage = _rCurrentView.GetCurPage();
@@ -4040,7 +4040,7 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncActi
// set callbacks at the page
if ( pPage )
{
- OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p\n", this, pPage );
+ OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p", this, pPage );
pPage->GetImpl().SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) );
}
diff --git a/svx/source/form/fmstring.src b/svx/source/form/fmstring.src
index 2572c2ed2239..8b42ccadc6a6 100644
--- a/svx/source/form/fmstring.src
+++ b/svx/source/form/fmstring.src
@@ -84,107 +84,16 @@ Resource RID_RSC_TABWIN_PREFIX
};
String RID_STR_FORMSHELL
{
- Text [ en-US ] = "Form";
+ Text = "Form Shell";
};
String RID_STR_STDFORMNAME
{
- Text = "Standard";
-};
-String RID_STR_FORMATTED_CLASSNAME
-{
- Text = "FormattedField";
-};
-String RID_STR_CONTROL_CLASSNAME
-{
- Text = "Control";
-};
-String RID_STR_CHECKBOX_CLASSNAME
-{
- Text = "CheckBox";
-};
-String RID_STR_RADIOBUTTON_CLASSNAME
-{
- Text = "OptionButton";
-};
-String RID_STR_BUTTON_CLASSNAME
-{
- Text = "PushButton";
-};
-String RID_STR_FIXEDTEXT_CLASSNAME
-{
- Text = "LabelField";
-};
-String RID_STR_IMAGE_CLASSNAME
-{
- Text = "ImageButton";
-};
-String RID_STR_GRID_CLASSNAME
-{
- Text = "TableControl";
-};
-String RID_STR_GROUPBOX_CLASSNAME
-{
- Text = "GroupBox";
-};
-String RID_STR_LISTBOX_CLASSNAME
-{
- Text = "ListBox";
-};
-String RID_STR_COMBOBOX_CLASSNAME
-{
- Text = "ComboBox";
-};
-String RID_STR_EDIT_CLASSNAME
-{
- Text = "TextBox";
+ Text [ en-US ]= "Form";
};
-String RID_STR_FILECONTROL_CLASSNAME
+String RID_STR_PROPTITLE_HIDDEN
{
- Text = "FileSelection";
+ Text [ en-US ] = "Hidden Control";
};
-String RID_STR_DATEFIELD_CLASSNAME
-{
- Text = "DateField";
-};
-String RID_STR_TIMEFIELD_CLASSNAME
-{
- Text = "TimeField";
-};
-String RID_STR_NUMERICFIELD_CLASSNAME
-{
- Text = "NumericalField";
-};
-String RID_STR_CURRENCYFIELD_CLASSNAME
-{
- Text = "CurrencyField";
-};
-String RID_STR_PATTERNFIELD_CLASSNAME
-{
- Text = "PatternField";
-};
-String RID_STR_IMAGECONTROL_CLASSNAME
-{
- Text = "ImageControl";
-};
-String RID_STR_HIDDEN_CLASSNAME
-{
- Text = "HiddenControl";
-};
-String RID_STR_NAVBAR_CLASSNAME
-{
- Text [ en-US ] = "NavigationBar";
-};
-
-String RID_STR_CLASSNAME_SCROLLBAR
-{
- Text [ en-US ] = "Scrollbar";
-};
-
-String RID_STR_CLASSNAME_SPINBUTTON
-{
- Text [ en-US ] = "SpinButton";
-};
-
String RID_STR_CONTROL
{
Text [ en-US ] = "Control";
@@ -282,7 +191,7 @@ String RID_STR_TIME
};
String RID_STR_PROPTITLE_PUSHBUTTON
{
- Text [ en-US ] = "Button";
+ Text [ en-US ] = "Push Button";
};
String RID_STR_PROPTITLE_RADIOBUTTON
{
@@ -294,7 +203,7 @@ String RID_STR_PROPTITLE_CHECKBOX
};
String RID_STR_PROPTITLE_FIXEDTEXT
{
- Text [ en-US ] = "Label field";
+ Text [ en-US ] = "Label Field";
};
String RID_STR_PROPTITLE_GROUPBOX
{
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 94ce048f4ed2..222407a36021 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -342,7 +342,7 @@ void FmFormView::GrabFirstControlFocus( sal_Bool _bForceSync )
//------------------------------------------------------------------------
SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
{
- OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p\n", this, pPage );
+ OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p", this, pPage );
SdrPageView* pPV = E3dView::ShowSdrPage(pPage);
@@ -380,7 +380,7 @@ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
//------------------------------------------------------------------------
void FmFormView::HideSdrPage()
{
- OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p\n", this, GetCurPage() );
+ OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p", this, GetCurPage() );
// --- 1. deactivate controls
if ( !IsDesignMode() )
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 50434af4917b..de1a7d76b526 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -35,6 +35,7 @@
#include "fmcontrollayout.hxx"
#include "fmprop.hrc"
#include "fmresids.hrc"
+#include "fmservs.hxx"
#include "svx/dialmgr.hxx"
#include "svx/svdouno.hxx"
@@ -739,6 +740,75 @@ namespace svxform
}
}
+ //------------------------------------------------------------------------------
+ ::rtl::OUString FormControlFactory::getDefaultName( sal_Int16 _nClassId, const Reference< XServiceInfo >& _rxObject )
+ {
+ sal_uInt16 nResId(0);
+
+ switch ( _nClassId )
+ {
+ case FormComponentType::COMMANDBUTTON: nResId = RID_STR_PROPTITLE_PUSHBUTTON; break;
+ case FormComponentType::RADIOBUTTON: nResId = RID_STR_PROPTITLE_RADIOBUTTON; break;
+ case FormComponentType::CHECKBOX: nResId = RID_STR_PROPTITLE_CHECKBOX; break;
+ case FormComponentType::LISTBOX: nResId = RID_STR_PROPTITLE_LISTBOX; break;
+ case FormComponentType::COMBOBOX: nResId = RID_STR_PROPTITLE_COMBOBOX; break;
+ case FormComponentType::GROUPBOX: nResId = RID_STR_PROPTITLE_GROUPBOX; break;
+ case FormComponentType::IMAGEBUTTON: nResId = RID_STR_PROPTITLE_IMAGEBUTTON; break;
+ case FormComponentType::FIXEDTEXT: nResId = RID_STR_PROPTITLE_FIXEDTEXT; break;
+ case FormComponentType::GRIDCONTROL: nResId = RID_STR_PROPTITLE_DBGRID; break;
+ case FormComponentType::FILECONTROL: nResId = RID_STR_PROPTITLE_FILECONTROL; break;
+ case FormComponentType::DATEFIELD: nResId = RID_STR_PROPTITLE_DATEFIELD; break;
+ case FormComponentType::TIMEFIELD: nResId = RID_STR_PROPTITLE_TIMEFIELD; break;
+ case FormComponentType::NUMERICFIELD: nResId = RID_STR_PROPTITLE_NUMERICFIELD; break;
+ case FormComponentType::CURRENCYFIELD: nResId = RID_STR_PROPTITLE_CURRENCYFIELD; break;
+ case FormComponentType::PATTERNFIELD: nResId = RID_STR_PROPTITLE_PATTERNFIELD; break;
+ case FormComponentType::IMAGECONTROL: nResId = RID_STR_PROPTITLE_IMAGECONTROL; break;
+ case FormComponentType::HIDDENCONTROL: nResId = RID_STR_PROPTITLE_HIDDEN; break;
+ case FormComponentType::SCROLLBAR: nResId = RID_STR_PROPTITLE_SCROLLBAR; break;
+ case FormComponentType::SPINBUTTON: nResId = RID_STR_PROPTITLE_SPINBUTTON; break;
+ case FormComponentType::NAVIGATIONBAR: nResId = RID_STR_PROPTITLE_NAVBAR; break;
+
+ case FormComponentType::TEXTFIELD:
+ nResId = RID_STR_PROPTITLE_EDIT;
+ if ( _rxObject.is() && _rxObject->supportsService( FM_SUN_COMPONENT_FORMATTEDFIELD ) )
+ nResId = RID_STR_PROPTITLE_FORMATTED;
+ break;
+
+ default:
+ nResId = RID_STR_CONTROL; break;
+ }
+
+ return String( SVX_RES( nResId ) );
+ }
+
+ //------------------------------------------------------------------------------
+ ::rtl::OUString FormControlFactory::getDefaultUniqueName_ByComponentType( const Reference< XNameAccess >& _rxContainer,
+ const Reference< XPropertySet >& _rxObject )
+ {
+ sal_Int16 nClassId = FormComponentType::CONTROL;
+ OSL_VERIFY( _rxObject->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId );
+ ::rtl::OUString sBaseName = getDefaultName( nClassId, Reference< XServiceInfo >( _rxObject, UNO_QUERY ) );
+
+ return getUniqueName( _rxContainer, sBaseName );
+ }
+
+ //------------------------------------------------------------------------------
+ ::rtl::OUString FormControlFactory::getUniqueName( const Reference< XNameAccess >& _rxContainer, const ::rtl::OUString& _rBaseName )
+ {
+ sal_Int32 n = 0;
+ ::rtl::OUString sName;
+ do
+ {
+ ::rtl::OUStringBuffer aBuf( _rBaseName );
+ aBuf.appendAscii( " " );
+ aBuf.append( ++n );
+ sName = aBuf.makeStringAndClear();
+ }
+ while ( _rxContainer->hasByName( sName ) );
+
+ return sName;
+ }
+
//........................................................................
} // namespace svxform
//........................................................................
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index b57863ffd5ae..f90f0d8c2ce4 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1573,7 +1573,7 @@ namespace svxform
aBaseName = SVX_RES( RID_STR_STDFORMNAME );
else if( pEntryData->ISA(FmControlData) )
- aBaseName = SVX_RES( RID_STR_CONTROL_CLASSNAME );
+ aBaseName = SVX_RES( RID_STR_CONTROL );
//////////////////////////////////////////////////////////////////////
// Neuen Namen erstellen
diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx
index 6d7e6bde0259..285cb90320d2 100644
--- a/svx/source/inc/fmPropBrw.hxx
+++ b/svx/source/inc/fmPropBrw.hxx
@@ -57,6 +57,7 @@ class FmFormShell;
class FmPropBrw : public SfxFloatingWindow, public SfxControllerItem
{
sal_Bool m_bInitialStateChange;
+ bool m_bInStateChange;
::rtl::OUString m_sLastActivePage;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_xInspectorContext;
diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx
index 350fbedd709e..880ecb21d7e5 100644
--- a/svx/source/inc/fmpgeimp.hxx
+++ b/svx/source/inc/fmpgeimp.hxx
@@ -133,21 +133,8 @@ protected:
sal_Int32 nCommandType
);
- ::rtl::OUString getDefaultName(
- sal_Int16 _nClassId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _rxControls,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject
- ) const;
-
public:
-
- static UniString getDefaultName(
- sal_Int16 nClassId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject
- );
-
::rtl::OUString setUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xFormComponent, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xControls);
- ::rtl::OUString getUniqueName(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& xNamedSet) const;
void formObjectInserted( const FmFormObj& _object );
void formObjectRemoved( const FmFormObj& _object );
diff --git a/svx/source/inc/fmresids.hrc b/svx/source/inc/fmresids.hrc
index e9f39396cca6..95a478fc5aee 100644
--- a/svx/source/inc/fmresids.hrc
+++ b/svx/source/inc/fmresids.hrc
@@ -214,29 +214,29 @@
#define RID_STR_SVT_SQL_SYNTAX_COLUMN (RID_FORMS_START + 98)
#define RID_STR_PROPTITLE_SCROLLBAR (RID_FORMS_START + 99)
#define RID_STR_PROPTITLE_SPINBUTTON (RID_FORMS_START + 100)
-#define RID_STR_EDIT_CLASSNAME (RID_FORMS_START + 101)
-#define RID_STR_BUTTON_CLASSNAME (RID_FORMS_START + 102)
-#define RID_STR_FIXEDTEXT_CLASSNAME (RID_FORMS_START + 103)
-#define RID_STR_CHECKBOX_CLASSNAME (RID_FORMS_START + 104)
-#define RID_STR_RADIOBUTTON_CLASSNAME (RID_FORMS_START + 105)
-#define RID_STR_LISTBOX_CLASSNAME (RID_FORMS_START + 106)
-#define RID_STR_COMBOBOX_CLASSNAME (RID_FORMS_START + 107)
-#define RID_STR_FORMATTED_CLASSNAME (RID_FORMS_START + 108)
-#define RID_STR_GROUPBOX_CLASSNAME (RID_FORMS_START + 109)
-#define RID_STR_CONTROL_CLASSNAME (RID_FORMS_START + 110)
-#define RID_STR_IMAGE_CLASSNAME (RID_FORMS_START + 111)
-#define RID_STR_GRID_CLASSNAME (RID_FORMS_START + 112)
-#define RID_STR_FILECONTROL_CLASSNAME (RID_FORMS_START + 113)
-#define RID_STR_DATEFIELD_CLASSNAME (RID_FORMS_START + 114)
-#define RID_STR_TIMEFIELD_CLASSNAME (RID_FORMS_START + 115)
-#define RID_STR_NUMERICFIELD_CLASSNAME (RID_FORMS_START + 116)
-#define RID_STR_CURRENCYFIELD_CLASSNAME (RID_FORMS_START + 117)
-#define RID_STR_PATTERNFIELD_CLASSNAME (RID_FORMS_START + 118)
-#define RID_STR_IMAGECONTROL_CLASSNAME (RID_FORMS_START + 119)
-#define RID_STR_HIDDEN_CLASSNAME (RID_FORMS_START + 120)
-#define RID_STR_CLASSNAME_SCROLLBAR (RID_FORMS_START + 121)
-#define RID_STR_CLASSNAME_SPINBUTTON (RID_FORMS_START + 122)
-#define RID_STR_NAVBAR_CLASSNAME (RID_FORMS_START + 123)
+#define RID_STR_PROPTITLE_HIDDEN (RID_FORMS_START + 101)
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
#define RID_STR_DATANAVIGATOR (RID_FORMS_START + 124)
#define RID_STR_DATANAV_SUBM_PARENT (RID_FORMS_START + 125)
#define RID_STR_DATANAV_SUBM_ID (RID_FORMS_START + 126)
diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx
index 2868308d6f7c..432ad25bdea0 100644
--- a/svx/source/inc/formcontrolfactory.hxx
+++ b/svx/source/inc/formcontrolfactory.hxx
@@ -37,6 +37,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
/** === end UNO includes === **/
#include <memory>
@@ -94,6 +96,21 @@ namespace svxform
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats
);
+ static ::rtl::OUString getDefaultName(
+ const sal_Int16 nClassId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject
+ );
+
+ static ::rtl::OUString getDefaultUniqueName_ByComponentType(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject
+ );
+
+ static ::rtl::OUString getUniqueName(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
+ const ::rtl::OUString& _rBaseName
+ );
+
private:
::std::auto_ptr< FormControlFactory_Data > m_pData;
};
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 6a552da6edb7..cb747e3a894c 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -42,20 +42,24 @@
#include <com/sun/star/form/XBoundControl.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XListBox.hpp>
+#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/TextAlign.hpp>
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
+#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/form/XChangeBroadcaster.hpp>
/** === end UNO includes === **/
-#include <tools/rtti.hxx>
-
#include <comphelper/propmultiplex.hxx>
#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/component.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/rtti.hxx>
class DbCellControl;
class Edit;
@@ -282,7 +286,11 @@ public:
virtual ~DbCellControl();
- Window* GetControl() const { return m_pWindow; }
+ Window& GetWindow() const
+ {
+ ENSURE_OR_THROW( m_pWindow, "no window" );
+ return *m_pWindow;
+ }
// control alignment
inline sal_Bool isAlignedController() const { return m_bAlignedController; }
@@ -732,20 +740,34 @@ protected:
//==================================================================
// Base class providing the access to a grid cell
//==================================================================
-class FmXGridCell : public ::cppu::OComponentHelper,
- public ::com::sun::star::awt::XControl,
- public ::com::sun::star::form::XBoundControl
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XControl
+ , ::com::sun::star::form::XBoundControl
+ > FmXGridCell_Base;
+typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XWindow
+ > FmXGridCell_WindowBase;
+class FmXGridCell :public ::cppu::OComponentHelper
+ ,public FmXGridCell_Base
+ ,public FmXGridCell_WindowBase
{
protected:
- ::osl::Mutex m_aMutex;
- DbGridColumn* m_pColumn;
- DbCellControl* m_pCellControl;
+ ::osl::Mutex m_aMutex;
+ DbGridColumn* m_pColumn;
+ DbCellControl* m_pCellControl;
+
+private:
+ ::cppu::OInterfaceContainerHelper m_aWindowListeners;
+ ::cppu::OInterfaceContainerHelper m_aFocusListeners;
+ ::cppu::OInterfaceContainerHelper m_aKeyListeners;
+ ::cppu::OInterfaceContainerHelper m_aMouseListeners;
+ ::cppu::OInterfaceContainerHelper m_aMouseMotionListeners;
+protected:
virtual ~FmXGridCell();
+
public:
TYPEINFO();
- FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl);
-
+ FmXGridCell( DbGridColumn* pColumn, DbCellControl* pControl );
+ void init();
DECLARE_UNO3_AGG_DEFAULTS(FmXGridCell, OComponentHelper);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
@@ -754,6 +776,7 @@ public:
void SetTextLineColor(const Color& _rColor);
// XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
@@ -781,6 +804,25 @@ public:
virtual sal_Bool SAL_CALL getLock() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setLock(sal_Bool _bLock) throw(::com::sun::star::uno::RuntimeException);
+ // XWindow
+ virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setVisible( ::sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setEnable( ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFocus( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
sal_Bool Commit() {return m_pCellControl->Commit();}
void ImplInitWindow( Window& rParent, const InitWindowFacet _eInitWhat )
{ m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); }
@@ -788,6 +830,17 @@ public:
sal_Bool isAlignedController() const { return m_pCellControl->isAlignedController(); }
void AlignControl(sal_Int16 nAlignment)
{ m_pCellControl->AlignControl(nAlignment);}
+
+protected:
+ virtual Window* getEventWindow() const;
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+
+ // default implementations call our focus listeners, don't forget to call them if you override this
+ virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent );
+ virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent );
+
+private:
+ DECL_LINK( OnWindowEvent, VclWindowEvent* );
};
//==================================================================
@@ -795,7 +848,10 @@ class FmXDataCell : public FmXGridCell
{
public:
TYPEINFO();
- FmXDataCell(DbGridColumn* pColumn, DbCellControl* pControl):FmXGridCell(pColumn, pControl){}
+ FmXDataCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXGridCell( pColumn, &_rControl )
+ {
+ }
virtual void PaintFieldToCell(OutputDevice& rDev,
const Rectangle& rRect,
@@ -831,11 +887,7 @@ protected:
public:
TYPEINFO();
- FmXTextCell( DbGridColumn* pColumn, DbCellControl* pControl )
- :FmXDataCell( pColumn, pControl )
- ,m_bFastPaint( sal_True )
- {
- }
+ FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl );
virtual void PaintFieldToCell(OutputDevice& rDev,
const Rectangle& rRect,
@@ -849,23 +901,31 @@ public:
};
//==================================================================
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent
+ , ::com::sun::star::form::XChangeBroadcaster
+ > FmXEditCell_Base;
class FmXEditCell : public FmXTextCell,
- public ::com::sun::star::awt::XTextComponent
+ public FmXEditCell_Base
{
+private:
+ ::rtl::OUString m_sValueOnEnter;
+
protected:
::cppu::OInterfaceContainerHelper m_aTextListeners;
+ ::cppu::OInterfaceContainerHelper m_aChangeListeners;
::svt::IEditImplementation* m_pEditImplementation;
bool m_bOwnEditImplementation;
virtual ~FmXEditCell();
public:
- FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl);
+ FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl );
DECLARE_UNO3_AGG_DEFAULTS(FmXEditCell, FmXTextCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
// XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
virtual void SAL_CALL disposing();
@@ -884,26 +944,43 @@ public:
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException);
+ // XChangeBroadcaster
+ virtual void SAL_CALL addChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
- DECL_LINK( OnTextChanged, void* );
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+
+ virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent );
+ virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent );
+
+private:
+ void onTextChanged();
};
//==================================================================
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XCheckBox
+ , ::com::sun::star::awt::XButton
+ > FmXCheckBoxCell_Base;
class FmXCheckBoxCell : public FmXDataCell,
- public ::com::sun::star::awt::XCheckBox
+ public FmXCheckBoxCell_Base
{
::cppu::OInterfaceContainerHelper m_aItemListeners;
+ ::cppu::OInterfaceContainerHelper m_aActionListeners;
+ ::rtl::OUString m_aActionCommand;
CheckBox* m_pBox;
+
protected:
virtual ~FmXCheckBoxCell();
-public:
- FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+public:
+ FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
// UNO
DECLARE_UNO3_AGG_DEFAULTS(FmXCheckBoxCell, FmXDataCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
virtual void SAL_CALL disposing();
@@ -916,26 +993,37 @@ public:
virtual void SAL_CALL setLabel(const ::rtl::OUString& Label) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL enableTriState(sal_Bool b) throw(::com::sun::star::uno::RuntimeException);
+ // XButton
+ virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException);
+ //virtual void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
- DECL_LINK( OnClick, void* );
+ virtual Window* getEventWindow() const;
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
};
//==================================================================
-class FmXListBoxCell : public FmXTextCell,
- public ::com::sun::star::awt::XListBox
+typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XListBox
+ > FmXListBoxCell_Base;
+class FmXListBoxCell :public FmXTextCell
+ ,public FmXListBoxCell_Base
{
::cppu::OInterfaceContainerHelper m_aItemListeners,
m_aActionListeners;
ListBox* m_pBox;
+
protected:
virtual ~FmXListBoxCell();
-public:
- FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+public:
+ FmXListBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
virtual void SAL_CALL disposing();
@@ -965,14 +1053,60 @@ public:
virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) throw(::com::sun::star::uno::RuntimeException);
protected:
- DECL_LINK( OnSelect, VclWindowEvent* );
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+
DECL_LINK( OnDoubleClick, void* );
};
//==================================================================
+typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XComboBox
+ > FmXComboBoxCell_Base;
+class FmXComboBoxCell :public FmXTextCell
+ ,public FmXComboBoxCell_Base
+{
+private:
+ ::cppu::OInterfaceContainerHelper m_aItemListeners,
+ m_aActionListeners;
+ ComboBox* m_pComboBox;
+
+protected:
+ virtual ~FmXComboBoxCell();
+
+public:
+ FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
+
+ DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // XComboBox
+ virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItem( const ::rtl::OUString& _Item, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _Items, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getItemCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getItem( ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 _Lines ) throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+};
+
+//==================================================================
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent
+ , ::com::sun::star::lang::XUnoTunnel
+ > FmXFilterCell_Base;
class FmXFilterCell :public FmXGridCell
- ,public ::com::sun::star::awt::XTextComponent
- ,public ::com::sun::star::lang::XUnoTunnel
+ ,public FmXFilterCell_Base
{
::cppu::OInterfaceContainerHelper m_aTextListeners;
protected:
@@ -985,6 +1119,7 @@ public:
DECLARE_UNO3_AGG_DEFAULTS(FmXFilterCell, FmXGridCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 544546149645..0e751e3181e7 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -3780,6 +3780,10 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte
nColorCode &= 0x00ffffff;
sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 );
+
+ // sj: below change from 0x1b to 0x19 was done because of i84812 (0x02 -> rgb color),
+ // now I have some problems to fix i104685 (there the color value is 0x02000000 whichs requires
+ // a 0x2 scheme color to be displayed properly), the color docu seems to be incomplete
if( nUpper & 0x19 ) // if( nUpper & 0x1f )
{
if( ( nUpper & 0x08 ) || ( ( nUpper & 0x10 ) == 0 ) )
diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx
index 94d1ae4b4e70..35101eb2f418 100644
--- a/svx/source/svdraw/svdfppt.cxx
+++ b/svx/source/svdraw/svdfppt.cxx
@@ -120,6 +120,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <svx/writingmodeitem.hxx>
#include <vcl/print.hxx>
#include <svx/svxfont.hxx>
@@ -3819,21 +3820,20 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOfs, nBulletOfs, nDestinationInstance );
if ( nIsBullet )
- {
rNumberFormat.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
- UINT32 nFontHeight = 24;
- PPTPortionObj* pPtr = pParaObj->First();
- if ( pPtr )
- pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
+ UINT32 nFontHeight = 24;
+ PPTPortionObj* pPtr = pParaObj->First();
+ if ( pPtr )
+ pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
+ if ( nIsBullet )
nHardCount += ImplGetExtNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth,
pParaObj->mnInstance, nDestinationInstance, rStartNumbering, nFontHeight, pParaObj );
- if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP )
- pParaObj->UpdateBulletRelSize( nBulletHeight );
- if ( nHardCount )
- ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth );
- }
+ if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP )
+ pParaObj->UpdateBulletRelSize( nBulletHeight );
+ if ( nHardCount )
+ ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth );
if ( nHardCount )
{
@@ -3847,7 +3847,6 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
case SVX_NUM_CHARS_UPPER_LETTER_N :
case SVX_NUM_CHARS_LOWER_LETTER_N :
{
- PPTPortionObj* pPtr = pParaObj->First();
if ( pPtr )
{
sal_uInt32 nFont;
@@ -5566,11 +5565,6 @@ BOOL PPTPortionObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestinat
if ( nRetValue != nTmp )
bIsHardAttribute = 1;
}
- if ( nRetValue && ( nDestinationInstance == TSS_TYPE_TEXT_IN_SHAPE ) )
- {
- nRetValue = 0; // no inheritance for standard textobjects
- bIsHardAttribute = 1; // this attribute must be hard formatted
- }
}
break;
case PPT_CharAttr_Font :
@@ -6215,10 +6209,10 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
if ( pRule )
{
pRule->SetLevel( pParaSet->mnDepth, aNumberFormat );
- if ( nDestinationInstance == 0xffffffff )
+ sal_uInt16 i, n;
+ for ( i = 0; i < pRule->GetLevelCount(); i++ )
{
- sal_uInt16 i, n;
- for ( i = 0; i < pRule->GetLevelCount(); i++ )
+ if ( i != pParaSet->mnDepth )
{
n = i > 4 ? 4 : i;
@@ -7429,6 +7423,15 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
xPropSet->setPropertyValue( sLeftBorder, Any( nLeftDist ) );
xPropSet->setPropertyValue( sBottomBorder, Any( nLowerDist ) );
+ static const rtl::OUString sTextVerticalAdjust( RTL_CONSTASCII_USTRINGPARAM( "TextVerticalAdjust" ) );
+ const SdrTextVertAdjust eTextVertAdjust(((const SdrTextVertAdjustItem&)pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue());
+ drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
+ if ( eTextVertAdjust == SDRTEXTVERTADJUST_CENTER )
+ eVA = drawing::TextVerticalAdjust_CENTER;
+ else if ( eTextVertAdjust == SDRTEXTVERTADJUST_BOTTOM )
+ eVA = drawing::TextVerticalAdjust_BOTTOM;
+ xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) );
+
SfxItemSet aSet( pObj->GetMergedItemSet() );
XFillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE );
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 8c30bfb88018..a2b6991773e1 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1867,6 +1867,14 @@ void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
SdrRectObj::NbcSetSnapRect(rRect);
if( pModel && !pModel->isLocked() )
ImpSetVisAreaSize();
+
+ if ( xObjRef.is() && IsChart() )
+ {
+ //#i103460# charts do not necessaryly have an own size within ODF files,
+ //for this case they need to use the size settings from the surrounding frame,
+ //which is made available with this method as there is no other way
+ xObjRef.SetDefaultSizeForChart( Size( rRect.GetWidth(), rRect.GetHeight() ) );
+ }
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index e6f7221623fd..ab9eb5aeb36d 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -326,11 +326,29 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
}
else
{
- sal_Int32 nPathStart = 0;
- if( 0 == aURLNoPar.compareToAscii( "./", 2 ) )
- nPathStart = 2;
- if( _nPos >= nPathStart )
- rContainerStorageName = aURLNoPar.copy( nPathStart, _nPos-nPathStart);
+ //eliminate 'superfluous' slashes at start and end
+ //#i103076# load objects with all allowed xlink:href syntaxes
+ {
+ //eliminate './' at start
+ sal_Int32 nStart = 0;
+ sal_Int32 nCount = aURLNoPar.getLength();
+ if( 0 == aURLNoPar.compareToAscii( "./", 2 ) )
+ {
+ nStart = 2;
+ nCount -= 2;
+ }
+
+ //eliminate '/' at end
+ sal_Int32 nEnd = aURLNoPar.lastIndexOf( '/' );
+ if( nEnd == aURLNoPar.getLength()-1 && nEnd != (nStart-1) )
+ nCount--;
+
+ aURLNoPar = aURLNoPar.copy( nStart, nCount );
+ }
+
+ _nPos = aURLNoPar.lastIndexOf( '/' );
+ if( _nPos >= 0 )
+ rContainerStorageName = aURLNoPar.copy( 0, _nPos );
rObjectStorageName = aURLNoPar.copy( _nPos+1 );
}
}
diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk
index 898629299e65..3dcf5ca250f3 100644
--- a/svx/util/makefile.mk
+++ b/svx/util/makefile.mk
@@ -163,7 +163,7 @@ SHL1STDLIBS= \
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME= $(SHL1TARGET)
-DEFLIB1NAME=$(TARGET)_5
+DEFLIB1NAME=$(TARGET)_5 $(TARGET)_6
# svx
SHL2TARGET= svx$(DLLPOSTFIX)
@@ -280,7 +280,7 @@ SHL4STDLIBS= \
SHL4DEF= $(MISC)$/$(SHL4TARGET).def
DEF4NAME= $(SHL4TARGET)
-DEFLIB4NAME=$(TARGET)_6
+DEFLIB4NAME=$(TARGET)_7
# ------------------------------------------------------------------------------
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 62de20f87a74..e4c33a274b17 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -438,10 +438,12 @@ public:
star::uno::Reference< star::task::XInteractionRequest > const &
rRequest)
: osl::Condition(),
- m_rRequest(rRequest)
+ m_rRequest(rRequest),
+ bHandled( false )
{
}
star::uno::Reference< star::task::XInteractionRequest > m_rRequest;
+ bool bHandled;
star::beans::Optional< rtl::OUString > m_aResult;
};
@@ -450,13 +452,13 @@ long UUIInteractionHelper::handlerequest(
{
HandleData* pHND = (HandleData*) pHandleData;
UUIInteractionHelper* pUUI = (UUIInteractionHelper*) pInteractionHelper;
- pUUI->handle_impl(pHND->m_rRequest);
+ pHND->bHandled = pUUI->handle_impl(pHND->m_rRequest);
pHND->set();
return 0;
}
-void
+bool
UUIInteractionHelper::handleRequest(
star::uno::Reference< star::task::XInteractionRequest > const & rRequest)
throw (star::uno::RuntimeException)
@@ -477,9 +479,10 @@ UUIInteractionHelper::handleRequest(
ULONG locks = Application::ReleaseSolarMutex();
aHD.wait();
Application::AcquireSolarMutex(locks);
+ return aHD.bHandled;
}
else
- handle_impl(rRequest);
+ return handle_impl(rRequest);
}
long UUIInteractionHelper::getstringfromrequest(
@@ -1282,7 +1285,7 @@ bool UUIInteractionHelper::handleErrorHandlerRequests(
return false;
}
-void
+bool
UUIInteractionHelper::handle_impl(
star::uno::Reference< star::task::XInteractionRequest > const & rRequest)
throw (star::uno::RuntimeException)
@@ -1290,7 +1293,7 @@ UUIInteractionHelper::handle_impl(
try
{
if (!rRequest.is())
- return;
+ return false;
////////////////////////////////////////////////////////////
// Display Messagebox
@@ -1329,8 +1332,9 @@ UUIInteractionHelper::handle_impl(
OSL_ENSURE( xInteractionHandler.is(), "Custom Interactionhandler does not implement mandatory interface XInteractionHandler2!" );
if (xInteractionHandler.is())
if (xInteractionHandler->handleInteractionRequest(rRequest))
- break;
+ return true;
}
+ return false;
}
}
}
@@ -1341,6 +1345,7 @@ UUIInteractionHelper::handle_impl(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
star::uno::Reference< star::uno::XInterface >());
}
+ return true;
}
void UUIInteractionHelper::GetInteractionHandlerList(InteractionHandlerDataList &rdataList)
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 4053f919bf7b..e8ae3fec2df5 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -136,7 +136,7 @@ public:
~UUIInteractionHelper() SAL_THROW(());
- void
+ bool
handleRequest(com::sun::star::uno::Reference<
com::sun::star::task::XInteractionRequest > const &
rRequest)
@@ -149,7 +149,7 @@ public:
throw (com::sun::star::uno::RuntimeException);
private:
- void
+ bool
handle_impl(com::sun::star::uno::Reference<
com::sun::star::task::XInteractionRequest > const &
rRequest)
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx
index 78336ac8be13..87b510964d8e 100644
--- a/uui/source/interactionhandler.cxx
+++ b/uui/source/interactionhandler.cxx
@@ -31,10 +31,10 @@
#include "iahndl.hxx"
#include "interactionhandler.hxx"
-using namespace com::sun;
+using namespace com::sun::star;
UUIInteractionHandler::UUIInteractionHandler(
- star::uno::Reference< star::lang::XMultiServiceFactory > const &
+ uno::Reference< lang::XMultiServiceFactory > const &
rServiceFactory)
SAL_THROW(())
: m_xServiceFactory(rServiceFactory),
@@ -48,16 +48,16 @@ UUIInteractionHandler::~UUIInteractionHandler()
}
rtl::OUString SAL_CALL UUIInteractionHandler::getImplementationName()
- throw (star::uno::RuntimeException)
+ throw (uno::RuntimeException)
{
return rtl::OUString::createFromAscii(m_aImplementationName);
}
sal_Bool SAL_CALL
UUIInteractionHandler::supportsService(rtl::OUString const & rServiceName)
- throw (star::uno::RuntimeException)
+ throw (uno::RuntimeException)
{
- star::uno::Sequence< rtl::OUString >
+ uno::Sequence< rtl::OUString >
aNames(getSupportedServiceNames_static());
for (sal_Int32 i = 0; i < aNames.getLength(); ++i)
if (aNames[i] == rServiceName)
@@ -65,17 +65,17 @@ UUIInteractionHandler::supportsService(rtl::OUString const & rServiceName)
return false;
}
-star::uno::Sequence< rtl::OUString > SAL_CALL
+uno::Sequence< rtl::OUString > SAL_CALL
UUIInteractionHandler::getSupportedServiceNames()
- throw (star::uno::RuntimeException)
+ throw (uno::RuntimeException)
{
return getSupportedServiceNames_static();
}
void SAL_CALL
UUIInteractionHandler::initialize(
- star::uno::Sequence< star::uno::Any > const & rArguments)
- throw (star::uno::Exception)
+ uno::Sequence< uno::Any > const & rArguments)
+ throw (uno::Exception)
{
delete m_pImpl;
m_pImpl = new UUIInteractionHelper(m_xServiceFactory, rArguments);
@@ -83,26 +83,40 @@ UUIInteractionHandler::initialize(
void SAL_CALL
UUIInteractionHandler::handle(
- star::uno::Reference< star::task::XInteractionRequest > const & rRequest)
- throw (star::uno::RuntimeException)
+ uno::Reference< task::XInteractionRequest > const & rRequest)
+ throw (uno::RuntimeException)
{
try
{
m_pImpl->handleRequest(rRequest);
}
- catch (star::uno::RuntimeException const & ex)
+ catch (uno::RuntimeException const & ex)
{
- throw star::uno::RuntimeException(ex.Message, *this);
+ throw uno::RuntimeException(ex.Message, *this);
}
}
+::sal_Bool SAL_CALL UUIInteractionHandler::handleInteractionRequest(
+ const uno::Reference< task::XInteractionRequest >& _Request ) throw ( uno::RuntimeException )
+{
+ try
+ {
+ return m_pImpl->handleRequest( _Request );
+ }
+ catch (uno::RuntimeException const & ex)
+ {
+ throw uno::RuntimeException( ex.Message, *this );
+ }
+ return sal_False;
+}
+
char const UUIInteractionHandler::m_aImplementationName[]
= "com.sun.star.comp.uui.UUIInteractionHandler";
-star::uno::Sequence< rtl::OUString >
+uno::Sequence< rtl::OUString >
UUIInteractionHandler::getSupportedServiceNames_static()
{
- star::uno::Sequence< rtl::OUString > aNames(3);
+ uno::Sequence< rtl::OUString > aNames(3);
aNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.task.InteractionHandler"));
// added to indicate support for configuration.backend.MergeRecoveryRequest
@@ -114,11 +128,11 @@ UUIInteractionHandler::getSupportedServiceNames_static()
return aNames;
}
-star::uno::Reference< star::uno::XInterface > SAL_CALL
+uno::Reference< uno::XInterface > SAL_CALL
UUIInteractionHandler::createInstance(
- star::uno::Reference< star::lang::XMultiServiceFactory > const &
+ uno::Reference< lang::XMultiServiceFactory > const &
rServiceFactory)
- SAL_THROW((star::uno::Exception))
+ SAL_THROW((uno::Exception))
{
try
{
@@ -126,7 +140,7 @@ UUIInteractionHandler::createInstance(
}
catch (std::bad_alloc const &)
{
- throw star::uno::RuntimeException(
+ throw uno::RuntimeException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
0);
}
diff --git a/uui/source/interactionhandler.hxx b/uui/source/interactionhandler.hxx
index 954271dd724e..5f3216f5d20b 100644
--- a/uui/source/interactionhandler.hxx
+++ b/uui/source/interactionhandler.hxx
@@ -33,7 +33,7 @@
#include "com/sun/star/lang/XInitialization.hpp"
#include "com/sun/star/lang/XServiceInfo.hpp"
-#include "com/sun/star/task/XInteractionHandler.hpp"
+#include "com/sun/star/task/XInteractionHandler2.hpp"
#include "cppuhelper/implbase3.hxx"
class UUIInteractionHelper;
@@ -41,7 +41,7 @@ class UUIInteractionHelper;
class UUIInteractionHandler:
public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo,
com::sun::star::lang::XInitialization,
- com::sun::star::task::XInteractionHandler >
+ com::sun::star::task::XInteractionHandler2 >
{
public:
static char const m_aImplementationName[];
@@ -95,6 +95,10 @@ private:
rRequest)
throw (com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL
+ handleInteractionRequest(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& _Request
+ ) throw ( ::com::sun::star::uno::RuntimeException );
};
#endif // UUI_INTERACTIONHANDLER_HXX
diff --git a/xmlhelp/source/com/sun/star/help/HelpLinker.cxx b/xmlhelp/source/com/sun/star/help/HelpLinker.cxx
index 67049df439e1..8acb129b21fb 100644
--- a/xmlhelp/source/com/sun/star/help/HelpLinker.cxx
+++ b/xmlhelp/source/com/sun/star/help/HelpLinker.cxx
@@ -476,8 +476,10 @@ void HelpLinker::link() throw( HelpProcessingException )
if( !bExtensionMode )
{
+#ifndef OS2 // YD @TODO@ crashes libc runtime :-(
std::cout << "Making " << outputFile.native_file_string() <<
" from " << helpFiles.size() << " input files" << std::endl;
+#endif
}
// here we start our loop over the hzip files.
@@ -1014,7 +1016,9 @@ int main(int argc, char**argv)
exit(1);
}
sal_uInt32 endtime = osl_getGlobalTimer();
+#ifndef OS2 // YD @TODO@ crashes libc runtime :-(
std::cout << "time taken was " << (endtime-starttime)/1000.0 << " seconds" << std::endl;
+#endif
return 0;
}
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 15062560da24..a06bbeab8326 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -191,7 +191,7 @@ public:
/// to be called for every field during style export.
void ExportFieldAutoStyle(const ::com::sun::star::uno::Reference <
::com::sun::star::text::XTextField > & rTextField,
- sal_Bool bProgress );
+ const sal_Bool bProgress, const sal_Bool bRecursive );
/// export field declarations.
/// to be called once at beginning of document body.
diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx
index a7c7df50ee64..5bb042c5c0ce 100644
--- a/xmloff/inc/xmloff/txtparae.hxx
+++ b/xmloff/inc/xmloff/txtparae.hxx
@@ -69,6 +69,7 @@ namespace com { namespace sun { namespace star
namespace container { class XEnumerationAccess; class XEnumeration; class XIndexAccess; }
namespace text { class XTextContent; class XTextRange; class XText;
class XFootnote; class XTextFrame; class XTextSection;
+ class XTextField;
class XDocumentIndex; class XTextShapesSupplier; }
} } }
@@ -330,6 +331,12 @@ protected:
::com::sun::star::text::XTextRange > & rTextRange,
sal_Bool bAutoStyles, sal_Bool bProgress );
+ void exportTextField(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField> & xTextField,
+ const sal_Bool bAutoStyles, const sal_Bool bProgress,
+ const sal_Bool bRecursive );
+
void exportAnyTextFrame(
const ::com::sun::star::uno::Reference <
::com::sun::star::text::XTextContent > & rTextContent,
@@ -490,7 +497,7 @@ protected:
/// export a text:meta
void exportMeta(
const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & i_xMeta,
+ ::com::sun::star::beans::XPropertySet> & i_xPortion,
sal_Bool i_bAutoStyles, sal_Bool i_isProgress );
public:
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index 66abd40a44f4..978f6e698cc8 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -3075,6 +3075,7 @@ namespace xmloff { namespace token {
XML_AT_AXIS,
XML_AT_LABELS_AND_AXIS,
XML_FILLED_RADAR,
+ XML_SURFACE,
// MathML only
XML_MATHVARIANT,
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index d103876b9350..1f854469b4be 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -318,7 +318,12 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
// parse attributes
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetChartAttrTokenMap();
- awt::Size aChartSize;
+
+ uno::Reference< embed::XVisualObject > xVisualObject( mrImportHelper.GetChartDocument(), uno::UNO_QUERY);
+ DBG_ASSERT(xVisualObject.is(),"need xVisualObject for page size");
+ if( xVisualObject.is() )
+ maChartSize = xVisualObject->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); //#i103460# take the size given from the parent frame as default
+
// this flag is necessarry for pie charts in the core
sal_Bool bSetSwitchData = sal_False;
@@ -377,11 +382,11 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
break;
case XML_TOK_CHART_WIDTH:
- GetImport().GetMM100UnitConverter().convertMeasure( aChartSize.Width, aValue );
+ GetImport().GetMM100UnitConverter().convertMeasure( maChartSize.Width, aValue );
break;
case XML_TOK_CHART_HEIGHT:
- GetImport().GetMM100UnitConverter().convertMeasure( aChartSize.Height, aValue );
+ GetImport().GetMM100UnitConverter().convertMeasure( maChartSize.Height, aValue );
break;
case XML_TOK_CHART_STYLE_NAME:
@@ -406,7 +411,11 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
maChartTypeServiceName = SchXMLTools::GetChartTypeByClassName( aChartClass_Bar, false /* bUseOldNames */ );
}
- InitChart (aChartSize, aOldChartTypeName, bSetSwitchData);
+ // Set the size of the draw page.
+ if( xVisualObject.is() )
+ xVisualObject->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, maChartSize );
+
+ InitChart( aOldChartTypeName, bSetSwitchData);
if( bHasAddin )
{
@@ -1198,11 +1207,9 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext(
4. Set the chart type.
*/
void SchXMLChartContext::InitChart(
- awt::Size aChartSize,
const OUString & rChartTypeServiceName, // currently the old service name
sal_Bool /* bSetSwitchData */ )
{
- maChartSize = aChartSize;
uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument();
DBG_ASSERT( xDoc.is(), "No valid document!" );
uno::Reference< frame::XModel > xModel (xDoc, uno::UNO_QUERY );
@@ -1217,12 +1224,6 @@ void SchXMLChartContext::InitChart(
xTitled->setTitleObject( 0 );
}
- // Set the size of the draw page.
- uno::Reference< embed::XVisualObject > xVisualObject(xModel,uno::UNO_QUERY);
- DBG_ASSERT(xVisualObject.is(),"need xVisualObject for page size");
- if( xVisualObject.is() )
- xVisualObject->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, aChartSize );
-
// Set the chart type via setting the diagram.
if( rChartTypeServiceName.getLength() &&
xDoc.is())
diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx
index c02f623ebe10..e14f09f965ca 100644
--- a/xmloff/source/chart/SchXMLChartContext.hxx
+++ b/xmloff/source/chart/SchXMLChartContext.hxx
@@ -138,15 +138,12 @@ private:
::com::sun::star::awt::Size maChartSize;
/** @descr This method bundles some settings to the chart model and executes them with
- a locked controller. This includes setting the draw page size and setting
- the chart type.
- @param aChartSize The size the draw page will be set to.
+ a locked controller. This includes setting the chart type.
@param aServiceName The name of the service the diagram is initialized with.
@param bSetWitchData Indicates wether the data set takes it's data series from
rows or from columns.
*/
- void InitChart (com::sun::star::awt::Size aChartSize,
- const ::rtl::OUString & rChartTypeServiceName,
+ void InitChart (const ::rtl::OUString & rChartTypeServiceName,
sal_Bool bSetSwitchData);
void MergeSeriesForStockChart();
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 3290cb31db96..f7cf82abe974 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -93,6 +93,7 @@
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
@@ -1123,6 +1124,12 @@ void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rCha
OUString aDataProviderURL( RTL_CONSTASCII_USTRINGPARAM( ".." ) );
if( xNewDoc->hasInternalDataProvider() )
aDataProviderURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) );
+ else //special handling for data base data provider necessary
+ {
+ Reference< chart2::data::XDatabaseDataProvider > xDBDataProvider( xNewDoc->getDataProvider(), uno::UNO_QUERY );
+ if( xDBDataProvider.is() )
+ aDataProviderURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) );
+ }
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aDataProviderURL );
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index a1700c65d316..ebc48c0d24c0 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -173,6 +173,7 @@ static __FAR_DATA SvXMLEnumMapEntry aXMLChartClassMap[] =
{ XML_BAR, XML_CHART_CLASS_BAR },
{ XML_STOCK, XML_CHART_CLASS_STOCK },
{ XML_BUBBLE, XML_CHART_CLASS_BUBBLE },
+ { XML_SURFACE, XML_CHART_CLASS_BAR }, //@todo change this if a surface chart is available
{ XML_ADD_IN, XML_CHART_CLASS_ADDIN },
{ XML_TOKEN_INVALID, XML_CHART_CLASS_UNKNOWN }
};
@@ -293,6 +294,14 @@ OUString GetChartTypeByClassName(
else
aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("CandleStick"));
}
+ else if( IsXMLToken( rClassName, XML_SURFACE ))
+ {
+ //@todo change this if a surface chart is available
+ if( bUseOldNames )
+ aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Bar"));
+ else
+ aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Column"));
+ }
else
bInternalType = false;
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 28c970a94066..975cb5432eb7 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1894,6 +1894,7 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc,
}
}
} catch (uno::Exception &) {
+ OSL_ENSURE(false, "SvXMLImport::SetXmlId: exception?");
}
}
}
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 35b0cc1ec741..d4f60e053b3c 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3077,6 +3077,7 @@ namespace xmloff { namespace token {
TOKEN( "at-axis", XML_AT_AXIS ),
TOKEN( "at-labels-and-axis", XML_AT_LABELS_AND_AXIS ),
TOKEN( "filled-radar", XML_FILLED_RADAR ),
+ TOKEN( "surface", XML_SURFACE ),
TOKEN( "mathvariant", XML_MATHVARIANT ),
TOKEN( "mathsize", XML_MATHSIZE ),
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index 0961175e28b8..fc3f199f9c50 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -201,7 +201,7 @@ sal_Bool XMLGradientStyleImport::importXML(
case XML_TOK_GRADIENT_ANGLE:
{
sal_Int32 nValue;
- SvXMLUnitConverter::convertNumber( nValue, rStrValue, 0, 360 );
+ SvXMLUnitConverter::convertNumber( nValue, rStrValue, 0, 3600 );
aGradient.Angle = sal_Int16( nValue );
}
break;
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index ee8719c133f7..ac40a6ee4c10 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -159,7 +159,7 @@ sal_Bool XMLHatchStyleImport::importXML(
case XML_TOK_HATCH_ROTATION:
{
sal_Int32 nValue;
- rUnitConverter.convertNumber( nValue, rStrValue, 0, 360 );
+ rUnitConverter.convertNumber( nValue, rStrValue, 0, 3600 );
aHatch.Angle = sal_Int16( nValue );
}
break;
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
index e98aeb2599ff..297440bcc5eb 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -194,7 +194,7 @@ sal_Bool XMLTransGradientStyleImport::importXML(
case XML_TOK_GRADIENT_ANGLE:
{
sal_Int32 nValue;
- SvXMLUnitConverter::convertNumber( nValue, rStrValue, 0, 360 );
+ SvXMLUnitConverter::convertNumber( nValue, rStrValue, 0, 3600 );
aGradient.Angle = sal_Int16( nValue );
}
break;
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 1091636c9d3f..5e6f47ed5b6a 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/rdf/XMetadatable.hpp>
#include <com/sun/star/text/XFormField.hpp>
@@ -111,9 +112,10 @@ XMLTextMarkImportContext::XMLTextMarkImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp,
sal_uInt16 nPrefix,
- const OUString& rLocalName ) :
- SvXMLImportContext(rImport, nPrefix, rLocalName),
- rHelper(rHlp)
+ const OUString& rLocalName )
+ : SvXMLImportContext(rImport, nPrefix, rLocalName)
+ , m_rHelper(rHlp)
+ , m_bHaveAbout(false)
{
}
@@ -139,19 +141,24 @@ static SvXMLEnumMapEntry __READONLY_DATA lcl_aMarkTypeMap[] =
void XMLTextMarkImportContext::StartElement(
const Reference<XAttributeList> & xAttrList)
{
- if (!FindName(GetImport(), xAttrList, sBookmarkName, m_XmlId, &sFieldName))
- sBookmarkName=OUString();
+ if (!FindName(GetImport(), xAttrList))
+ {
+ m_sBookmarkName = OUString();
+ }
if (IsXMLToken(GetLocalName(), XML_FIELDMARK_END))
- sBookmarkName=rHelper.FindActiveBookmarkName();
+ {
+ m_sBookmarkName = m_rHelper.FindActiveBookmarkName();
+ }
if (IsXMLToken(GetLocalName(), XML_FIELDMARK_START) || IsXMLToken(GetLocalName(), XML_FIELDMARK))
{
- if (sBookmarkName.getLength()==0)
- sBookmarkName=::rtl::OUString::createFromAscii("Unknown");
- rHelper.pushFieldCtx( sBookmarkName, sFieldName );
+ if (m_sBookmarkName.getLength() == 0)
+ {
+ m_sBookmarkName = ::rtl::OUString::createFromAscii("Unknown");
+ }
+ m_rHelper.pushFieldCtx( m_sBookmarkName, m_sFieldName );
}
-
}
void XMLTextMarkImportContext::EndElement()
@@ -167,7 +174,7 @@ void XMLTextMarkImportContext::EndElement()
const OUString sAPI_formfieldmark(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.FormFieldmark"));
- if (sBookmarkName.getLength()>0)
+ if (m_sBookmarkName.getLength() > 0)
{
sal_uInt16 nTmp;
if (SvXMLUnitConverter::convertEnum(nTmp, GetLocalName(),
@@ -178,34 +185,42 @@ void XMLTextMarkImportContext::EndElement()
case TypeReference:
// export point reference mark
CreateAndInsertMark(GetImport(),
- sAPI_reference_mark,
- sBookmarkName,
- rHelper.GetCursorAsRange()->getStart(),
- ::rtl::OUString());
+ sAPI_reference_mark,
+ m_sBookmarkName,
+ m_rHelper.GetCursorAsRange()->getStart(),
+ ::rtl::OUString());
break;
case TypeFieldmark:
case TypeBookmark:
{
- bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmark && sFieldName.compareToAscii("msoffice.field.FORMCHECKBOX")==0); // for now only import FORMCHECKBOX boxes
+ bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmark && m_sFieldName.compareToAscii("msoffice.field.FORMCHECKBOX")==0); // for now only import FORMCHECKBOX boxes
// export point bookmark
- Reference<XInterface> xIfc=CreateAndInsertMark(GetImport(),
+ const Reference<XInterface> xContent(
+ CreateAndInsertMark(GetImport(),
(bImportAsField?sAPI_formfieldmark:sAPI_bookmark),
- sBookmarkName,
- rHelper.GetCursorAsRange()->getStart(),
- m_XmlId);
+ m_sBookmarkName,
+ m_rHelper.GetCursorAsRange()->getStart(),
+ m_sXmlId) );
+ if (m_bHaveAbout)
+ {
+ const Reference<com::sun::star::rdf::XMetadatable>
+ xMeta( xContent, UNO_QUERY);
+ GetImport().AddRDFa(xMeta,
+ m_sAbout, m_sProperty, m_sContent, m_sDatatype);
+ }
if ((lcl_MarkType)nTmp==TypeFieldmark) {
- if (xIfc.is() && bImportAsField) {
+ if (xContent.is() && bImportAsField) {
// setup fieldmark...
- Reference< ::com::sun::star::text::XFormField> xFormField(xIfc, UNO_QUERY);
+ Reference< ::com::sun::star::text::XFormField> xFormField(xContent, UNO_QUERY);
xFormField->setType(1); // Checkbox...
- if (xFormField.is() && rHelper.hasCurrentFieldCtx()) {
+ if (xFormField.is() && m_rHelper.hasCurrentFieldCtx()) {
// xFormField->setDescription(::rtl::OUString::createFromAscii("HELLO CHECKBOX"));
// xFormField->setRes(1);
- rHelper.setCurrentFieldParamsTo(xFormField);
+ m_rHelper.setCurrentFieldParamsTo(xFormField);
}
}
- rHelper.popFieldCtx();
+ m_rHelper.popFieldCtx();
}
}
break;
@@ -213,9 +228,9 @@ void XMLTextMarkImportContext::EndElement()
case TypeFieldmarkStart:
case TypeBookmarkStart:
// save XTextRange for later construction of bookmark
- rHelper.InsertBookmarkStartRange(
- sBookmarkName, rHelper.GetCursorAsRange()->getStart(),
- m_XmlId);
+ m_rHelper.InsertBookmarkStartRange(
+ m_sBookmarkName, m_rHelper.GetCursorAsRange()->getStart(),
+ m_sXmlId);
break;
case TypeFieldmarkEnd:
@@ -223,18 +238,18 @@ void XMLTextMarkImportContext::EndElement()
{
// get old range, and construct
Reference<XTextRange> xStartRange;
- if (rHelper.FindAndRemoveBookmarkStartRange(sBookmarkName,
- xStartRange, m_XmlId))
+ if (m_rHelper.FindAndRemoveBookmarkStartRange(m_sBookmarkName,
+ xStartRange, m_sXmlId))
{
Reference<XTextRange> xEndRange(
- rHelper.GetCursorAsRange()->getStart());
+ m_rHelper.GetCursorAsRange()->getStart());
// check if beginning and end are in same XText
if (xStartRange->getText() == xEndRange->getText())
{
// create range for insertion
Reference<XTextCursor> xInsertionCursor =
- rHelper.GetText()->createTextCursorByRange(
+ m_rHelper.GetText()->createTextCursorByRange(
xEndRange);
xInsertionCursor->gotoRange(xStartRange, sal_True);
@@ -247,30 +262,39 @@ void XMLTextMarkImportContext::EndElement()
Reference<XTextRange> xInsertionRange(
xInsertionCursor, UNO_QUERY);
- bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmarkEnd && rHelper.hasCurrentFieldCtx());
+ bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmarkEnd && m_rHelper.hasCurrentFieldCtx());
if (bImportAsField) {
- ::rtl::OUString currentFieldType=rHelper.getCurrentFieldType();
+ ::rtl::OUString currentFieldType =
+ m_rHelper.getCurrentFieldType();
bImportAsField=currentFieldType.compareToAscii("msoffice.field.FORMTEXT")==0; // for now only import FORMTEXT boxes
}
// insert reference
- Reference<XInterface> xIfc=CreateAndInsertMark(GetImport(),
+ const Reference<XInterface> xContent(
+ CreateAndInsertMark(GetImport(),
(bImportAsField?sAPI_fieldmark:sAPI_bookmark),
- sBookmarkName,
- xInsertionRange,
- m_XmlId);
+ m_sBookmarkName,
+ xInsertionRange,
+ m_sXmlId) );
+ if (m_bHaveAbout)
+ {
+ const Reference<com::sun::star::rdf::XMetadatable>
+ xMeta( xContent, UNO_QUERY);
+ GetImport().AddRDFa(xMeta,
+ m_sAbout, m_sProperty, m_sContent, m_sDatatype);
+ }
if ((lcl_MarkType)nTmp==TypeFieldmarkEnd) {
- if (xIfc.is() && bImportAsField) {
+ if (xContent.is() && bImportAsField) {
// setup fieldmark...
- Reference< ::com::sun::star::text::XFormField> xFormField(xIfc, UNO_QUERY);
+ Reference< ::com::sun::star::text::XFormField> xFormField(xContent, UNO_QUERY);
xFormField->setType(0); // Text
- if (xFormField.is() && rHelper.hasCurrentFieldCtx()) {
- rHelper.setCurrentFieldParamsTo(xFormField);
+ if (xFormField.is() && m_rHelper.hasCurrentFieldCtx()) {
+ m_rHelper.setCurrentFieldParamsTo(xFormField);
// xFormField->setDescription(::rtl::OUString::createFromAscii("HELLO"));
}
}
- rHelper.popFieldCtx();
+ m_rHelper.popFieldCtx();
}
}
// else: beginning/end in different XText -> ignore!
@@ -296,11 +320,12 @@ SvXMLImportContext *XMLTextMarkImportContext::CreateChildContext( USHORT nPrefix
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& )
{
- return new XMLFieldParamImportContext(GetImport(), rHelper, nPrefix, rLocalName);
+ return new XMLFieldParamImportContext(GetImport(), m_rHelper,
+ nPrefix, rLocalName);
}
-Reference<XInterface> XMLTextMarkImportContext::CreateAndInsertMark(
+Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark(
SvXMLImport& rImport,
const OUString& sServiceName,
const OUString& sMarkName,
@@ -337,9 +362,6 @@ Reference<XInterface> XMLTextMarkImportContext::CreateAndInsertMark(
}
}
- // xml:id for RDF metadata
- rImport.SetXmlId(xIfc, i_rXmlId);
-
// cast to XTextContent and attach to document
const Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);
if (xTextContent.is())
@@ -350,6 +372,11 @@ Reference<XInterface> XMLTextMarkImportContext::CreateAndInsertMark(
// collapsing of the given XTextRange.
rImport.GetTextImport()->GetText()->insertTextContent(rRange,
xTextContent, sal_True);
+
+ // xml:id for RDF metadata -- after insertion!
+ rImport.SetXmlId(xIfc, i_rXmlId);
+
+ return xTextContent;
}
catch (com::sun::star::lang::IllegalArgumentException &)
{
@@ -358,44 +385,60 @@ Reference<XInterface> XMLTextMarkImportContext::CreateAndInsertMark(
}
}
}
- return xIfc;
+ return 0;
}
sal_Bool XMLTextMarkImportContext::FindName(
SvXMLImport& rImport,
- const Reference<XAttributeList> & xAttrList,
- OUString& sName,
- OUString& o_rXmlId,
- ::rtl::OUString *pFieldName)
+ const Reference<XAttributeList> & xAttrList)
{
sal_Bool bNameOK = sal_False;
// find name attribute first
- sal_Int16 nLength = xAttrList->getLength();
+ const sal_Int16 nLength = xAttrList->getLength();
for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
{
OUString sLocalName;
- sal_uInt16 nPrefix = rImport.GetNamespaceMap().
+ const sal_uInt16 nPrefix = rImport.GetNamespaceMap().
GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
IsXMLToken(sLocalName, XML_NAME) )
{
- sName = xAttrList->getValueByIndex(nAttr);
+ m_sBookmarkName = xAttrList->getValueByIndex(nAttr);
bNameOK = sal_True;
}
else if ( (XML_NAMESPACE_XML == nPrefix) &&
IsXMLToken(sLocalName, XML_ID) )
{
- o_rXmlId = xAttrList->getValueByIndex(nAttr);
+ m_sXmlId = xAttrList->getValueByIndex(nAttr);
+ }
+ else if ( XML_NAMESPACE_XHTML == nPrefix )
+ {
+ // RDFa
+ if ( IsXMLToken( sLocalName, XML_ABOUT) )
+ {
+ m_sAbout = xAttrList->getValueByIndex(nAttr);
+ m_bHaveAbout = true;
+ }
+ else if ( IsXMLToken( sLocalName, XML_PROPERTY) )
+ {
+ m_sProperty = xAttrList->getValueByIndex(nAttr);
+ }
+ else if ( IsXMLToken( sLocalName, XML_CONTENT) )
+ {
+ m_sContent = xAttrList->getValueByIndex(nAttr);
+ }
+ else if ( IsXMLToken( sLocalName, XML_DATATYPE) )
+ {
+ m_sDatatype = xAttrList->getValueByIndex(nAttr);
+ }
}
-//FIXME: RDFa (text:bookmark-start)
- else if ( pFieldName!=NULL &&
- (XML_NAMESPACE_FIELD == nPrefix) &&
+ else if ( (XML_NAMESPACE_FIELD == nPrefix) &&
IsXMLToken(sLocalName, XML_TYPE) )
{
- *pFieldName = xAttrList->getValueByIndex(nAttr);
+ m_sFieldName = xAttrList->getValueByIndex(nAttr);
}
}
diff --git a/xmloff/source/text/XMLTextMarkImportContext.hxx b/xmloff/source/text/XMLTextMarkImportContext.hxx
index 4491524e9ec2..0269a3b4622d 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.hxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.hxx
@@ -39,6 +39,7 @@
namespace com { namespace sun { namespace star {
namespace text {
class XTextRange;
+ class XTextContent;
}
namespace xml { namespace sax {
class XAttributeList;
@@ -75,10 +76,16 @@ public:
class XMLTextMarkImportContext : public SvXMLImportContext
{
- XMLTextImportHelper& rHelper;
- ::rtl::OUString m_XmlId;
- ::rtl::OUString sBookmarkName;
- ::rtl::OUString sFieldName;
+ XMLTextImportHelper & m_rHelper;
+ ::rtl::OUString m_sBookmarkName;
+ ::rtl::OUString m_sFieldName;
+ ::rtl::OUString m_sXmlId;
+ // RDFa
+ bool m_bHaveAbout;
+ ::rtl::OUString m_sAbout;
+ ::rtl::OUString m_sProperty;
+ ::rtl::OUString m_sContent;
+ ::rtl::OUString m_sDatatype;
public:
@@ -90,7 +97,6 @@ public:
sal_uInt16 nPrfx,
const ::rtl::OUString& rLocalName );
-
protected:
virtual void StartElement(
@@ -103,7 +109,8 @@ protected:
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
public:
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > CreateAndInsertMark(
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > CreateAndInsertMark(
SvXMLImport& rImport,
const ::rtl::OUString& sServiceName,
const ::rtl::OUString& sMarkName,
@@ -111,13 +118,10 @@ public:
::com::sun::star::text::XTextRange> & rRange,
const ::rtl::OUString& i_rXmlId = ::rtl::OUString());
- static sal_Bool FindName(
+ sal_Bool FindName(
SvXMLImport& rImport,
const ::com::sun::star::uno::Reference<
- ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
- ::rtl::OUString& sName,
- ::rtl::OUString& o_rXmlId,
- ::rtl::OUString *pFieldName=NULL);
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
};
#endif
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 873a4a42f02c..198938fdc8f6 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -148,7 +148,7 @@ static sal_Char __READONLY_DATA FIELD_SERVICE_BIBLIOGRAPHY[] = "Bibliography";
static sal_Char __READONLY_DATA FIELD_SERVICE_SCRIPT[] = "Script";
static sal_Char __READONLY_DATA FIELD_SERVICE_ANNOTATION[] = "Annotation";
static sal_Char __READONLY_DATA FIELD_SERVICE_COMBINED_CHARACTERS[] = "CombinedCharacters";
-static sal_Char __READONLY_DATA FIELD_SERVICE_META[] = "MetaField";
+static sal_Char __READONLY_DATA FIELD_SERVICE_META[] = "MetadataField";
static sal_Char __READONLY_DATA FIELD_SERVICE_MEASURE[] = "Measure";
static sal_Char __READONLY_DATA FIELD_SERVICE_TABLE_FORMULA[] = "TableFormula";
static sal_Char __READONLY_DATA FIELD_SERVICE_DROP_DOWN[] = "DropDown";
@@ -263,7 +263,7 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp,
XMLPropertyState* pCombinedCharState)
: rExport(rExp),
pUsedMasters(NULL),
- sServicePrefix(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.")),
+ sServicePrefix(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.textfield.")),
sFieldMasterPrefix(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.FieldMaster.")),
sPresentationServicePrefix(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.TextField.")),
@@ -645,7 +645,7 @@ sal_Bool XMLTextFieldExport::IsStringField(
return !bRet;
}
- case FIELD_ID_META://FIXME ?????? no idea...
+ case FIELD_ID_META:
return 0 > GetIntProperty(sPropertyNumberFormat, xPropSet);
case FIELD_ID_DATABASE_DISPLAY:
@@ -740,7 +740,8 @@ sal_Bool XMLTextFieldExport::IsStringField(
/// export the styles needed by the given field. Called on first pass
/// through document
void XMLTextFieldExport::ExportFieldAutoStyle(
- const Reference<XTextField> & rTextField, sal_Bool bProgress )
+ const Reference<XTextField> & rTextField, const sal_Bool bProgress,
+ const sal_Bool bRecursive )
{
// get property set
Reference<XPropertySet> xPropSet(rTextField, UNO_QUERY);
@@ -835,7 +836,10 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
case FIELD_ID_META:
// recurse into content (does not export element, so can be done first)
- ExportMetaField(xPropSet, true, bProgress);
+ if (bRecursive)
+ {
+ ExportMetaField(xPropSet, true, bProgress);
+ }
// fall-through: for the meta-field itself!
case FIELD_ID_DOCINFO_PRINT_TIME:
case FIELD_ID_DOCINFO_PRINT_DATE:
@@ -2263,7 +2267,6 @@ void XMLTextFieldExport::ExportMacro(
GetExport().Characters(rContent);
}
-// FIXME: this is untested
void XMLTextFieldExport::ExportMetaField(
const Reference<XPropertySet> & i_xMeta,
bool i_bAutoStyles, sal_Bool i_bProgress )
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 6a3b66ec58ee..2c160eabd334 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1461,8 +1461,8 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres
{
Any aAny = xTextFieldsEnum->nextElement();
Reference< XTextField > xTextField = *(Reference<XTextField>*)aAny.getValue();
- exportTextField( xTextField->getAnchor(), bAutoStyles,
- bIsProgress );
+ exportTextField( xTextField, bAutoStyles, bIsProgress,
+ !xAutoStylesSupp.is() );
try
{
Reference < XPropertySet > xSet( xTextField, UNO_QUERY );
@@ -1470,8 +1470,11 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres
Any a = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("TextRange") );
a >>= xText;
if ( xText.is() )
+ {
exportText( xText, sal_True, bIsProgress, bExportContent );
- GetExport().GetTextParagraphExport()->collectTextAutoStyles( xText );
+ GetExport().GetTextParagraphExport()
+ ->collectTextAutoStyles( xText );
+ }
}
catch (Exception&)
{
@@ -2145,7 +2148,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
sal_Bool bAutoStyles, sal_Bool bIsProgress,
sal_Bool bPrvChrIsSpc )
{
- static OUString sMeta(RTL_CONSTASCII_USTRINGPARAM("Meta")); // FIXME
+ static OUString sMeta(RTL_CONSTASCII_USTRINGPARAM("InContentMetadata"));
sal_Bool bPrevCharIsSpace = bPrvChrIsSpc;
while( rTextEnum->hasMoreElements() )
@@ -2305,7 +2308,8 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
- DBG_ASSERT( !bOpenRuby, "Red Alert: Ruby still open!" );
+// now that there are nested enumerations for meta(-field), this may be valid!
+// DBG_ASSERT( !bOpenRuby, "Red Alert: Ruby still open!" );
}
void XMLTextParagraphExport::exportTable(
@@ -2326,21 +2330,29 @@ void XMLTextParagraphExport::exportTextField(
DBG_ASSERT( xTxtFld.is(), "text field missing" );
if( xTxtFld.is() )
{
- if( bAutoStyles )
- {
- pFieldExport->ExportFieldAutoStyle( xTxtFld, bIsProgress );
- }
- else
- {
- pFieldExport->ExportField( xTxtFld, bIsProgress );
- }
+ exportTextField(xTxtFld, bAutoStyles, bIsProgress, sal_True);
}
else
{
// write only characters
GetExport().Characters(rTextRange->getString());
}
+ }
+}
+void XMLTextParagraphExport::exportTextField(
+ const Reference < XTextField > & xTextField,
+ const sal_Bool bAutoStyles, const sal_Bool bIsProgress,
+ const sal_Bool bRecursive )
+{
+ if ( bAutoStyles )
+ {
+ pFieldExport->ExportFieldAutoStyle( xTextField, bIsProgress,
+ bRecursive );
+ }
+ else
+ {
+ pFieldExport->ExportField( xTextField, bIsProgress );
}
}
@@ -2385,9 +2397,12 @@ void XMLTextParagraphExport::exportTextMark(
nElement = *(sal_Bool *)rPropSet->getPropertyValue(sIsStart).getValue() ? 1 : 2;
}
- // bookmark, bookmark-start: xml:id for RDF metadata
+ // bookmark, bookmark-start: xml:id and RDFa for RDF metadata
if( nElement < 2 ) {
GetExport().AddAttributeXmlId(xName);
+ const uno::Reference<text::XTextContent> xTextContent(
+ xName, uno::UNO_QUERY_THROW);
+ GetExport().AddAttributesRDFa(xTextContent);
}
// export element
@@ -3664,11 +3679,12 @@ void XMLTextParagraphExport::exportRuby(
}
}
-// FIXME: this is untested
void XMLTextParagraphExport::exportMeta(
- const Reference<XPropertySet> & i_xMeta,
+ const Reference<XPropertySet> & i_xPortion,
sal_Bool i_bAutoStyles, sal_Bool i_isProgress)
{
+ static OUString sMeta(RTL_CONSTASCII_USTRINGPARAM("InContentMetadata"));
+
bool doExport(!i_bAutoStyles); // do not export element if autostyles
// check version >= 1.2
switch (GetExport().getDefaultVersion()) {
@@ -3677,13 +3693,14 @@ void XMLTextParagraphExport::exportMeta(
default: break;
}
- const Reference < XEnumerationAccess > xEA( i_xMeta, UNO_QUERY_THROW );
- const Reference < XEnumeration > xTextEnum( xEA->createEnumeration() );
+ const Reference< XTextContent > xTextContent(
+ i_xPortion->getPropertyValue(sMeta), UNO_QUERY_THROW);
+ const Reference< XEnumerationAccess > xEA( xTextContent, UNO_QUERY_THROW );
+ const Reference< XEnumeration > xTextEnum( xEA->createEnumeration() );
if (doExport)
{
- const Reference<rdf::XMetadatable> xMeta( i_xMeta, UNO_QUERY_THROW );
- const Reference<XTextContent> xTextContent( i_xMeta, UNO_QUERY_THROW );
+ const Reference<rdf::XMetadatable> xMeta(xTextContent, UNO_QUERY_THROW);
// text:meta with neither xml:id nor RDFa is invalid
xMeta->ensureMetadataReference();
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 6fb213f43642..dda2c3d49030 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -190,6 +190,11 @@ public:
const OUString& rLocalName,
XMLHints_Impl& rHnts,
const Reference<xml::sax::XAttributeList> & xAttrList);
+
+ static sal_Bool FindName(
+ SvXMLImport& rImport,
+ const Reference<xml::sax::XAttributeList> & xAttrList,
+ OUString& rName);
};
TYPEINIT1( XMLStartReferenceContext_Impl, SvXMLImportContext );
@@ -203,11 +208,8 @@ XMLStartReferenceContext_Impl::XMLStartReferenceContext_Impl(
SvXMLImportContext(rImport, nPrefix, rLocalName)
{
OUString sName;
- OUString dummy;
- // borrow FindName from XMLTextMarkImportContext, where bookmarks
- // and point references are handled.
- if (XMLTextMarkImportContext::FindName(GetImport(), xAttrList, sName, dummy))
+ if (FindName(GetImport(), xAttrList, sName))
{
XMLHint_Impl* pHint = new XMLReferenceHint_Impl(
sName, rImport.GetTextImport()->GetCursor()->getStart() );
@@ -219,6 +221,33 @@ XMLStartReferenceContext_Impl::XMLStartReferenceContext_Impl(
}
}
+sal_Bool XMLStartReferenceContext_Impl::FindName(
+ SvXMLImport& rImport,
+ const Reference<xml::sax::XAttributeList> & xAttrList,
+ OUString& rName)
+{
+ sal_Bool bNameOK( sal_False );
+
+ // find name attribute first
+ const sal_Int16 nLength( xAttrList->getLength() );
+ for (sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+ {
+ OUString sLocalName;
+ const sal_uInt16 nPrefix = rImport.GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
+ &sLocalName );
+
+ if ( (XML_NAMESPACE_TEXT == nPrefix) &&
+ IsXMLToken(sLocalName, XML_NAME) )
+ {
+ rName = xAttrList->getValueByIndex(nAttr);
+ bNameOK = sal_True;
+ }
+ }
+
+ return bNameOK;
+}
+
// ---------------------------------------------------------------------
/** import end of reference (<text:reference-end>) */
@@ -247,10 +276,9 @@ XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl(
SvXMLImportContext(rImport, nPrefix, rLocalName)
{
OUString sName;
- OUString dummy;
- // borrow from XMLTextMarkImportContext
- if (XMLTextMarkImportContext::FindName(GetImport(), xAttrList, sName, dummy))
+ // borrow from XMLStartReferenceContext_Impl
+ if (XMLStartReferenceContext_Impl::FindName(GetImport(), xAttrList, sName))
{
// search for reference start
sal_uInt16 nCount = rHints.Count();
@@ -511,9 +539,44 @@ void XMLImpRubyBaseContext_Impl::Characters( const OUString& rChars )
// ---------------------------------------------------------------------
+class XMLImpRubyContext_Impl : public SvXMLImportContext
+{
+ XMLHints_Impl& rHints;
+
+ sal_Bool& rIgnoreLeadingSpace;
+
+ Reference < XTextRange > m_xStart;
+ OUString m_sStyleName;
+ OUString m_sTextStyleName;
+ OUString m_sText;
+
+public:
+
+ TYPEINFO();
+
+ XMLImpRubyContext_Impl(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ XMLHints_Impl& rHnts,
+ sal_Bool& rIgnLeadSpace );
+
+ virtual ~XMLImpRubyContext_Impl();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList );
+
+ void SetTextStyleName( const OUString& s ) { m_sTextStyleName = s; }
+ void AppendText( const OUString& s ) { m_sText += s; }
+};
+
+// ---------------------------------------------------------------------
+
class XMLImpRubyTextContext_Impl : public SvXMLImportContext
{
- XMLRubyHint_Impl *pHint;
+ XMLImpRubyContext_Impl & m_rRubyContext;
public:
@@ -524,7 +587,7 @@ public:
sal_uInt16 nPrfx,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList,
- XMLRubyHint_Impl *pHint );
+ XMLImpRubyContext_Impl & rParent );
virtual ~XMLImpRubyTextContext_Impl();
@@ -538,9 +601,9 @@ XMLImpRubyTextContext_Impl::XMLImpRubyTextContext_Impl(
sal_uInt16 nPrfx,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList,
- XMLRubyHint_Impl *pHt ) :
- SvXMLImportContext( rImport, nPrfx, rLName ),
- pHint( pHt )
+ XMLImpRubyContext_Impl & rParent )
+ : SvXMLImportContext( rImport, nPrfx, rLName )
+ , m_rRubyContext( rParent )
{
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -555,7 +618,7 @@ XMLImpRubyTextContext_Impl::XMLImpRubyTextContext_Impl(
if( XML_NAMESPACE_TEXT == nPrefix &&
IsXMLToken( aLocalName, XML_STYLE_NAME ) )
{
- pHint->SetTextStyleName( rValue );
+ m_rRubyContext.SetTextStyleName( rValue );
break;
}
}
@@ -567,37 +630,11 @@ XMLImpRubyTextContext_Impl::~XMLImpRubyTextContext_Impl()
void XMLImpRubyTextContext_Impl::Characters( const OUString& rChars )
{
- pHint->AppendText( rChars );
+ m_rRubyContext.AppendText( rChars );
}
// ---------------------------------------------------------------------
-class XMLImpRubyContext_Impl : public SvXMLImportContext
-{
- XMLHints_Impl& rHints;
- XMLRubyHint_Impl *pHint;
-
- sal_Bool& rIgnoreLeadingSpace;
-
-public:
-
- TYPEINFO();
-
- XMLImpRubyContext_Impl(
- SvXMLImport& rImport,
- sal_uInt16 nPrfx,
- const OUString& rLName,
- const Reference< xml::sax::XAttributeList > & xAttrList,
- XMLHints_Impl& rHnts,
- sal_Bool& rIgnLeadSpace );
-
- virtual ~XMLImpRubyContext_Impl();
-
- virtual SvXMLImportContext *CreateChildContext(
- sal_uInt16 nPrefix, const OUString& rLocalName,
- const Reference< xml::sax::XAttributeList > & xAttrList );
-};
-
TYPEINIT1( XMLImpRubyContext_Impl, SvXMLImportContext );
XMLImpRubyContext_Impl::XMLImpRubyContext_Impl(
@@ -609,9 +646,8 @@ XMLImpRubyContext_Impl::XMLImpRubyContext_Impl(
sal_Bool& rIgnLeadSpace ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
rHints( rHnts ),
- pHint( new XMLRubyHint_Impl(
- GetImport().GetTextImport()->GetCursorAsRange()->getStart() ) ),
rIgnoreLeadingSpace( rIgnLeadSpace )
+ , m_xStart( GetImport().GetTextImport()->GetCursorAsRange()->getStart() )
{
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -626,18 +662,22 @@ XMLImpRubyContext_Impl::XMLImpRubyContext_Impl(
if( XML_NAMESPACE_TEXT == nPrefix &&
IsXMLToken( aLocalName, XML_STYLE_NAME ) )
{
- pHint->SetStyleName( rValue );
+ m_sStyleName = rValue;
break;
}
}
- rHints.Insert( pHint, rHints.Count() );
}
XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl()
{
- if( pHint )
- pHint->SetEnd( GetImport().GetTextImport()
- ->GetCursorAsRange()->getStart() );
+ const UniReference < XMLTextImportHelper > xTextImport(
+ GetImport().GetTextImport());
+ const Reference < XTextCursor > xAttrCursor(
+ xTextImport->GetText()->createTextCursorByRange( m_xStart ));
+ xAttrCursor->gotoRange(xTextImport->GetCursorAsRange()->getStart(),
+ sal_True);
+ xTextImport->SetRuby( GetImport(), xAttrCursor,
+ m_sStyleName, m_sTextStyleName, m_sText );
}
SvXMLImportContext *XMLImpRubyContext_Impl::CreateChildContext(
@@ -657,7 +697,7 @@ SvXMLImportContext *XMLImpRubyContext_Impl::CreateChildContext(
pContext = new XMLImpRubyTextContext_Impl( GetImport(), nPrefix,
rLocalName,
xAttrList,
- pHint );
+ *this );
else
pContext = new SvXMLImportContext(
GetImport(), nPrefix, rLocalName );
@@ -672,7 +712,6 @@ SvXMLImportContext *XMLImpRubyContext_Impl::CreateChildContext(
// ---------------------------------------------------------------------
/** for text:meta and text:meta-field
-//FIXME not tested
*/
class XMLMetaImportContextBase : public SvXMLImportContext
{
@@ -691,19 +730,21 @@ public:
XMLMetaImportContextBase(
SvXMLImport& i_rImport,
- sal_uInt16 i_nPrefix,
+ const sal_uInt16 i_nPrefix,
const OUString& i_rLocalName,
- const Reference< xml::sax::XAttributeList > & i_xAttrList,
XMLHints_Impl& i_rHints,
sal_Bool & i_rIgnoreLeadingSpace );
virtual ~XMLMetaImportContextBase();
+ virtual void StartElement(
+ const Reference<xml::sax::XAttributeList> & i_xAttrList);
+
virtual void EndElement();
virtual SvXMLImportContext *CreateChildContext(
sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
- const Reference< xml::sax::XAttributeList > & i_xAttrList );
+ const Reference< xml::sax::XAttributeList > & i_xAttrList);
virtual void Characters( const OUString& i_rChars );
@@ -718,33 +759,36 @@ TYPEINIT1( XMLMetaImportContextBase, SvXMLImportContext );
XMLMetaImportContextBase::XMLMetaImportContextBase(
SvXMLImport& i_rImport,
- sal_uInt16 i_nPrefix,
+ const sal_uInt16 i_nPrefix,
const OUString& i_rLocalName,
- const Reference< xml::sax::XAttributeList > & i_xAttrList,
XMLHints_Impl& i_rHints,
sal_Bool & i_rIgnoreLeadingSpace )
: SvXMLImportContext( i_rImport, i_nPrefix, i_rLocalName )
, m_rHints( i_rHints )
, m_rIgnoreLeadingSpace( i_rIgnoreLeadingSpace )
- , m_xStart()
+ , m_xStart( GetImport().GetTextImport()->GetCursorAsRange()->getStart() )
+{
+}
+
+XMLMetaImportContextBase::~XMLMetaImportContextBase()
+{
+}
+
+void XMLMetaImportContextBase::StartElement(
+ const Reference<xml::sax::XAttributeList> & i_xAttrList)
{
const sal_Int16 nAttrCount(i_xAttrList.is() ? i_xAttrList->getLength() : 0);
- for ( sal_Int16 i=0; i < nAttrCount; i++ )
+ for ( sal_Int16 i = 0; i < nAttrCount; ++i )
{
const OUString& rAttrName( i_xAttrList->getNameByIndex( i ) );
const OUString& rValue( i_xAttrList->getValueByIndex( i ) );
OUString sLocalName;
- sal_uInt16 nPrefix =
+ const sal_uInt16 nPrefix(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
- &sLocalName );
+ &sLocalName ));
ProcessAttribute(nPrefix, sLocalName, rValue);
}
- m_xStart = GetImport().GetTextImport()->GetCursorAsRange()->getStart();
-}
-
-XMLMetaImportContextBase::~XMLMetaImportContextBase()
-{
}
void XMLMetaImportContextBase::EndElement()
@@ -764,41 +808,15 @@ void XMLMetaImportContextBase::EndElement()
const Reference<XTextRange> xInsertionRange(xInsertionCursor, UNO_QUERY);
InsertMeta(xInsertionRange);
-//FIXME
-#if 0
- Reference<XMultiServiceFactory> xFactory(rImport.GetModel(), UNO_QUERY);
- if ( xFactory.is() )
- {
- Reference<XInterface> xIfc = xFactory->createInstance(sServiceName);
-
- // xml:id for RDF metadata
- rImport.SetXmlId(xIfc, i_rXmlId);
-
- // cast to XTextContent and attach to document
- Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);
- if (xTextContent.is())
- {
- try
- {
- rImport.GetTextImport()->GetText()->insertTextContent(
- xInsertionRange, xTextContent, sal_True);
- }
- catch (com::sun::star::lang::IllegalArgumentException &)
- {
- OSL_ENSURE(false, "XMLMetaImportContext::EndElement: iae");
- }
- }
- }
-#endif
}
SvXMLImportContext * XMLMetaImportContextBase::CreateChildContext(
sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
const Reference< xml::sax::XAttributeList > & i_xAttrList )
{
- const SvXMLTokenMap& rTokenMap =
- GetImport().GetTextImport()->GetTextPElemTokenMap();
- sal_uInt16 nToken = rTokenMap.Get( i_nPrefix, i_rLocalName );
+ const SvXMLTokenMap& rTokenMap(
+ GetImport().GetTextImport()->GetTextPElemTokenMap() );
+ const sal_uInt16 nToken( rTokenMap.Get( i_nPrefix, i_rLocalName ) );
return XMLImpSpanContext_Impl::CreateChildContext( GetImport(), i_nPrefix,
i_rLocalName, i_xAttrList, nToken, m_rHints, m_rIgnoreLeadingSpace );
@@ -812,8 +830,7 @@ void XMLMetaImportContextBase::Characters( const OUString& i_rChars )
void XMLMetaImportContextBase::ProcessAttribute(sal_uInt16 const i_nPrefix,
OUString const & i_rLocalName, OUString const & i_rValue)
{
- if ( (XML_NAMESPACE_XML == i_nPrefix) &&
- IsXMLToken(i_rLocalName, XML_ID) )
+ if ( (XML_NAMESPACE_XML == i_nPrefix) && IsXMLToken(i_rLocalName, XML_ID) )
{
m_XmlId = i_rValue;
}
@@ -822,9 +839,7 @@ void XMLMetaImportContextBase::ProcessAttribute(sal_uInt16 const i_nPrefix,
// ---------------------------------------------------------------------
-/** text:meta
-//FIXME not tested
- */
+/** text:meta */
class XMLMetaImportContext : public XMLMetaImportContextBase
{
// RDFa
@@ -839,9 +854,8 @@ public:
XMLMetaImportContext(
SvXMLImport& i_rImport,
- sal_uInt16 i_nPrefix,
+ const sal_uInt16 i_nPrefix,
const OUString& i_rLocalName,
- const Reference< xml::sax::XAttributeList > & i_xAttrList,
XMLHints_Impl& i_rHints,
sal_Bool & i_rIgnoreLeadingSpace );
@@ -855,13 +869,12 @@ TYPEINIT1( XMLMetaImportContext, XMLMetaImportContextBase );
XMLMetaImportContext::XMLMetaImportContext(
SvXMLImport& i_rImport,
- sal_uInt16 i_nPrefix,
+ const sal_uInt16 i_nPrefix,
const OUString& i_rLocalName,
- const Reference< xml::sax::XAttributeList > & i_xAttrList,
XMLHints_Impl& i_rHints,
sal_Bool & i_rIgnoreLeadingSpace )
: XMLMetaImportContextBase( i_rImport, i_nPrefix, i_rLocalName,
- i_xAttrList, i_rHints, i_rIgnoreLeadingSpace )
+ i_rHints, i_rIgnoreLeadingSpace )
, m_bHaveAbout(false)
{
}
@@ -929,9 +942,7 @@ void XMLMetaImportContext::InsertMeta(
// ---------------------------------------------------------------------
-/** text:meta-field
-//FIXME not tested
- */
+/** text:meta-field */
class XMLMetaFieldImportContext : public XMLMetaImportContextBase
{
OUString m_DataStyleName;
@@ -941,9 +952,8 @@ public:
XMLMetaFieldImportContext(
SvXMLImport& i_rImport,
- sal_uInt16 i_nPrefix,
+ const sal_uInt16 i_nPrefix,
const OUString& i_rLocalName,
- const Reference< xml::sax::XAttributeList > & i_xAttrList,
XMLHints_Impl& i_rHints,
sal_Bool & i_rIgnoreLeadingSpace );
@@ -957,21 +967,20 @@ TYPEINIT1( XMLMetaFieldImportContext, XMLMetaImportContextBase );
XMLMetaFieldImportContext::XMLMetaFieldImportContext(
SvXMLImport& i_rImport,
- sal_uInt16 i_nPrefix,
+ const sal_uInt16 i_nPrefix,
const OUString& i_rLocalName,
- const Reference< xml::sax::XAttributeList > & i_xAttrList,
XMLHints_Impl& i_rHints,
sal_Bool & i_rIgnoreLeadingSpace )
: XMLMetaImportContextBase( i_rImport, i_nPrefix, i_rLocalName,
- i_xAttrList, i_rHints, i_rIgnoreLeadingSpace )
+ i_rHints, i_rIgnoreLeadingSpace )
{
}
void XMLMetaFieldImportContext::ProcessAttribute(sal_uInt16 const i_nPrefix,
OUString const & i_rLocalName, OUString const & i_rValue)
{
- if( XML_NAMESPACE_STYLE == i_nPrefix &&
- IsXMLToken( i_rLocalName, XML_DATA_STYLE_NAME ) )
+ if ( XML_NAMESPACE_STYLE == i_nPrefix &&
+ IsXMLToken( i_rLocalName, XML_DATA_STYLE_NAME ) )
{
m_DataStyleName = i_rValue;
}
@@ -1811,18 +1820,15 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
sal_False);
break;
-// FIXME: should test before enabling...
-#if 0
case XML_TOK_TEXT_META:
pContext = new XMLMetaImportContext(rImport, nPrefix, rLocalName,
- xAttrList, rHints, rIgnoreLeadingSpace );
+ rHints, rIgnoreLeadingSpace );
break;
case XML_TOK_TEXT_META_FIELD:
pContext = new XMLMetaFieldImportContext(rImport, nPrefix, rLocalName,
- xAttrList, rHints, rIgnoreLeadingSpace );
+ rHints, rIgnoreLeadingSpace );
break;
-#endif
default:
// none of the above? then it's probably a text field!
@@ -2190,17 +2196,6 @@ XMLParaContext::~XMLParaContext()
pHHint->GetEventsContext() );
}
break;
- case XML_HINT_RUBY:
- {
- const XMLRubyHint_Impl *pRHint =
- (const XMLRubyHint_Impl *)pHint;
- xTxtImport->SetRuby( GetImport(),
- xAttrCursor,
- pRHint->GetStyleName(),
- pRHint->GetTextStyleName(),
- pRHint->GetText() );
- }
- break;
case XML_HINT_INDEX_MARK:
{
Reference<beans::XPropertySet> xMark(
@@ -2341,7 +2336,6 @@ XMLNumberedParaContext::XMLNumberedParaContext(
m_xNumRules()
{
::rtl::OUString StyleName;
- bool ContinuteNumbering(false);
const SvXMLTokenMap& rTokenMap(
i_rImport.GetTextImport()->GetTextNumberedParagraphAttrTokenMap() );
@@ -2378,8 +2372,8 @@ XMLNumberedParaContext::XMLNumberedParaContext(
StyleName = rValue;
break;
case XML_TOK_TEXT_NUMBERED_PARAGRAPH_CONTINUE_NUMBERING:
- ContinuteNumbering = IsXMLToken(rValue, XML_TRUE);
-// ??? what in Fred's name is this supposed to do?
+ // this attribute is deprecated
+// ContinuteNumbering = IsXMLToken(rValue, XML_TRUE);
break;
case XML_TOK_TEXT_NUMBERED_PARAGRAPH_START_VALUE:
{
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index 2012764e38b7..f3c8da0bcf03 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -49,7 +49,6 @@ using namespace ::xmloff::token;
#define XML_HINT_STYLE 1
#define XML_HINT_REFERENCE 2
#define XML_HINT_HYPERLINK 3
-#define XML_HINT_RUBY 4
#define XML_HINT_INDEX_MARK 5
#define XML_HINT_TEXT_FRAME 6
// --> DVO, OD 2004-07-14 #i26791#
@@ -209,28 +208,6 @@ public:
const OUString& GetID() const { return sID; }
};
-class XMLRubyHint_Impl : public XMLHint_Impl
-{
- OUString sStyleName;
- OUString sTextStyleName;
- OUString sText;
-
-public:
-
- XMLRubyHint_Impl( const Reference < XTextRange > & rPos ) :
- XMLHint_Impl( XML_HINT_RUBY, rPos, rPos )
- {
- }
-
- virtual ~XMLRubyHint_Impl() {}
-
- void SetStyleName( const OUString& s ) { sStyleName = s; }
- const OUString& GetStyleName() const { return sStyleName; }
- void SetTextStyleName( const OUString& s ) { sTextStyleName = s; }
- const OUString& GetTextStyleName() const { return sTextStyleName; }
- void AppendText( const OUString& s ) { sText += s; }
- const OUString& GetText() const { return sText; }
-};
class XMLTextFrameHint_Impl : public XMLHint_Impl
{