[ooo-build-commit] .: patches/dev300 patches/vba
Noel Power
noelp at kemper.freedesktop.org
Mon Jun 28 11:12:14 PDT 2010
patches/dev300/apply | 3
patches/dev300/calc-distributed-cell-text-xmloff.diff | 40
patches/dev300/calc-formula-variable-sep-config-check-sc.diff | 39
patches/dev300/calc-insert-current-time-sc.diff | 48
patches/dev300/calc-pdf-export-allow-filtered-range-sc.diff | 23
patches/dev300/calc-perf-import-dbf-sc.diff | 99
patches/dev300/calc-perf-xls-import-cellstyles.diff | 34
patches/dev300/writer-doc-comparison.diff | 71
patches/vba/cws-vbasupportdev300_m83.diff |50379 ++++++++++
9 files changed, 50547 insertions(+), 189 deletions(-)
New commits:
commit 653acc34bcfe50ae35210fd9d916631cb6923f62
Author: Noel Power <noel.power at novell.com>
Date: Mon Jun 28 19:10:12 2010 +0100
get vbasupportdev300_m83.diff to apply ( for m83 obviously )
* patches/dev300/apply:
* patches/dev300/calc-distributed-cell-text-xmloff.diff:
* patches/dev300/calc-formula-variable-sep-config-check-sc.diff:
* patches/dev300/calc-insert-current-time-sc.diff:
* patches/dev300/calc-pdf-export-allow-filtered-range-sc.diff:
* patches/dev300/calc-perf-import-dbf-sc.diff:
* patches/dev300/calc-perf-xls-import-cellstyles.diff:
* patches/dev300/writer-doc-comparison.diff:
* patches/vba/cws-vbasupportdev300_m83.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 68868f8..dd87505 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1573,6 +1573,7 @@ mono-climaker-bridgetest.diff
SectionOwner => noelpwer
+cws-vbasupportdev300_m83.diff, noelpwer
# FIXME dev300-m77 cws-vbasupportdev300.diff # disabled
# FIXME dev300-m77 eventhelper-closecrash-fix.diff, n#438606, i#106270 #disabled
@@ -1598,7 +1599,7 @@ SectionOwner => noelpwer
# fire change event when active tab is changed via api for multipage
# FIXME dev300-m77 vba-multipage-fireapichange.diff #disabled
# support copy of worksheet to 'other' document
-vba-worksheet-copy-otherdoc-api-support.diff
+#####vba-worksheet-copy-otherdoc-api-support.diff
# fix problem with parallel build failing
# FIXME dev300-m77 vba-fix-scripting-parallelbuild.diff #disabled
# fix strange problem when strange (empty) TBC records can
diff --git a/patches/dev300/calc-distributed-cell-text-xmloff.diff b/patches/dev300/calc-distributed-cell-text-xmloff.diff
index d8cd46f..7690dc1 100644
--- a/patches/dev300/calc-distributed-cell-text-xmloff.diff
+++ b/patches/dev300/calc-distributed-cell-text-xmloff.diff
@@ -1,4 +1,3 @@
----
xmloff/inc/xmlnmspe.hxx | 1 +
xmloff/inc/xmloff/xmltoken.hxx | 7 +++++++
xmloff/source/core/xmlexp.cxx | 6 ++++++
@@ -7,7 +6,7 @@
5 files changed, 24 insertions(+), 0 deletions(-)
diff --git xmloff/inc/xmlnmspe.hxx xmloff/inc/xmlnmspe.hxx
-index 1451cde..fee099a 100644
+index 33de6ea..79197cf 100644
--- xmloff/inc/xmlnmspe.hxx
+++ xmloff/inc/xmlnmspe.hxx
@@ -104,6 +104,7 @@ XML_OLD_NAMESPACE( META, 6U )
@@ -15,15 +14,15 @@ index 1451cde..fee099a 100644
// experimental namespaces
XML_NAMESPACE( FIELD, 100U )
+XML_NAMESPACE( CSS3TEXT, 103U ) // CSS Text Level 3
+ XML_NAMESPACE( FORMX, 101U ) // form interop extensions
- #endif // _XMLOFF_XMLNMSPE_HXX
diff --git xmloff/inc/xmloff/xmltoken.hxx xmloff/inc/xmloff/xmltoken.hxx
-index e1b0475..63e1b76 100644
+index c61eac4..212a4c3 100644
--- xmloff/inc/xmloff/xmltoken.hxx
+++ xmloff/inc/xmloff/xmltoken.hxx
-@@ -150,6 +150,10 @@ namespace xmloff { namespace token {
-
+@@ -154,6 +154,10 @@ namespace xmloff { namespace token {
+
XML_NP_DRAW_EXT,
XML_N_DRAW_EXT,
+
@@ -33,7 +32,7 @@ index e1b0475..63e1b76 100644
// units
XML_UNIT_MM,
-@@ -606,6 +610,7 @@ namespace xmloff { namespace token {
+@@ -610,6 +614,7 @@ namespace xmloff { namespace token {
XML_DISTANCE,
XML_DISTANCE_AFTER_SEP,
XML_DISTANCE_BEFORE_SEP,
@@ -41,7 +40,7 @@ index e1b0475..63e1b76 100644
XML_DISTRIBUTE_LETTER,
XML_DISTRIBUTE_SPACE,
XML_DIVIDE,
-@@ -1780,6 +1785,7 @@ namespace xmloff { namespace token {
+@@ -1782,6 +1787,7 @@ namespace xmloff { namespace token {
XML_TEXT_GLOBAL,
XML_TEXT_INDENT,
XML_TEXT_INPUT,
@@ -49,7 +48,7 @@ index e1b0475..63e1b76 100644
XML_TEXT_OUTLINE,
XML_TEXT_POSITION,
XML_TEXT_ROTATION_ANGLE,
-@@ -1913,6 +1919,7 @@ namespace xmloff { namespace token {
+@@ -1915,6 +1921,7 @@ namespace xmloff { namespace token {
XML_VERSION_LIST,
XML_VERTICAL,
XML_VERTICAL_ALIGN,
@@ -58,10 +57,10 @@ index e1b0475..63e1b76 100644
XML_VERTICAL_POS,
XML_VERTICAL_REL,
diff --git xmloff/source/core/xmlexp.cxx xmloff/source/core/xmlexp.cxx
-index 9b1ddcb..57aa68c 100644
+index e8a2c22..f01a8ea 100644
--- xmloff/source/core/xmlexp.cxx
+++ xmloff/source/core/xmlexp.cxx
-@@ -422,6 +422,12 @@ void SvXMLExport::_InitCtor()
+@@ -423,6 +423,12 @@ void SvXMLExport::_InitCtor()
mpNamespaceMap->Add( GetXMLToken(XML_NP_GRDDL),
GetXMLToken(XML_N_GRDDL), XML_NAMESPACE_GRDDL );
}
@@ -75,10 +74,10 @@ index 9b1ddcb..57aa68c 100644
mxAttrList = (xml::sax::XAttributeList*)mpAttrList;
diff --git xmloff/source/core/xmlimp.cxx xmloff/source/core/xmlimp.cxx
-index 92e5eb8..08d7301 100644
+index e6105d8..2bbfdad 100644
--- xmloff/source/core/xmlimp.cxx
+++ xmloff/source/core/xmlimp.cxx
-@@ -119,6 +119,7 @@ sal_Char __READONLY_DATA sXML_np__xsd[] = "_xsd";
+@@ -120,6 +120,7 @@ sal_Char __READONLY_DATA sXML_np__xsd[] = "_xsd";
sal_Char __READONLY_DATA sXML_np__xsi[] = "_xsi";
sal_Char __READONLY_DATA sXML_np__field[] = "_field";
sal_Char __READONLY_DATA sXML_np__xhtml[] = "_xhtml";
@@ -86,7 +85,7 @@ index 92e5eb8..08d7301 100644
sal_Char __READONLY_DATA sXML_np__fo_old[] = "__fo";
sal_Char __READONLY_DATA sXML_np__xlink_old[] = "__xlink";
-@@ -323,6 +324,9 @@ void SvXMLImport::_InitCtor()
+@@ -327,6 +328,9 @@ void SvXMLImport::_InitCtor()
mpNamespaceMap->Add(
OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xhtml ) ),
GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
@@ -97,10 +96,10 @@ index 92e5eb8..08d7301 100644
msPackageProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
diff --git xmloff/source/core/xmltoken.cxx xmloff/source/core/xmltoken.cxx
-index 0e7b9b1..94c34eb 100644
+index c183083..a1f1610 100644
--- xmloff/source/core/xmltoken.cxx
+++ xmloff/source/core/xmltoken.cxx
-@@ -159,6 +159,9 @@ namespace xmloff { namespace token {
+@@ -162,6 +162,9 @@ namespace xmloff { namespace token {
TOKEN( "drawooo", XML_NP_DRAW_EXT ),
TOKEN( "http://openoffice.org/2010/draw", XML_N_DRAW_EXT ),
@@ -110,7 +109,7 @@ index 0e7b9b1..94c34eb 100644
// units
TOKEN( "mm", XML_UNIT_MM ),
TOKEN( "m", XML_UNIT_M ),
-@@ -614,6 +617,7 @@ namespace xmloff { namespace token {
+@@ -617,6 +620,7 @@ namespace xmloff { namespace token {
TOKEN( "distance", XML_DISTANCE ),
TOKEN( "distance-after-sep", XML_DISTANCE_AFTER_SEP ),
TOKEN( "distance-before-sep", XML_DISTANCE_BEFORE_SEP ),
@@ -118,7 +117,7 @@ index 0e7b9b1..94c34eb 100644
TOKEN( "distribute-letter", XML_DISTRIBUTE_LETTER ),
TOKEN( "distribute-space", XML_DISTRIBUTE_SPACE ),
TOKEN( "divide", XML_DIVIDE ),
-@@ -1788,6 +1792,7 @@ namespace xmloff { namespace token {
+@@ -1789,6 +1793,7 @@ namespace xmloff { namespace token {
TOKEN( "text-global", XML_TEXT_GLOBAL ),
TOKEN( "text-indent", XML_TEXT_INDENT ),
TOKEN( "text-input", XML_TEXT_INPUT ),
@@ -126,7 +125,7 @@ index 0e7b9b1..94c34eb 100644
TOKEN( "text-outline", XML_TEXT_OUTLINE ),
TOKEN( "text-position", XML_TEXT_POSITION ),
TOKEN( "text-rotation-angle", XML_TEXT_ROTATION_ANGLE ),
-@@ -1921,6 +1926,7 @@ namespace xmloff { namespace token {
+@@ -1922,6 +1927,7 @@ namespace xmloff { namespace token {
TOKEN( "version-list", XML_VERSION_LIST ),
TOKEN( "vertical", XML_VERTICAL ),
TOKEN( "vertical-align", XML_VERTICAL_ALIGN ),
@@ -134,6 +133,3 @@ index 0e7b9b1..94c34eb 100644
TOKEN( "vertical-lines", XML_VERTICAL_LINES ),
TOKEN( "vertical-pos", XML_VERTICAL_POS ),
TOKEN( "vertical-rel", XML_VERTICAL_REL ),
---
-1.7.0.1
-
diff --git a/patches/dev300/calc-formula-variable-sep-config-check-sc.diff b/patches/dev300/calc-formula-variable-sep-config-check-sc.diff
index 6d91bd3..6cda23f 100644
--- a/patches/dev300/calc-formula-variable-sep-config-check-sc.diff
+++ b/patches/dev300/calc-formula-variable-sep-config-check-sc.diff
@@ -1,4 +1,3 @@
----
sc/inc/docoptio.hxx | 3 +-
sc/inc/globstr.hrc | 4 +-
sc/source/core/tool/docoptio.cxx | 101 ++++++++++++++++++-------------------
@@ -7,7 +6,7 @@
sc/source/ui/inc/docsh.hxx | 2 +
sc/source/ui/src/globstr.src | 4 ++
sc/source/ui/view/gridwin.cxx | 1 +
- 8 files changed, 134 insertions(+), 53 deletions(-)
+ 9 files changed, 144 insertions(+), 83 deletions(-)
diff --git sc/inc/docoptio.hxx sc/inc/docoptio.hxx
index 8db36bd..458c68a 100644
@@ -24,17 +23,18 @@ index 8db36bd..458c68a 100644
diff --git sc/inc/globstr.hrc sc/inc/globstr.hrc
-index a783120..44103b7 100644
+index 7503ce2..629cbb4 100644
--- sc/inc/globstr.hrc
+++ sc/inc/globstr.hrc
-@@ -577,7 +577,9 @@
- #define STR_UNDO_SET_TAB_BG_COLOR 438
- #define STR_UNDO_SET_MULTI_TAB_BG_COLOR 439
-
--#define STR_COUNT 440
-+#define STR_OPTIONS_WARN_SEPARATORS 440
+@@ -592,8 +592,10 @@
+ #define STR_FORM_DROPDOWN 451
+ #define STR_FORM_SPINNER 452
+ #define STR_FORM_SCROLLBAR 453
+
-+#define STR_COUNT 441
++#define STR_OPTIONS_WARN_SEPARATORS 454
+
+-#define STR_COUNT 454
++#define STR_COUNT 455
#endif
@@ -249,10 +249,10 @@ index 5c6a411..bb7b82f 100644
+}
diff --git sc/source/ui/docshell/makefile.mk sc/source/ui/docshell/makefile.mk
-index 99a7495..dcfd042 100644
+index 6851f78..2f642b6 100644
--- sc/source/ui/docshell/makefile.mk
+++ sc/source/ui/docshell/makefile.mk
-@@ -98,6 +98,7 @@ EXCEPTIONSFILES= \
+@@ -99,6 +99,7 @@ EXCEPTIONSFILES= \
$(SLO)$/docsh.obj \
$(SLO)$/docsh3.obj \
$(SLO)$/docsh4.obj \
@@ -261,10 +261,10 @@ index 99a7495..dcfd042 100644
$(SLO)$/externalrefmgr.obj \
$(SLO)$/dbdocimp.obj \
diff --git sc/source/ui/inc/docsh.hxx sc/source/ui/inc/docsh.hxx
-index f2bc127..8517a77 100644
+index 95a16ed..1f0138e 100644
--- sc/source/ui/inc/docsh.hxx
+++ sc/source/ui/inc/docsh.hxx
-@@ -326,6 +326,8 @@ public:
+@@ -327,6 +327,8 @@ public:
void UpdateLinks(); // Link-Eintraege aktuallisieren
BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren)
@@ -274,10 +274,10 @@ index f2bc127..8517a77 100644
void PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
diff --git sc/source/ui/src/globstr.src sc/source/ui/src/globstr.src
-index 37f0d31..c3955f8 100644
+index eceefa6..5be3d92 100644
--- sc/source/ui/src/globstr.src
+++ sc/source/ui/src/globstr.src
-@@ -1738,5 +1738,9 @@ Resource RID_GLOBSTR
+@@ -1809,5 +1809,9 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "DataPilot table needs at least two rows of data to create or refresh." ;
};
@@ -288,10 +288,10 @@ index 37f0d31..c3955f8 100644
};
diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
-index dc2c636..f5bd98d 100644
+index 98a923a..b55baf5 100644
--- sc/source/ui/view/gridwin.cxx
+++ sc/source/ui/view/gridwin.cxx
-@@ -4520,6 +4520,7 @@ void __EXPORT ScGridWindow::GetFocus()
+@@ -4573,6 +4573,7 @@ void __EXPORT ScGridWindow::GetFocus()
// auf dem Mac
}
@@ -299,6 +299,3 @@ index dc2c636..f5bd98d 100644
Window::GetFocus();
}
---
-1.7.0.1
-
diff --git a/patches/dev300/calc-insert-current-time-sc.diff b/patches/dev300/calc-insert-current-time-sc.diff
index 25c3745..e0726b3 100644
--- a/patches/dev300/calc-insert-current-time-sc.diff
+++ b/patches/dev300/calc-insert-current-time-sc.diff
@@ -1,5 +1,4 @@
----
- sc/inc/globstr.hrc | 5 +++-
+ sc/inc/globstr.hrc | 3 +-
sc/inc/sc.hrc | 3 ++
sc/sdi/cellsh.sdi | 2 +
sc/sdi/scalc.sdi | 51 ++++++++++++++++++++++++++++++++++++++++
@@ -7,31 +6,31 @@
sc/source/ui/src/globstr.src | 8 ++++++
sc/source/ui/view/cellsh1.cxx | 8 ++++++
sc/source/ui/view/viewfun6.cxx | 26 ++++++++++++++++++++
- 8 files changed, 104 insertions(+), 1 deletions(-)
+ 9 files changed, 112 insertions(+), 10 deletions(-)
diff --git sc/inc/globstr.hrc sc/inc/globstr.hrc
-index 44103b7..51350e5 100644
+index 629cbb4..6a62736 100644
--- sc/inc/globstr.hrc
+++ sc/inc/globstr.hrc
-@@ -579,7 +579,10 @@
+@@ -594,8 +594,10 @@
+ #define STR_FORM_SCROLLBAR 453
- #define STR_OPTIONS_WARN_SEPARATORS 440
-
--#define STR_COUNT 441
-+#define STR_UNDO_INSERT_CURRENT_DATE 441
-+#define STR_UNDO_INSERT_CURRENT_TIME 442
-+
-+#define STR_COUNT 443
+ #define STR_OPTIONS_WARN_SEPARATORS 454
++#define STR_UNDO_INSERT_CURRENT_DATE 455
++#define STR_UNDO_INSERT_CURRENT_TIME 456
+
+-#define STR_COUNT 455
++#define STR_COUNT 457
#endif
diff --git sc/inc/sc.hrc sc/inc/sc.hrc
-index f342d9c..d67b066 100644
+index 5547bb4..9341e0d 100644
--- sc/inc/sc.hrc
+++ sc/inc/sc.hrc
-@@ -1671,6 +1671,9 @@
- #define RID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 3)
- #define HID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 4)
+@@ -1676,6 +1676,9 @@
+ #define SID_DATA_FORM (SC_OOO_BUILD_START + 2) // menu (in Data menu)
+ #define RID_SCDLG_DATAFORM (SC_OOO_BUILD_START + 3) // dialog
+#define SID_INSERT_CURRENT_DATE (SC_OOO_BUILD_START + 5)
+#define SID_INSERT_CURRENT_TIME (SC_OOO_BUILD_START + 6)
@@ -40,10 +39,10 @@ index f342d9c..d67b066 100644
diff --git sc/sdi/cellsh.sdi sc/sdi/cellsh.sdi
-index 957c3d1..c5677d0 100644
+index 84b23d5..8805f36 100644
--- sc/sdi/cellsh.sdi
+++ sc/sdi/cellsh.sdi
-@@ -114,6 +114,8 @@ interface CellSelection
+@@ -115,6 +115,8 @@ interface CellSelection
SID_DETECTIVE_REFRESH [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DETECTIVE_MARK_PRED [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DETECTIVE_MARK_SUCC [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
@@ -53,10 +52,10 @@ index 957c3d1..c5677d0 100644
FID_INS_COLUMN [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
FID_INS_CELLSDOWN [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
-index dade68a..af97da7 100644
+index 0537507..e800849 100644
--- sc/sdi/scalc.sdi
+++ sc/sdi/scalc.sdi
-@@ -7876,6 +7876,57 @@ SfxVoidItem MarkDependents SID_DETECTIVE_MARK_SUCC
+@@ -7901,6 +7901,57 @@ SfxVoidItem MarkDependents SID_DETECTIVE_MARK_SUCC
ToolBoxConfig = FALSE,
GroupId = GID_OPTIONS;
]
@@ -115,7 +114,7 @@ index dade68a..af97da7 100644
SfxVoidItem SetTabBgColor FID_TAB_MENU_SET_TAB_BG_COLOR
(SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR)
diff --git sc/source/ui/inc/viewfunc.hxx sc/source/ui/inc/viewfunc.hxx
-index 8a5aeee..68113f1 100644
+index 6e9ec02..9558bc3 100644
--- sc/source/ui/inc/viewfunc.hxx
+++ sc/source/ui/inc/viewfunc.hxx
@@ -331,6 +331,8 @@ public:
@@ -128,10 +127,10 @@ index 8a5aeee..68113f1 100644
inline void HideNote() { ShowNote( false ); }
void EditNote();
diff --git sc/source/ui/src/globstr.src sc/source/ui/src/globstr.src
-index c3955f8..a022c66 100644
+index 5be3d92..271b910 100644
--- sc/source/ui/src/globstr.src
+++ sc/source/ui/src/globstr.src
-@@ -1742,5 +1742,13 @@ Resource RID_GLOBSTR
+@@ -1813,5 +1813,13 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "Because the current formula separator settings conflict with the locale, the formula separators have been reset to their default values.";
};
@@ -221,6 +220,3 @@ index ce62dd0..c63909e 100644
//---------------------------------------------------------------------------
void ScViewFunc::ShowNote( bool bShow )
---
-1.7.0.1
-
diff --git a/patches/dev300/calc-pdf-export-allow-filtered-range-sc.diff b/patches/dev300/calc-pdf-export-allow-filtered-range-sc.diff
index ac1c307..759c561 100644
--- a/patches/dev300/calc-pdf-export-allow-filtered-range-sc.diff
+++ b/patches/dev300/calc-pdf-export-allow-filtered-range-sc.diff
@@ -1,9 +1,8 @@
----
- sc/source/ui/unoobj/docuno.cxx | 11 ++++++++++-
- 1 files changed, 10 insertions(+), 1 deletions(-)
+ sc/source/ui/unoobj/docuno.cxx | 12 +++++++++++-
+ 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git sc/source/ui/unoobj/docuno.cxx sc/source/ui/unoobj/docuno.cxx
-index 96e582e..7dd774e 100644
+index fd60fdf..35092fd 100644
--- sc/source/ui/unoobj/docuno.cxx
+++ sc/source/ui/unoobj/docuno.cxx
@@ -52,6 +52,7 @@
@@ -14,16 +13,17 @@ index 96e582e..7dd774e 100644
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/sheet/XLabelRanges.hpp>
-@@ -104,6 +105,8 @@
- #endif
-
+@@ -106,6 +107,9 @@
+ #include <com/sun/star/document/XVbaEventsHelper.hpp>
+ #include <com/sun/star/document/VbaEventId.hpp>
using namespace com::sun::star;
+using ::rtl::OUString;
+using ::com::sun::star::uno::Reference;
++
+ using namespace com::sun::star::document::VbaEventId;
- //------------------------------------------------------------------------
-
-@@ -922,7 +925,13 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const uno::Any& aSelection,
+ #define SC_UNO_VBADOCOBJ "ThisVBADocObj" // perhaps we want to actually make this ThisWorkbook ?
+@@ -929,7 +933,13 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const uno::Any& aSelection,
ScPrintSelectionStatus aStatus;
String aPagesStr;
if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr ) )
@@ -38,6 +38,3 @@ index 96e582e..7dd774e 100644
// The same ScPrintFuncCache object in pPrintFuncCache is used as long as
// the same selection is used (aStatus) and the document isn't changed
---
-1.7.0.1
-
diff --git a/patches/dev300/calc-perf-import-dbf-sc.diff b/patches/dev300/calc-perf-import-dbf-sc.diff
index b2661ef..7295545 100644
--- a/patches/dev300/calc-perf-import-dbf-sc.diff
+++ b/patches/dev300/calc-perf-import-dbf-sc.diff
@@ -1,27 +1,25 @@
----
- sc/inc/column.hxx | 13 ++++-
- sc/inc/dbdocutl.hxx | 12 ++++-
- sc/inc/dociter.hxx | 39 ++++++++++++++
- sc/inc/docparam.hxx | 47 +++++++++++++++++
- sc/inc/document.hxx | 5 ++-
- sc/inc/table.hxx | 3 +-
- sc/source/core/data/column.cxx | 14 +++++-
- sc/source/core/data/column2.cxx | 50 ++++++++++++++----
- sc/source/core/data/column3.cxx | 2 +-
- sc/source/core/data/dbdocutl.cxx | 18 +++++--
- sc/source/core/data/dociter.cxx | 98 ++++++++++++++++++++++++++++++++++++
- sc/source/core/data/docparam.cxx | 39 ++++++++++++++
- sc/source/core/data/document.cxx | 10 ++--
- sc/source/core/data/makefile.mk | 2 +
- sc/source/core/data/table1.cxx | 4 +-
- sc/source/ui/docshell/dbdocimp.cxx | 3 +-
- sc/source/ui/docshell/docsh.cxx | 46 ++++++++++++----
- sc/source/ui/docshell/docsh8.cxx | 30 ++++++++++-
- sc/source/ui/docshell/impex.cxx | 4 +-
- sc/source/ui/inc/docsh.hxx | 4 +-
- 20 files changed, 393 insertions(+), 50 deletions(-)
- create mode 100644 sc/inc/docparam.hxx
- create mode 100644 sc/source/core/data/docparam.cxx
+ sc/inc/column.hxx | 13 ++++-
+ sc/inc/dbdocutl.hxx | 12 ++++-
+ sc/inc/dociter.hxx | 39 +++++++++++++
+ sc/inc/docparam.hxx | 47 ++++++++++++++++
+ sc/inc/document.hxx | 5 ++-
+ sc/inc/table.hxx | 4 +-
+ sc/source/core/data/column.cxx | 14 +++++-
+ sc/source/core/data/column2.cxx | 50 +++++++++++++----
+ sc/source/core/data/column3.cxx | 2 +-
+ sc/source/core/data/dbdocutl.cxx | 18 +++++--
+ sc/source/core/data/dociter.cxx | 98 ++++++++++++++++++++++++++++++++++
+ sc/source/core/data/docparam.cxx | 39 +++++++++++++
+ sc/source/core/data/document.cxx | 10 ++--
+ sc/source/core/data/makefile.mk | 2 +
+ sc/source/core/data/table1.cxx | 4 +-
+ sc/source/ui/docshell/.docsh.cxx.swp | Bin 16384 -> 16384 bytes
+ sc/source/ui/docshell/dbdocimp.cxx | 3 +-
+ sc/source/ui/docshell/docsh.cxx | 46 ++++++++++++----
+ sc/source/ui/docshell/docsh8.cxx | 30 ++++++++++-
+ sc/source/ui/docshell/impex.cxx | 4 +-
+ sc/source/ui/inc/docsh.hxx | 4 +-
+ 21 files changed, 394 insertions(+), 50 deletions(-)
diff --git sc/inc/column.hxx sc/inc/column.hxx
index 1968815..4e6dbf0 100644
@@ -206,10 +204,10 @@ index 0000000..e273c01
+
+#endif
diff --git sc/inc/document.hxx sc/inc/document.hxx
-index 21944f2..1609934 100644
+index a30cd61..4866f4b 100644
--- sc/inc/document.hxx
+++ sc/inc/document.hxx
-@@ -147,6 +147,8 @@ struct ScClipParam;
+@@ -148,6 +148,8 @@ struct ScClipParam;
struct ScClipRangeNameData;
class ScRowBreakIterator;
struct ScSetStringParam;
@@ -218,7 +216,7 @@ index 21944f2..1609934 100644
namespace com { namespace sun { namespace star {
namespace lang {
-@@ -247,6 +249,7 @@ friend class ScHorizontalAttrIterator;
+@@ -251,6 +253,7 @@ friend class ScHorizontalAttrIterator;
friend class ScDocAttrIterator;
friend class ScAttrRectIterator;
friend class ScDocShell;
@@ -226,7 +224,7 @@ index 21944f2..1609934 100644
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
-@@ -1291,7 +1294,7 @@ public:
+@@ -1308,7 +1311,7 @@ public:
const Fraction& rZoomX, const Fraction& rZoomY,
BOOL bFormula,
const ScMarkData* pMarkData = NULL,
@@ -236,18 +234,19 @@ index 21944f2..1609934 100644
OutputDevice* pDev,
double nPPTX, double nPPTY,
diff --git sc/inc/table.hxx sc/inc/table.hxx
-index f7edb92..007571d 100644
+index abd0a88..709000e 100644
--- sc/inc/table.hxx
+++ sc/inc/table.hxx
-@@ -85,6 +85,7 @@ class ScFlatUInt16RowSegments;
+@@ -85,6 +85,8 @@ class ScFlatUInt16RowSegments;
class ScFlatBoolRowSegments;
class ScFlatBoolColSegments;
struct ScSetStringParam;
+struct ScColWidthParam;
++struct ScColWidthParam;
- class ScTable
- {
-@@ -592,7 +593,7 @@ public:
+ typedef std::hash_map< ::rtl::OUString, rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > NameToNameMap;
+
+@@ -596,7 +598,7 @@ public:
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
BOOL bFormula, const ScMarkData* pMarkData,
@@ -371,7 +370,7 @@ index 77fcc57..83e25a7 100644
else
{
diff --git sc/source/core/data/column3.cxx sc/source/core/data/column3.cxx
-index ee7a8d7..a36159e 100644
+index e691b1f..3a4d2cd 100644
--- sc/source/core/data/column3.cxx
+++ sc/source/core/data/column3.cxx
@@ -65,7 +65,7 @@ extern const ScFormulaCell* pLastFormulaTreeTop; // in cellform.cxx
@@ -585,10 +584,10 @@ index 0000000..bb2e073
+ScColWidthParam::ScColWidthParam() :
+ mnMaxTextRow(-1), mnMaxTextLen(0), mbSimpleText(true) {}
diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
-index 40acf12..7727c09 100644
+index cc14a95..1d6048f 100644
--- sc/source/core/data/document.cxx
+++ sc/source/core/data/document.cxx
-@@ -3259,14 +3259,14 @@ ULONG ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
+@@ -3269,14 +3269,14 @@ ULONG ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
USHORT ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
@@ -667,10 +666,10 @@ index 60abe62..a446e17 100644
//
diff --git sc/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
-index 8d49218..7ffd8de 100644
+index ef33f94..7249979 100644
--- sc/source/ui/docshell/docsh.cxx
+++ sc/source/ui/docshell/docsh.cxx
-@@ -117,17 +117,25 @@
+@@ -117,9 +117,11 @@
#include "optsolver.hxx"
#include "sheetdata.hxx"
#include "tabprotection.hxx"
@@ -682,6 +681,8 @@ index 8d49218..7ffd8de 100644
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx>
+@@ -129,12 +131,18 @@
+ #include <com/sun/star/document/VbaEventId.hpp>
#include <basic/sbstar.hxx>
#include <basic/basmgr.hxx>
+
@@ -689,6 +690,9 @@ index 8d49218..7ffd8de 100644
+#include <boost/shared_ptr.hpp>
+
using namespace com::sun::star;
+ using namespace com::sun::star::document::VbaEventId;
+
+ using namespace com::sun::star;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
+using ::boost::shared_ptr;
@@ -696,7 +700,7 @@ index 8d49218..7ffd8de 100644
// STATIC DATA -----------------------------------------------------------
-@@ -904,12 +912,13 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
+@@ -984,12 +992,13 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
// ob nach dem Import optimale Spaltenbreiten gesetzt werden sollen
BOOL bSetColWidths = FALSE;
BOOL bSetSimpleTextColWidths = FALSE;
@@ -712,7 +716,7 @@ index 8d49218..7ffd8de 100644
aConvFilterName.Erase(); //@ #BugId 54198
// Alle Filter brauchen die komplette Datei am Stueck (nicht asynchron),
-@@ -1108,8 +1117,10 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
+@@ -1188,8 +1197,10 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_850 );
}
@@ -724,7 +728,7 @@ index 8d49218..7ffd8de 100644
if (eError != eERR_OK)
{
-@@ -1123,12 +1134,6 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
+@@ -1203,12 +1214,6 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
aColWidthRange.aStart.SetRow( 1 ); // Spaltenheader nicht
bSetColWidths = TRUE;
bSetSimpleTextColWidths = TRUE;
@@ -737,7 +741,7 @@ index 8d49218..7ffd8de 100644
}
else if (aFltName.EqualsAscii(pFilterDif))
{
-@@ -1342,9 +1347,12 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
+@@ -1422,9 +1427,12 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
for ( SCCOL nCol=0; nCol <= nEndCol; nCol++ )
{
@@ -751,7 +755,7 @@ index 8d49218..7ffd8de 100644
aDocument.SetColWidth( nCol, nTab,
nWidth + (USHORT)ScGlobal::nLastColWidthExtra );
}
-@@ -1356,11 +1364,25 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
+@@ -1436,11 +1444,25 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
// nPPTX, nPPTY, aZoom, aZoom, FALSE );
// }
}
@@ -881,10 +885,10 @@ index 01542c2..2ed233a 100644
delete pEnglishTransliteration;
diff --git sc/source/ui/inc/docsh.hxx sc/source/ui/inc/docsh.hxx
-index 8f62ca0..f2bc127 100644
+index bb17dc9..95a16ed 100644
--- sc/source/ui/inc/docsh.hxx
+++ sc/source/ui/inc/docsh.hxx
-@@ -68,6 +68,8 @@ class ScImportOptions;
+@@ -69,6 +69,8 @@ class ScImportOptions;
class ScDocShellModificator;
class ScOptSolverSave;
class ScSheetSaveData;
@@ -893,7 +897,7 @@ index 8f62ca0..f2bc127 100644
namespace sfx2 { class FileDialogHelper; }
struct DocShell_Impl;
-@@ -148,7 +150,7 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
+@@ -149,7 +151,7 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
SC_DLLPRIVATE SCTAB GetSaveTab();
SC_DLLPRIVATE ULONG DBaseImport( const String& rFullFileName, CharSet eCharSet,
@@ -902,6 +906,3 @@ index 8f62ca0..f2bc127 100644
SC_DLLPRIVATE ULONG DBaseExport( const String& rFullFileName, CharSet eCharSet,
BOOL& bHasMemo );
---
-1.7.0.1
-
diff --git a/patches/dev300/calc-perf-xls-import-cellstyles.diff b/patches/dev300/calc-perf-xls-import-cellstyles.diff
index a960a1b..9a39546 100644
--- a/patches/dev300/calc-perf-xls-import-cellstyles.diff
+++ b/patches/dev300/calc-perf-xls-import-cellstyles.diff
@@ -1,4 +1,3 @@
----
sc/inc/attarray.hxx | 1 +
sc/inc/column.hxx | 2 +
sc/inc/document.hxx | 4 +
@@ -44,7 +43,7 @@ index 4e6dbf0..bc4ea23 100644
void SetPatternArea( SCROW nStartRow, SCROW nEndRow,
const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE );
diff --git sc/inc/document.hxx sc/inc/document.hxx
-index 1609934..aba7bd6 100644
+index 4866f4b..bd8fb12 100644
--- sc/inc/document.hxx
+++ sc/inc/document.hxx
@@ -83,6 +83,7 @@ class Window;
@@ -55,7 +54,7 @@ index 1609934..aba7bd6 100644
class ScAutoFormatData;
class ScBaseCell;
class ScStringCell;
-@@ -1202,6 +1203,9 @@ public:
+@@ -1219,6 +1220,9 @@ public:
SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
const ScPatternAttr& rAttr );
@@ -66,10 +65,10 @@ index 1609934..aba7bd6 100644
const ScRange& rRange, const ScMarkData& rMark,
const ScPatternAttr& rPattern, short nNewType );
diff --git sc/inc/table.hxx sc/inc/table.hxx
-index 007571d..e972912 100644
+index 709000e..9a5725e 100644
--- sc/inc/table.hxx
+++ sc/inc/table.hxx
-@@ -531,6 +531,8 @@ public:
+@@ -536,6 +536,8 @@ public:
void ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = NULL );
@@ -120,10 +119,10 @@ index b35d019..99ceb84 100644
void ScColumn::ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
const ScPatternAttr& rPattern, short nNewType )
diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
-index 7727c09..736a3f2 100644
+index 1d6048f..44bbc66 100644
--- sc/source/core/data/document.cxx
+++ sc/source/core/data/document.cxx
-@@ -3876,6 +3876,14 @@ void ScDocument::ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
+@@ -3886,6 +3886,14 @@ void ScDocument::ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
pTab[nTab]->ApplyPatternArea( nStartCol, nStartRow, nEndCol, nEndRow, rAttr );
}
@@ -158,7 +157,7 @@ index e0a34fa..c003a14 100644
const ScPatternAttr& rPattern, short nNewType )
{
diff --git sc/source/filter/excel/xistyle.cxx sc/source/filter/excel/xistyle.cxx
-index b1ce3a0..9fa8158 100644
+index fdd537a..6e6ee3e 100644
--- sc/source/filter/excel/xistyle.cxx
+++ sc/source/filter/excel/xistyle.cxx
@@ -58,12 +58,18 @@
@@ -178,9 +177,9 @@ index b1ce3a0..9fa8158 100644
+
+using ::std::list;
- // PALETTE record - color information =========================================
-
-@@ -1181,26 +1187,60 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
+ #include <cppuhelper/implbase1.hxx>
+ #include <com/sun/star/container/XIndexAccess.hpp>
+@@ -1242,26 +1248,60 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
return *mpPattern;
}
@@ -254,7 +253,7 @@ index b1ce3a0..9fa8158 100644
}
}
-@@ -1446,18 +1486,6 @@ ScStyleSheet* XclImpXFBuffer::CreateStyleSheet( sal_uInt16 nXFIndex )
+@@ -1507,18 +1547,6 @@ ScStyleSheet* XclImpXFBuffer::CreateStyleSheet( sal_uInt16 nXFIndex )
return (aIt == maStylesByXf.end()) ? 0 : aIt->second->CreateStyleSheet();
}
@@ -273,7 +272,7 @@ index b1ce3a0..9fa8158 100644
// Buffer for XF indexes in cells =============================================
IMPL_FIXEDMEMPOOL_NEWDEL( XclImpXFRange, 100, 500 )
-@@ -1781,8 +1809,35 @@ void XclImpXFRangeBuffer::Finalize()
+@@ -1842,8 +1870,35 @@ void XclImpXFRangeBuffer::Finalize()
{
XclImpXFRangeColumn& rColumn = **aVIt;
SCCOL nScCol = static_cast< SCCOL >( aVIt - aVBeg );
@@ -311,7 +310,7 @@ index b1ce3a0..9fa8158 100644
}
diff --git sc/source/filter/inc/xistyle.hxx sc/source/filter/inc/xistyle.hxx
-index 1d3047e..724af90 100644
+index ba3448f..7e5857d 100644
--- sc/source/filter/inc/xistyle.hxx
+++ sc/source/filter/inc/xistyle.hxx
@@ -37,6 +37,7 @@
@@ -322,7 +321,7 @@ index 1d3047e..724af90 100644
/* ============================================================================
- Buffers for style records (PALETTE, FONT, FORMAT, XF)
-@@ -406,14 +407,9 @@ public:
+@@ -408,14 +409,9 @@ public:
@return A read-only reference to the item set stored internally. */
const ScPatternAttr& CreatePattern( bool bSkipPoolDefs = false );
@@ -340,7 +339,7 @@ index 1d3047e..724af90 100644
private:
void ReadXF2( XclImpStream& rStrm );
-@@ -509,14 +505,6 @@ public:
+@@ -511,14 +507,6 @@ public:
@return The pointer to the cell style sheet, or 0, if there is no style sheet. */
ScStyleSheet* CreateStyleSheet( sal_uInt16 nXFIndex );
@@ -355,6 +354,3 @@ index 1d3047e..724af90 100644
private:
typedef ScfDelList< XclImpStyle > XclImpStyleList;
typedef ::std::map< sal_uInt16, XclImpStyle* > XclImpStyleMap;
---
-1.7.0.1
-
diff --git a/patches/dev300/writer-doc-comparison.diff b/patches/dev300/writer-doc-comparison.diff
index 35f7a54..890f0f7 100644
--- a/patches/dev300/writer-doc-comparison.diff
+++ b/patches/dev300/writer-doc-comparison.diff
@@ -1,4 +1,3 @@
----
cui/source/options/treeopt.cxx | 1 +
cui/source/options/treeopt.src | 1 +
editeng/inc/editeng/rsiditem.hxx | 56 ++
@@ -52,7 +51,6 @@
xmloff/source/style/xmlbahdl.hxx | 12 +
xmloff/source/text/txtprmap.cxx | 8 +
52 files changed, 1862 insertions(+), 138 deletions(-)
- create mode 100644 editeng/inc/editeng/rsiditem.hxx
diff --git cui/source/options/treeopt.cxx cui/source/options/treeopt.cxx
index 07eba73..63f1254 100644
@@ -216,10 +214,10 @@ index 6b21048..c305a2c 100644
+ return new SvxRsidItem( rIn, Which() );
+}
diff --git officecfg/registry/schema/org/openoffice/Office/Writer.xcs officecfg/registry/schema/org/openoffice/Office/Writer.xcs
-index 9abada4..9379a1b 100644
+index de76f80..56abc26 100644
--- officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ officecfg/registry/schema/org/openoffice/Office/Writer.xcs
-@@ -2790,6 +2790,36 @@
+@@ -2801,6 +2801,36 @@
</prop>
</group>
</group>
@@ -293,10 +291,10 @@ index 894d622..cb3a5bc 100644
/*--------------------------------------------------------------------
Bereich: Druckoptionen
diff --git sw/inc/doc.hxx sw/inc/doc.hxx
-index d31dc4b..1cd4aea 100644
+index aa3428e..230bbe2 100644
--- sw/inc/doc.hxx
+++ sw/inc/doc.hxx
-@@ -437,6 +437,9 @@ private:
+@@ -440,6 +440,9 @@ private:
RedlineMode_t eRedlineMode; // aktueller Redline Modus
SwCharCompressType eChrCmprType; // for ASIAN: compress punctuation/kana
@@ -306,7 +304,7 @@ index d31dc4b..1cd4aea 100644
sal_Int32 mReferenceCount;
sal_Int32 mIdleBlockCount;
sal_Int8 nLockExpFld; // Wenn != 0 hat UpdateExpFlds() keine Wirkung
-@@ -756,6 +759,10 @@ public:
+@@ -759,6 +762,10 @@ public:
virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags eMode );
virtual SwCharCompressType getCharacterCompressionType() const;
virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType );
@@ -317,7 +315,7 @@ index d31dc4b..1cd4aea 100644
/** IDocumentDeviceAccess
*/
-@@ -913,6 +920,9 @@ public:
+@@ -916,6 +923,9 @@ public:
virtual bool Overwrite(const SwPaM &rRg, const String& rStr);
virtual bool InsertString(const SwPaM &rRg, const String&,
const enum InsertFlags nInsertMode = INS_EMPTYEXPAND );
@@ -682,17 +680,17 @@ index 0fe4953..a3b4172 100644
SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, BOOL bChkTbl );
virtual ~SwUndoSplitNode();
diff --git sw/inc/unoprnms.hxx sw/inc/unoprnms.hxx
-index 374753b..f1a814a 100644
+index 2dfc961..d33c848 100644
--- sw/inc/unoprnms.hxx
+++ sw/inc/unoprnms.hxx
-@@ -806,7 +806,9 @@ enum SwPropNameIds
- // <--
- /* 0738 */ UNO_NAME_META, // #i91565#
- /* 0739 */ UNO_NAME_NESTED_TEXT_CONTENT, // #i109601#
--/* 0740 */ SW_PROPNAME_END
-+/* 0740 */ UNO_NAME_RSID,
-+/* 0741 */ UNO_NAME_PARRSID,
-+/* 0742 */ SW_PROPNAME_END
+@@ -808,7 +808,9 @@ enum SwPropNameIds
+ /* 0739 */ UNO_NAME_IS_TEMPLATE,
+ /* 0740 */ UNO_NAME_VBA_DOCOBJ,
+ /* 0741 */ UNO_NAME_NESTED_TEXT_CONTENT, // #i109601#
+-/* 0742 */ SW_PROPNAME_END
++/* 0742 */ UNO_NAME_RSID,
++/* 0743 */ UNO_NAME_PARRSID,
++/* 0744 */ SW_PROPNAME_END
};
@@ -753,7 +751,7 @@ index b5a2895..a887264 100644
// --> OD 2008-02-19 #refactorlists#
aAttrTab[ RES_PARATR_LIST_ID - POOLATTR_BEGIN ] = new SfxStringItem( RES_PARATR_LIST_ID, aEmptyStr );
diff --git sw/source/core/doc/doc.cxx sw/source/core/doc/doc.cxx
-index eb5bb74..0895903 100755
+index c34414e..6645b6b 100755
--- sw/source/core/doc/doc.cxx
+++ sw/source/core/doc/doc.cxx
@@ -33,6 +33,8 @@
@@ -773,7 +771,7 @@ index eb5bb74..0895903 100755
#include <unotools/charclass.hxx>
#include <unotools/localedatawrapper.hxx>
-@@ -424,6 +427,33 @@ void SwDoc::setLinkUpdateMode( /*[in]*/sal_uInt16 eMode )
+@@ -425,6 +428,33 @@ void SwDoc::setLinkUpdateMode( /*[in]*/sal_uInt16 eMode )
nLinkUpdMode = eMode;
}
@@ -807,7 +805,7 @@ index eb5bb74..0895903 100755
SwFldUpdateFlags SwDoc::getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const
{
SwFldUpdateFlags eRet = eFldUpdMode;
-@@ -688,6 +718,15 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
+@@ -689,6 +719,15 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
}
}
@@ -823,7 +821,7 @@ index eb5bb74..0895903 100755
//JP 28.01.97: Sonderfall fuer SplitNode am Tabellenanfang:
// steht die am Doc/Fly/Footer/..-Anfang oder direkt
// hinter einer Tabelle, dann fuege davor
-@@ -1029,6 +1068,41 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName,
+@@ -1030,6 +1069,41 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName,
pFrmFmt );
}
@@ -2120,7 +2118,7 @@ index e304bd4..637d6d2 100644
}
diff --git sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unomap.cxx
-index f5aee26..7a1a8c5 100644
+index f4df212..7a069ba 100644
--- sw/source/core/unocore/unomap.cxx
+++ sw/source/core/unocore/unomap.cxx
@@ -92,6 +92,7 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
@@ -2140,15 +2138,15 @@ index f5aee26..7a1a8c5 100644
{ SW_PROP_NMID(UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS), RES_PARATR_HYPHENZONE, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_LEAD }, \
{ SW_PROP_NMID(UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS), RES_PARATR_HYPHENZONE, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_HYPHEN_MIN_TRAIL }, \
diff --git sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoprnms.cxx
-index 228b489..4781282 100644
+index 6a98b97..624a540 100644
--- sw/source/core/unocore/unoprnms.cxx
+++ sw/source/core/unocore/unoprnms.cxx
-@@ -779,6 +779,8 @@ const SwPropNameTab aPropNameTab = {
- /* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")},
- /* 0738 UNO_NAME_META */ {MAP_CHAR_LEN("InContentMetadata")},
- /* 0739 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
-+/* 0740 UNO_NAME_RSID */ {MAP_CHAR_LEN("Rsid")},
-+/* 0741 UNO_NAME_PARRSID */ {MAP_CHAR_LEN("ParRsid")},
+@@ -782,6 +782,8 @@ const SwPropNameTab aPropNameTab = {
+ /* 0740 UNO_NAME_VBA_DOCOBJ */ {MAP_CHAR_LEN("ThisVBADocObj")},
+
+ /* 0741 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
++/* 0742 UNO_NAME_RSID */ {MAP_CHAR_LEN("Rsid")},
++/* 0743 UNO_NAME_PARRSID */ {MAP_CHAR_LEN("ParRsid")},
};
const SwPropNameLen& SwGetPropName( USHORT nId )
@@ -2237,10 +2235,10 @@ index 9f3008c..23f9b14 100644
case RID_SW_TP_OPTCOMPATIBILITY_PAGE:
case RID_SW_TP_MAILCONFIG:
diff --git sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh.cxx
-index 22a8213..b41da1b 100644
+index 0bb4afe..b126c46 100644
--- sw/source/ui/app/docsh.cxx
+++ sw/source/ui/app/docsh.cxx
-@@ -539,6 +539,9 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
+@@ -529,6 +529,9 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
pDoc->SetOle2Link( aOldOLELnk );
SW_MOD()->SetEmbeddedLoadSave( FALSE );
@@ -2785,10 +2783,10 @@ index 70690bc..fc7a0c9 100644
{
sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::PROTECT_FORM);
diff --git xmloff/inc/xmloff/xmltoken.hxx xmloff/inc/xmloff/xmltoken.hxx
-index 24d395a..e1b0475 100644
+index 9bb12f7..c61eac4 100644
--- xmloff/inc/xmloff/xmltoken.hxx
+++ xmloff/inc/xmloff/xmltoken.hxx
-@@ -1489,6 +1489,8 @@ namespace xmloff { namespace token {
+@@ -1492,6 +1492,8 @@ namespace xmloff { namespace token {
XML_ROW_HEIGHT,
XML_ROW_NUMBER,
XML_ROWS,
@@ -2829,10 +2827,10 @@ index ca22ef8..7687722 100644
static void convertNumber( ::rtl::OUStringBuffer& rBuffer,
sal_Int32 nNumber );
diff --git xmloff/source/core/xmltoken.cxx xmloff/source/core/xmltoken.cxx
-index 5bd988b..0e7b9b1 100644
+index f9354a7..c183083 100644
--- xmloff/source/core/xmltoken.cxx
+++ xmloff/source/core/xmltoken.cxx
-@@ -1497,6 +1497,8 @@ namespace xmloff { namespace token {
+@@ -1499,6 +1499,8 @@ namespace xmloff { namespace token {
TOKEN( "row-height", XML_ROW_HEIGHT ),
TOKEN( "row-number", XML_ROW_NUMBER ),
TOKEN( "rows", XML_ROWS ),
@@ -2996,6 +2994,3 @@ index 87e8bf1..422f82c 100644
// RES_CHRATR_WORDLINEMODE
MT_E( "CharWordMode", STYLE, TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
MT_E( "CharWordMode", STYLE, TEXT_OVERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
---
-1.7.0.1
-
diff --git a/patches/vba/cws-vbasupportdev300_m83.diff b/patches/vba/cws-vbasupportdev300_m83.diff
new file mode 100644
index 0000000..c456c3e
--- /dev/null
+++ b/patches/vba/cws-vbasupportdev300_m83.diff
@@ -0,0 +1,50379 @@
+diff --git basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.cxx
+index 1c9e37a..8d474c6 100644
+--- basctl/source/basicide/baside2.cxx
++++ basctl/source/basicide/baside2.cxx
+@@ -367,8 +367,9 @@ BOOL ModulWindow::BasicExecute()
+ }
+ else if ( !pMethod || ( nStart < nCurMethodStart ) )
+ {
++ nCurMethodStart = nStart;
+ pMethod = pM;
+- nCurMethodStart = nStart;
++ break;
+ }
+ }
+ if ( !pMethod )
+diff --git basctl/source/basicide/baside3.cxx basctl/source/basicide/baside3.cxx
+index e307720..fbd83c8 100644
+--- basctl/source/basicide/baside3.cxx
++++ basctl/source/basicide/baside3.cxx
+@@ -82,6 +82,7 @@
+ #include <com/sun/star/resource/XStringResourceResolver.hpp>
+ #include <com/sun/star/resource/StringResourceWithLocation.hpp>
+ #include <com/sun/star/task/XInteractionHandler.hpp>
++#include <com/sun/star/script/XVBACompat.hpp>
+
+ using namespace comphelper;
+ using namespace ::com::sun::star;
+@@ -112,8 +113,16 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St
+ {
+ InitSettings( TRUE, TRUE, TRUE );
+
+- pEditor = new DlgEditor();
++ pEditor = new DlgEditor( rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
+ pEditor->SetWindow( this );
++ // set vba mode on DialogModel ( allows it to work in 100thmm instead of MAP_APPFONT )
++ if ( rDocument.isDocument() && rDocument.getDocument().is() )
++ {
++ uno::Reference< script::XVBACompat > xDocVBAMode( rDocument.getLibraryContainer( E_SCRIPTS ), uno::UNO_QUERY );
++ uno::Reference< script::XVBACompat > xDialogModelVBAMode( xDialogModel, uno::UNO_QUERY );
++ if ( xDocVBAMode.is() && xDialogModelVBAMode.is() )
++ xDialogModelVBAMode->setVBACompatModeOn( xDocVBAMode->getVBACompatModeOn() );
++ }
+ pEditor->SetDialog( xDialogModel );
+
+ // Undo einrichten
+@@ -728,7 +737,7 @@ BOOL DialogWindow::SaveDialog()
+ Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+- Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext );
++ Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() );
+ Reference< XInputStream > xInput( xISP->createInputStream() );
+
+ Reference< XSimpleFileAccess > xSFI( xMSF->createInstance
+@@ -1010,7 +1019,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
+ Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+- ::xmlscript::importDialogModel( xInput, xDialogModel, xContext );
++ ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
+
+ String aXmlDlgName;
+ Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
+@@ -1236,7 +1245,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
+ }
+ }
+
+- Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext );
++ Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
+ bool bSuccess = rDocument.insertDialog( aLibName, aNewDlgName, xISP );
+ if( bSuccess )
+ {
+@@ -1346,7 +1355,7 @@ void DialogWindow::StoreData()
+ Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+- Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext );
++ Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() );
+ xLib->replaceByName( ::rtl::OUString( GetName() ), makeAny( xISP ) );
+ }
+ }
+diff --git basctl/source/basicide/basides3.cxx basctl/source/basicide/basides3.cxx
+index 1b71e43..6ec1dcd 100644
+--- basctl/source/basicide/basides3.cxx
++++ basctl/source/basicide/basides3.cxx
+@@ -96,7 +96,7 @@ DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, cons
+ Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+- ::xmlscript::importDialogModel( xInput, xDialogModel, xContext );
++ ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
+ LocalizationMgr::setStringResourceAtDialog( rDocument, rLibName, aDlgName, xDialogModel );
+
+ // new dialog window
+diff --git basctl/source/basicide/moduldlg.cxx basctl/source/basicide/moduldlg.cxx
+index e2a2377..b00acdd 100644
+--- basctl/source/basicide/moduldlg.cxx
++++ basctl/source/basicide/moduldlg.cxx
+@@ -312,7 +312,7 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >&
+ Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+- ::xmlscript::importDialogModel( xInput, xDialogModel, xContext );
++ ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rSourceDoc.isDocument() ? rSourceDoc.getDocument() : Reference< frame::XModel >() );
+
+ if( xDialogModel.is() )
+ {
+@@ -329,7 +329,7 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >&
+ {
+ LocalizationMgr::setResourceIDsForDialog( xDialogModel, xDestMgr );
+ }
+- io_xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext );
++ io_xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, rDestDoc.isDocument() ? rDestDoc.getDocument() : Reference< frame::XModel >() );
+ }
+ }
+
+diff --git basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/scriptdocument.cxx
+index b85ac92..faf47ad 100644
+--- basctl/source/basicide/scriptdocument.cxx
++++ basctl/source/basicide/scriptdocument.cxx
+@@ -453,14 +453,12 @@ namespace basctl
+ bool ScriptDocument_Impl::isInVBAMode() const
+ {
+ bool bResult = false;
+-#ifdef FUTURE_VBA_CWS
+ if ( !isApplication() )
+ {
+ Reference< XVBACompat > xVBACompat( getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
+ if ( xVBACompat.is() )
+ bResult = xVBACompat->getVBACompatModeOn();
+ }
+-#endif
+ return bResult;
+ }
+
+@@ -678,7 +676,7 @@ namespace basctl
+ if ( !_rxExistingDialogModel.is() )
+ {
+ Reference< XInputStream > xInput( xISP->createInputStream(), UNO_QUERY_THROW );
+- ::xmlscript::importDialogModel( xInput, xDialogModel, aContext.getUNOContext() );
++ ::xmlscript::importDialogModel( xInput, xDialogModel, aContext.getUNOContext(), isDocument() ? getDocument() : Reference< XModel >() );
+ }
+
+ // set new name as property
+@@ -686,12 +684,12 @@ namespace basctl
+ xDlgPSet->setPropertyValue( DLGED_PROP_NAME, makeAny( _rNewName ) );
+
+ // export dialog model
+- xISP = ::xmlscript::exportDialogModel( xDialogModel, aContext.getUNOContext() );
++ xISP = ::xmlscript::exportDialogModel( xDialogModel, aContext.getUNOContext(), isDocument() ? getDocument() : Reference< XModel >() );
+ aElement <<= xISP;
+ }
+
+ // insert element by new name in container
+- else if ( _eType == E_SCRIPTS )
++ if ( _eType == E_SCRIPTS )
+ {
+ Reference< XVBAModuleInfo > xVBAModuleInfo( xLib, UNO_QUERY );
+ if ( xVBAModuleInfo->hasModuleInfo( _rOldName ) )
+@@ -798,7 +796,7 @@ namespace basctl
+ xDlgPSet->setPropertyValue( DLGED_PROP_NAME, makeAny( _rDialogName ) );
+
+ // export dialog model
+- _out_rDialogProvider = ::xmlscript::exportDialogModel( xDialogModel, aContext.getUNOContext() );
++ _out_rDialogProvider = ::xmlscript::exportDialogModel( xDialogModel, aContext.getUNOContext(), isDocument() ? getDocument() : Reference< XModel >() );
+
+ // insert dialog into library
+ xLib->insertByName( _rDialogName, makeAny( _out_rDialogProvider ) );
+diff --git basctl/source/dlged/dlged.cxx basctl/source/dlged/dlged.cxx
+index 04bc7e5..020f934 100644
+--- basctl/source/dlged/dlged.cxx
++++ basctl/source/dlged/dlged.cxx
+@@ -205,7 +205,7 @@ BOOL DlgEditor::RemarkDialog()
+
+ //----------------------------------------------------------------------------
+
+-DlgEditor::DlgEditor()
++DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel )
+ :pHScroll(NULL)
+ ,pVScroll(NULL)
+ ,pDlgEdModel(NULL)
+@@ -227,6 +227,7 @@ DlgEditor::DlgEditor()
+ ,bCreateOK(TRUE)
+ ,bDialogModelChanged(FALSE)
+ ,mnPaintGuard(0)
++ ,m_xDocument( xModel )
+ {
+ pDlgEdModel = new DlgEdModel();
+ pDlgEdModel->GetItemPool().FreezeIdRanges();
+@@ -835,7 +836,7 @@ void DlgEditor::Copy()
+ Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+- Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xClipDialogModel, xContext );
++ Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xClipDialogModel, xContext, m_xDocument );
+ Reference< XInputStream > xStream( xISP->createInputStream() );
+ Sequence< sal_Int8 > DialogModelBytes;
+ implCopyStreamToByteSequence( xStream, DialogModelBytes );
+@@ -868,7 +869,7 @@ void DlgEditor::Copy()
+ uno::Reference< resource::XStringResourceManager >
+ xStringResourceManager( xStringResourcePersistence, uno::UNO_QUERY );
+ LocalizationMgr::resetResourceForDialog( xClipDialogModel, xStringResourceManager );
+- Reference< XInputStreamProvider > xISP2 = ::xmlscript::exportDialogModel( xClipDialogModel, xContext );
++ Reference< XInputStreamProvider > xISP2 = ::xmlscript::exportDialogModel( xClipDialogModel, xContext, m_xDocument );
+ Reference< XInputStream > xStream2( xISP2->createInputStream() );
+ Sequence< sal_Int8 > NoResourceDialogModelBytes;
+ implCopyStreamToByteSequence( xStream2, NoResourceDialogModelBytes );
+@@ -1014,7 +1015,7 @@ void DlgEditor::Paste()
+ Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+- ::xmlscript::importDialogModel( ::xmlscript::createInputStream( *((::rtl::ByteSequence*)(&DialogModelBytes)) ) , xClipDialogModel, xContext );
++ ::xmlscript::importDialogModel( ::xmlscript::createInputStream( *((::rtl::ByteSequence*)(&DialogModelBytes)) ) , xClipDialogModel, xContext, m_xDocument );
+ }
+
+ // get control models from clipboard dialog model
+diff --git basctl/source/dlged/dlgedobj.cxx basctl/source/dlged/dlgedobj.cxx
+index 50b54c6..a56985e 100644
+--- basctl/source/dlged/dlgedobj.cxx
++++ basctl/source/dlged/dlgedobj.cxx
+@@ -74,6 +74,22 @@ TYPEINIT1(DlgEdObj, SdrUnoObj);
+ DBG_NAME(DlgEdObj);
+
+ //----------------------------------------------------------------------------
++MapMode lcl_getMapModeForForm( DlgEdForm* pForm )
++{
++ MapMode aMode( MAP_APPFONT ); //Default
++ try
++ {
++ uno::Reference< beans::XPropertySet > xProps( pForm ? pForm->GetUnoControlModel() : NULL, uno::UNO_QUERY_THROW );
++ sal_Bool bVBAForm = sal_False;
++ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("VBAForm") ) ) >>= bVBAForm;
++ if ( bVBAForm )
++ aMode = MapMode( MAP_100TH_MM );
++ }
++ catch ( Exception& )
++ {
++ }
++ return aMode;
++}
+
+ DlgEdObj::DlgEdObj()
+ :SdrUnoObj(String(), sal_False)
+@@ -194,8 +210,9 @@ bool DlgEdObj::TransformSdrToControlCoordinates(
+ }
+
+ // convert pixel to logic units
+- aPos = pDevice->PixelToLogic( aPos, MapMode( MAP_APPFONT ) );
+- aSize = pDevice->PixelToLogic( aSize, MapMode( MAP_APPFONT ) );
++ MapMode aConvMode = lcl_getMapModeForForm( pForm );
++ aPos = pDevice->PixelToLogic( aPos, aConvMode );
++ aSize = pDevice->PixelToLogic( aSize, aConvMode );
+
+ // set out parameters
+ nXOut = aPos.Width();
+@@ -242,10 +259,10 @@ bool DlgEdObj::TransformSdrToFormCoordinates(
+ aSize.Width() -= aDeviceInfo.LeftInset + aDeviceInfo.RightInset;
+ aSize.Height() -= aDeviceInfo.TopInset + aDeviceInfo.BottomInset;
+ }
+-
++ MapMode aConvMode = lcl_getMapModeForForm( pForm );
+ // convert pixel to logic units
+- aPos = pDevice->PixelToLogic( aPos, MapMode( MAP_APPFONT ) );
+- aSize = pDevice->PixelToLogic( aSize, MapMode( MAP_APPFONT ) );
++ aPos = pDevice->PixelToLogic( aPos, aConvMode );
++ aSize = pDevice->PixelToLogic( aSize, aConvMode );
+
+ // set out parameters
+ nXOut = aPos.Width();
+@@ -287,9 +304,10 @@ bool DlgEdObj::TransformControlToSdrCoordinates(
+ DBG_ASSERT( pDevice, "DlgEdObj::TransformControlToSdrCoordinates: missing default device!" );
+ if ( !pDevice )
+ return false;
+- aPos = pDevice->LogicToPixel( aPos, MapMode( MAP_APPFONT ) );
+- aSize = pDevice->LogicToPixel( aSize, MapMode( MAP_APPFONT ) );
+- aFormPos = pDevice->LogicToPixel( aFormPos, MapMode( MAP_APPFONT ) );
++ MapMode aConvMode = lcl_getMapModeForForm( pForm );
++ aPos = pDevice->LogicToPixel( aPos, aConvMode );
++ aSize = pDevice->LogicToPixel( aSize, aConvMode );
++ aFormPos = pDevice->LogicToPixel( aFormPos, aConvMode );
+
+ // add form position
+ aPos.Width() += aFormPos.Width();
+@@ -333,14 +351,16 @@ bool DlgEdObj::TransformFormToSdrCoordinates(
+ DBG_ASSERT( pDevice, "DlgEdObj::TransformFormToSdrCoordinates: missing default device!" );
+ if ( !pDevice )
+ return false;
+- aPos = pDevice->LogicToPixel( aPos, MapMode( MAP_APPFONT ) );
+- aSize = pDevice->LogicToPixel( aSize, MapMode( MAP_APPFONT ) );
+
+ // take window borders into account
+ DlgEdForm* pForm = NULL;
+ if ( !lcl_getDlgEdForm( this, pForm ) )
+ return false;
+
++ MapMode aConvMode = lcl_getMapModeForForm( pForm );
++ aPos = pDevice->LogicToPixel( aPos, aConvMode );
++ aSize = pDevice->LogicToPixel( aSize, aConvMode );
++
+ // take window borders into account
+ Reference< beans::XPropertySet > xPSetForm( pForm->GetUnoControlModel(), UNO_QUERY );
+ DBG_ASSERT( xPSetForm.is(), "DlgEdObj::TransformFormToSdrCoordinates: no form property set!" );
+diff --git basctl/source/inc/dlged.hxx basctl/source/inc/dlged.hxx
+index a8adcda..a2ea57c 100644
+--- basctl/source/inc/dlged.hxx
++++ basctl/source/inc/dlged.hxx
+@@ -32,6 +32,7 @@
+ #include <com/sun/star/awt/XControlContainer.hpp>
+ #include <com/sun/star/datatransfer/DataFlavor.hpp>
+ #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
++#include <com/sun/star/frame/XModel.hpp>
+ #include <tools/link.hxx>
+ #include <tools/gen.hxx>
+ #include <vcl/timer.hxx>
+@@ -128,9 +129,11 @@ protected:
+ BOOL bDialogModelChanged;
+ Timer aMarkTimer;
+ long mnPaintGuard;
++ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument;
+
++ DlgEditor(); // not implemented
+ public:
+- DlgEditor();
++ DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
+ ~DlgEditor();
+
+ void SetWindow( Window* pWindow );
+diff --git basic/inc/basic/basmgr.hxx basic/inc/basic/basmgr.hxx
+index 886aa7f..58cf623 100644
+--- basic/inc/basic/basmgr.hxx
++++ basic/inc/basic/basmgr.hxx
+@@ -236,7 +236,7 @@ public:
+ takes the names of modules whose size exceeds the legacy limit
+ */
+ bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& _out_rModuleNames );
+-
++ bool HasExeCode( const String& );
+ private:
+ BOOL IsReference( USHORT nLib );
+
+diff --git basic/inc/basic/sbmeth.hxx basic/inc/basic/sbmeth.hxx
+index 38319ac..89f88da 100644
+--- basic/inc/basic/sbmeth.hxx
++++ basic/inc/basic/sbmeth.hxx
+@@ -46,6 +46,7 @@ class SbMethod : public SbxMethod
+ friend class SbIfaceMapperMethod;
+
+ SbMethodImpl* mpSbMethodImpl; // Impl data
++ SbxVariable* mCaller; // caller
+ SbModule* pMod;
+ USHORT nDebugFlags;
+ USHORT nLine1, nLine2;
+@@ -72,7 +73,7 @@ public:
+ void GetLineRange( USHORT&, USHORT& );
+
+ // Schnittstelle zum Ausfuehren einer Methode aus den Applikationen
+- virtual ErrCode Call( SbxValue* pRet = NULL );
++ virtual ErrCode Call( SbxValue* pRet = NULL, SbxVariable* pCaller = NULL );
+ virtual void Broadcast( ULONG nHintId );
+ };
+
+diff --git basic/inc/basic/sbmod.hxx basic/inc/basic/sbmod.hxx
+index 9681149..59017f2 100644
+--- basic/inc/basic/sbmod.hxx
++++ basic/inc/basic/sbmod.hxx
+@@ -28,10 +28,12 @@
+ #ifndef _SB_SBMOD_HXX
+ #define _SB_SBMOD_HXX
+
++#include <com/sun/star/script/XInvocation.hpp>
+ #include <basic/sbdef.hxx>
+ #include <basic/sbxobj.hxx>
+ #include <basic/sbxdef.hxx>
+ #include <rtl/ustring.hxx>
++#include <vector>
+
+ class SbMethod;
+ class SbProperty;
+@@ -54,8 +56,12 @@ class SbModule : public SbxObject
+ friend class SbClassModuleObject;
+
+ SbModuleImpl* mpSbModuleImpl; // Impl data
++ std::vector< String > mModuleVariableNames;
++ SbModule();
++ SbModule(const SbModule&);
+
+ protected:
++ com::sun::star::uno::Reference< com::sun::star::script::XInvocation > mxWrapper;
+ ::rtl::OUString aOUSource;
+ String aComment;
+ SbiImage* pImage; // the Image
+@@ -125,11 +131,15 @@ public:
+ BOOL LoadBinaryData( SvStream& );
+ BOOL ExceedsLegacyModuleSize();
+ void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const;
++ bool HasExeCode();
+ BOOL IsVBACompat();
+ void SetVBACompat( BOOL bCompat );
+ INT32 GetModuleType() { return mnType; }
+ void SetModuleType( INT32 nType ) { mnType = nType; }
+ bool GetIsProxyModule() { return bIsProxyModule; }
++ void AddVarName( const String& aName );
++ void RemoveVars();
++ ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > GetUnoModule();
+ };
+
+ #ifndef __SB_SBMODULEREF_HXX
+diff --git basic/inc/basic/sbuno.hxx basic/inc/basic/sbuno.hxx
+index 27fe320..c5e0209 100644
+--- basic/inc/basic/sbuno.hxx
++++ basic/inc/basic/sbuno.hxx
+@@ -38,6 +38,7 @@ SbxObjectRef GetSbUnoObject( const String& aName, const com::sun::star::uno::Any
+
+ // Force creation of all properties for debugging
+ void createAllObjectProperties( SbxObject* pObj );
++void SetSbUnoObjectDfltPropName( SbxObject* pObj );
+
+ ::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
+
+diff --git basic/source/basmgr/basmgr.cxx basic/source/basmgr/basmgr.cxx
+index a18b9bb..bebcc4f 100644
+--- basic/source/basmgr/basmgr.cxx
++++ basic/source/basmgr/basmgr.cxx
+@@ -1139,6 +1139,25 @@ void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager )
+ _rpManager = NULL;
+ }
+
++
++bool BasicManager::HasExeCode( const String& sLib )
++{
++ StarBASIC* pLib = GetLib(sLib);
++ if ( pLib )
++ {
++ SbxArray* pMods = pLib->GetModules();
++ USHORT nMods = pMods ? pMods->Count() : 0;
++ for( USHORT i = 0; i < nMods; i++ )
++ {
++ SbModule* p = (SbModule*) pMods->Get( i );
++ if ( p )
++ if ( p->HasExeCode() )
++ return true;
++ }
++ }
++ return false;
++}
++
+ void BasicManager::Init()
+ {
+ DBG_CHKTHIS( BasicManager, 0 );
+diff --git basic/source/classes/sb.cxx basic/source/classes/sb.cxx
+index a7d1c50..0131057 100755
+--- basic/source/classes/sb.cxx
++++ basic/source/classes/sb.cxx
+@@ -531,72 +531,7 @@ SbClassModuleObject::~SbClassModuleObject()
+ void SbClassModuleObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType )
+ {
+- bool bDone = false;
+-
+- const SbxHint* pHint = PTR_CAST(SbxHint,&rHint);
+- if( pHint )
+- {
+- SbxVariable* pVar = pHint->GetVar();
+- SbProcedureProperty* pProcProperty = PTR_CAST( SbProcedureProperty, pVar );
+- if( pProcProperty )
+- {
+- bDone = true;
+-
+- if( pHint->GetId() == SBX_HINT_DATAWANTED )
+- {
+- String aProcName;
+- aProcName.AppendAscii( "Property Get " );
+- aProcName += pProcProperty->GetName();
+-
+- SbxVariable* pMeth = Find( aProcName, SbxCLASS_METHOD );
+- if( pMeth )
+- {
+- SbxValues aVals;
+- aVals.eType = SbxVARIANT;
+- pMeth->Get( aVals );
+- pVar->Put( aVals );
+- }
+- }
+- else if( pHint->GetId() == SBX_HINT_DATACHANGED )
+- {
+- SbxVariable* pMeth = NULL;
+-
+- bool bSet = pProcProperty->isSet();
+- if( bSet )
+- {
+- pProcProperty->setSet( false );
+-
+- String aProcName;
+- aProcName.AppendAscii( "Property Set " );
+- aProcName += pProcProperty->GetName();
+- pMeth = Find( aProcName, SbxCLASS_METHOD );
+- }
+- if( !pMeth ) // Let
+- {
+- String aProcName;
+- aProcName.AppendAscii( "Property Let " );
+- aProcName += pProcProperty->GetName();
+- pMeth = Find( aProcName, SbxCLASS_METHOD );
+- }
+-
+- if( pMeth )
+- {
+- // Setup parameters
+- SbxArrayRef xArray = new SbxArray;
+- xArray->Put( pMeth, 0 ); // Method as parameter 0
+- xArray->Put( pVar, 1 );
+- pMeth->SetParameters( xArray );
+-
+- SbxValues aVals;
+- pMeth->Get( aVals );
+- pMeth->SetParameters( NULL );
+- }
+- }
+- }
+- }
+-
+- if( !bDone )
+- SbModule::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
++ SbModule::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
+ }
+
+ SbxVariable* SbClassModuleObject::Find( const XubString& rName, SbxClassType t )
+@@ -1022,7 +957,6 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
+ INT32 nType = p->GetModuleType();
+ if ( nType == ModuleType::DOCUMENT || nType == ModuleType::FORM )
+ continue;
+-
+ // otherwise check if the element is available
+ // unset GBLSEARCH-Flag (due to Rekursion)
+ USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
+diff --git basic/source/classes/sbunoobj.cxx basic/source/classes/sbunoobj.cxx
+index f80e5e0..907474d 100644
+--- basic/source/classes/sbunoobj.cxx
++++ basic/source/classes/sbunoobj.cxx
+@@ -60,6 +60,7 @@
+ #include <com/sun/star/script/XInvocationAdapterFactory.hpp>
+ #include <com/sun/star/script/XTypeConverter.hpp>
+ #include <com/sun/star/script/XDefaultProperty.hpp>
++#include <com/sun/star/script/XDefaultMethod.hpp>
+ #include <com/sun/star/container/XNameAccess.hpp>
+ #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
+ #include <com/sun/star/reflection/XIdlArray.hpp>
+@@ -70,7 +71,7 @@
+ #include <com/sun/star/bridge/oleautomation/Date.hpp>
+ #include <com/sun/star/bridge/oleautomation/Decimal.hpp>
+ #include <com/sun/star/bridge/oleautomation/Currency.hpp>
+-
++#include <com/sun/star/script/XAutomationInvocation.hpp>
+
+ using com::sun::star::uno::Reference;
+ using namespace com::sun::star::uno;
+@@ -156,6 +157,21 @@ SbxVariable* getDefaultProp( SbxVariable* pRef )
+ return pDefaultProp;
+ }
+
++void SetSbUnoObjectDfltPropName( SbxObject* pObj )
++{
++ SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*) pObj);
++ if ( pUnoObj )
++ {
++ String sDfltPropName;
++
++ if ( SbUnoObject::getDefaultPropName( pUnoObj, sDfltPropName ) )
++ {
++ OSL_TRACE("SetSbUnoObjectDfltPropName setting dflt prop for %s", rtl::OUStringToOString( pObj->GetName(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ pUnoObj->SetDfltProperty( sDfltPropName );
++ }
++ }
++}
++
+ Reference< XComponentContext > getComponentContext_Impl( void )
+ {
+ static Reference< XComponentContext > xContext;
+@@ -452,6 +468,32 @@ void implHandleWrappedTargetException( const Any& _rWrappedTargetException )
+ SbError nError( ERRCODE_BASIC_EXCEPTION );
+ ::rtl::OUStringBuffer aMessageBuf;
+
++ // Add for VBA, to get the correct error code and message.
++ if ( SbiRuntime::isVBAEnabled() )
++ {
++ if ( aExamine >>= aBasicError )
++ {
++ if ( aBasicError.ErrorCode != 0 )
++ {
++ nError = StarBASIC::GetSfxFromVBError( (USHORT) aBasicError.ErrorCode );
++ if ( nError == 0 )
++ {
++ nError = (SbError) aBasicError.ErrorCode;
++ }
++ aMessageBuf.append( aBasicError.ErrorMessageArgument );
++ aExamine.clear();
++ }
++ }
++
++ IndexOutOfBoundsException aIdxOutBndsExp;
++ if ( aExamine >>= aIdxOutBndsExp )
++ {
++ nError = SbERR_OUT_OF_RANGE;
++ aExamine.clear();
++ }
++ }
++ // End add
++
+ // strip any other WrappedTargetException instances, but this time preserve the error messages.
+ WrappedTargetException aWrapped;
+ sal_Int32 nLevel = 0;
+@@ -1490,6 +1532,103 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty
+ return aRetVal;
+ }
+
++void processAutomationParams( SbxArray* pParams, Sequence< Any >& args, bool bOLEAutomation, UINT32 nParamCount )
++{
++ AutomationNamedArgsSbxArray* pArgNamesArray = NULL;
++ if( bOLEAutomation )
++ pArgNamesArray = PTR_CAST(AutomationNamedArgsSbxArray,pParams);
++
++ args.realloc( nParamCount );
++ Any* pAnyArgs = args.getArray();
++ bool bBlockConversionToSmallestType = pINST->IsCompatibility();
++ UINT32 i = 0;
++ if( pArgNamesArray )
++ {
++ Sequence< ::rtl::OUString >& rNameSeq = pArgNamesArray->getNames();
++ ::rtl::OUString* pNames = rNameSeq.getArray();
++ Any aValAny;
++ for( i = 0 ; i < nParamCount ; i++ )
++ {
++ USHORT iSbx = (USHORT)(i+1);
++
++ // ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen!
++ aValAny = sbxToUnoValueImpl( pParams->Get( iSbx ),
++ bBlockConversionToSmallestType );
++
++ ::rtl::OUString aParamName = pNames[iSbx];
++ if( aParamName.getLength() )
++ {
++ oleautomation::NamedArgument aNamedArgument;
++ aNamedArgument.Name = aParamName;
++ aNamedArgument.Value = aValAny;
++ pAnyArgs[i] <<= aNamedArgument;
++ }
++ else
++ {
++ pAnyArgs[i] = aValAny;
++ }
++ }
++ }
++ else
++ {
++ for( i = 0 ; i < nParamCount ; i++ )
++ {
++ // ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen!
++ pAnyArgs[i] = sbxToUnoValueImpl( pParams->Get( (USHORT)(i+1) ),
++ bBlockConversionToSmallestType );
++ }
++ }
++
++}
++enum INVOKETYPE
++{
++ GetProp = 0,
++ SetProp,
++ Func
++};
++Any invokeAutomationMethod( const String& Name, Sequence< Any >& args, SbxArray* pParams, UINT32 nParamCount, Reference< XInvocation >& rxInvocation, INVOKETYPE invokeType = Func )
++{
++ Sequence< INT16 > OutParamIndex;
++ Sequence< Any > OutParam;
++
++ Any aRetAny;
++ switch( invokeType )
++ {
++ case Func:
++ aRetAny = rxInvocation->invoke( Name, args, OutParamIndex, OutParam );
++ break;
++ case GetProp:
++ {
++ Reference< XAutomationInvocation > xAutoInv( rxInvocation, UNO_QUERY );
++ aRetAny = xAutoInv->invokeGetProperty( Name, args, OutParamIndex, OutParam );
++ break;
++ }
++ case SetProp:
++ {
++ Reference< XAutomationInvocation > xAutoInv( rxInvocation, UNO_QUERY_THROW );
++ aRetAny = xAutoInv->invokePutProperty( Name, args, OutParamIndex, OutParam );
++ break;
++ }
++ default:
++ break; // should introduce an error here
++
++ }
++ const INT16* pIndices = OutParamIndex.getConstArray();
++ UINT32 nLen = OutParamIndex.getLength();
++ if( nLen )
++ {
++ const Any* pNewValues = OutParam.getConstArray();
++ for( UINT32 j = 0 ; j < nLen ; j++ )
++ {
++ INT16 iTarget = pIndices[ j ];
++ if( iTarget >= (INT16)nParamCount )
++ break;
++ unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pNewValues[ j ] );
++ }
++ }
++ return aRetAny;
++}
++
+ // Dbg-Hilfsmethode zum Auslesen der in einem Object implementierten Interfaces
+ String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& xClass, USHORT nRekLevel )
+ {
+@@ -1990,11 +2129,26 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ {
+ try
+ {
+- // Wert holen
+- Any aRetAny = mxInvocation->getValue( pProp->GetName() );
++ UINT32 nParamCount = pParams ? ((UINT32)pParams->Count() - 1) : 0;
++ sal_Bool bCanBeConsideredAMethod = mxInvocation->hasMethod( pProp->GetName() );
++ Any aRetAny;
++ if ( bCanBeConsideredAMethod && nParamCount )
++ {
++ // Automation properties have methods, so.. we need to invoke this through
++ // XInvocation
++ Sequence<Any> args;
++ processAutomationParams( pParams, args, true, nParamCount );
++ aRetAny = invokeAutomationMethod( pProp->GetName(), args, pParams, nParamCount, mxInvocation, GetProp );
++ }
++ else
++ // Wert holen
++ aRetAny = mxInvocation->getValue( pProp->GetName() );
+
+ // Wert von Uno nach Sbx uebernehmen
+ unoToSbxValue( pVar, aRetAny );
++ if( pParams && bCanBeConsideredAMethod )
++ pVar->SetParameters( NULL );
++
+ }
+ catch( const Exception& )
+ {
+@@ -2119,52 +2273,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ else if( bInvocation && pParams && mxInvocation.is() )
+ {
+ bool bOLEAutomation = true;
+- // TODO: bOLEAutomation = xOLEAutomation.is()
+-
+- AutomationNamedArgsSbxArray* pArgNamesArray = NULL;
+- if( bOLEAutomation )
+- pArgNamesArray = PTR_CAST(AutomationNamedArgsSbxArray,pParams);
+-
+- args.realloc( nParamCount );
+- Any* pAnyArgs = args.getArray();
+- bool bBlockConversionToSmallestType = pINST->IsCompatibility();
+- if( pArgNamesArray )
+- {
+- Sequence< ::rtl::OUString >& rNameSeq = pArgNamesArray->getNames();
+- ::rtl::OUString* pNames = rNameSeq.getArray();
+-
+- Any aValAny;
+- for( i = 0 ; i < nParamCount ; i++ )
+- {
+- USHORT iSbx = (USHORT)(i+1);
+-
+- // ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen!
+- aValAny = sbxToUnoValueImpl( pParams->Get( iSbx ),
+- bBlockConversionToSmallestType );
+-
+- ::rtl::OUString aParamName = pNames[iSbx];
+- if( aParamName.getLength() )
+- {
+- oleautomation::NamedArgument aNamedArgument;
+- aNamedArgument.Name = aParamName;
+- aNamedArgument.Value = aValAny;
+- pAnyArgs[i] <<= aNamedArgument;
+- }
+- else
+- {
+- pAnyArgs[i] = aValAny;
+- }
+- }
+- }
+- else
+- {
+- for( i = 0 ; i < nParamCount ; i++ )
+- {
+- // ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen!
+- pAnyArgs[i] = sbxToUnoValueImpl( pParams->Get( (USHORT)(i+1) ),
+- bBlockConversionToSmallestType );
+- }
+- }
++ processAutomationParams( pParams, args, bOLEAutomation, nParamCount );
+ }
+
+ // Methode callen
+@@ -2199,26 +2308,8 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ }
+ else if( bInvocation && mxInvocation.is() )
+ {
+- Sequence< INT16 > OutParamIndex;
+- Sequence< Any > OutParam;
+- Any aRetAny = mxInvocation->invoke( pMeth->GetName(), args, OutParamIndex, OutParam );
+-
+- // Wert von Uno nach Sbx uebernehmen
++ Any aRetAny = invokeAutomationMethod( pMeth->GetName(), args, pParams, nParamCount, mxInvocation );
+ unoToSbxValue( pVar, aRetAny );
+-
+- const INT16* pIndices = OutParamIndex.getConstArray();
+- UINT32 nLen = OutParamIndex.getLength();
+- if( nLen )
+- {
+- const Any* pNewValues = OutParam.getConstArray();
+- for( UINT32 j = 0 ; j < nLen ; j++ )
+- {
+- INT16 iTarget = pIndices[ j ];
+- if( iTarget >= (INT16)nParamCount )
+- break;
+- unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pNewValues[ j ] );
+- }
+- }
+ }
+
+ // #55460, Parameter hier weghauen, da das in unoToSbxValue()
+@@ -3147,11 +3238,16 @@ getTypeDescriptorEnumeration( const ::rtl::OUString& sSearchRoot,
+
+ typedef std::hash_map< ::rtl::OUString, Any, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > VBAConstantsHash;
+
+-SbxVariable* getVBAConstant( const String& rName )
++VBAConstantHelper&
++VBAConstantHelper::instance()
++{
++ static VBAConstantHelper aHelper;
++ return aHelper;
++}
++
++void
++VBAConstantHelper::init()
+ {
+- SbxVariable* pConst = NULL;
+- static VBAConstantsHash aConstCache;
+- static bool isInited = false;
+ if ( !isInited )
+ {
+ Sequence< TypeClass > types(1);
+@@ -3159,39 +3255,77 @@ SbxVariable* getVBAConstant( const String& rName )
+ Reference< XTypeDescriptionEnumeration > xEnum = getTypeDescriptorEnumeration( defaultNameSpace, types, TypeDescriptionSearchDepth_INFINITE );
+
+ if ( !xEnum.is() )
+- return NULL;
++ return; //NULL;
+
+ while ( xEnum->hasMoreElements() )
+ {
+ Reference< XConstantsTypeDescription > xConstants( xEnum->nextElement(), UNO_QUERY );
+ if ( xConstants.is() )
+ {
++ // store constant group name
++ ::rtl::OUString sFullName = xConstants->getName();
++ sal_Int32 indexLastDot = sFullName.lastIndexOf('.');
++ ::rtl::OUString sLeafName( sFullName );
++ if ( indexLastDot > -1 )
++ sLeafName = sFullName.copy( indexLastDot + 1);
++ aConstCache.push_back( sLeafName ); // assume constant group names are unique
+ Sequence< Reference< XConstantTypeDescription > > aConsts = xConstants->getConstants();
+ Reference< XConstantTypeDescription >* pSrc = aConsts.getArray();
+ sal_Int32 nLen = aConsts.getLength();
+ for ( sal_Int32 index =0; index<nLen; ++pSrc, ++index )
+ {
++ // store constant member name
+ Reference< XConstantTypeDescription >& rXConst =
+ *pSrc;
+- ::rtl::OUString sFullName = rXConst->getName();
+- sal_Int32 indexLastDot = sFullName.lastIndexOf('.');
+- ::rtl::OUString sLeafName;
++ sFullName = rXConst->getName();
++ indexLastDot = sFullName.lastIndexOf('.');
++ sLeafName = sFullName;
+ if ( indexLastDot > -1 )
+ sLeafName = sFullName.copy( indexLastDot + 1);
+- aConstCache[ sLeafName.toAsciiLowerCase() ] = rXConst->getConstantValue();
++ aConstHash[ sLeafName.toAsciiLowerCase() ] = rXConst->getConstantValue();
+ }
+ }
+ }
+ isInited = true;
+ }
++}
++
++bool
++VBAConstantHelper::isVBAConstantType( const String& rName )
++{
++ init();
++ bool bConstant = false;
++ ::rtl::OUString sKey( rName );
++ VBAConstantsVector::const_iterator it = aConstCache.begin();
++
++ for( ; it != aConstCache.end(); it++ )
++ {
++ if( sKey.equalsIgnoreAsciiCase( *it ) )
++ {
++ bConstant = true;
++ break;
++ }
++ }
++ return bConstant;
++}
++
++SbxVariable*
++VBAConstantHelper::getVBAConstant( const String& rName )
++{
++ SbxVariable* pConst = NULL;
++ init();
++
+ ::rtl::OUString sKey( rName );
+- VBAConstantsHash::const_iterator it = aConstCache.find( sKey.toAsciiLowerCase() );
+- if ( it != aConstCache.end() )
++
++ VBAConstantsHash::const_iterator it = aConstHash.find( sKey.toAsciiLowerCase() );
++
++ if ( it != aConstHash.end() )
+ {
+ pConst = new SbxVariable( SbxVARIANT );
+ pConst->SetName( rName );
+ unoToSbxValue( pConst, it->second );
+ }
++
+ return pConst;
+ }
+
+diff --git basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
+index 8c3ef89..df3838b 100644
+--- basic/source/classes/sbxmod.cxx
++++ basic/source/classes/sbxmod.cxx
+@@ -85,6 +85,361 @@ using namespace com::sun::star;
+ #include <com/sun/star/awt/XControl.hpp>
+ #include <cppuhelper/implbase1.hxx>
+ #include <comphelper/anytostring.hxx>
++#include <com/sun/star/document/XVbaMethodParameter.hpp> //liuchen 2009-7-21
++#include <com/sun/star/beans/XPropertySet.hpp>
++
++extern void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue ); //liuchen 2009-7-21
++extern ::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar ); //liuchen 2009-7-21
++
++#include <com/sun/star/frame/XDesktop.hpp>
++#include <vcl/svapp.hxx>
++#include <map>
++#include <com/sun/star/reflection/XProxyFactory.hpp>
++#include <cppuhelper/implbase1.hxx>
++#include <basic/sbobjmod.hxx>
++#include <com/sun/star/uno/XAggregation.hpp>
++#include <map>
++#include <com/sun/star/script/XInvocation.hpp>
++
++using namespace ::com::sun::star;
++using namespace com::sun::star::lang;
++using namespace com::sun::star::reflection;
++using namespace com::sun::star::beans;
++using namespace com::sun::star::script;
++
++typedef ::cppu::WeakImplHelper1< XInvocation > DocObjectWrapper_BASE;
++typedef ::std::map< sal_Int16, Any, ::std::less< sal_Int16 > > OutParamMap;
++::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
++void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue );
++
++class DocObjectWrapper : public DocObjectWrapper_BASE
++{
++ Reference< XAggregation > m_xAggProxy;
++ Reference< XInvocation > m_xAggInv;
++ Reference< XTypeProvider > m_xAggregateTypeProv;
++ Sequence< Type > m_Types;
++ SbModule* m_pMod;
++ SbMethodRef getMethod( const rtl::OUString& aName ) throw (RuntimeException);
++ SbPropertyRef getProperty( const rtl::OUString& aName ) throw (RuntimeException);
++ String mName; // for debugging
++
++public:
++ DocObjectWrapper( SbModule* pMod );
++ ~DocObjectWrapper();
++
++ virtual void SAL_CALL acquire() throw();
++ virtual void SAL_CALL release() throw();
++
++ virtual Sequence< sal_Int8 > SAL_CALL getImplementationId()
++ throw ( com::sun::star::uno::RuntimeException )
++ {
++ return m_xAggregateTypeProv->getImplementationId();
++
++ }
++
++ virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (RuntimeException);
++
++ virtual Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const Sequence< Any >& aParams, Sequence< ::sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) throw (IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException);
++ virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException);
++ virtual Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (UnknownPropertyException, RuntimeException);
++ virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (RuntimeException);
++ virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (RuntimeException);
++ virtual Any SAL_CALL queryInterface( const Type& aType ) throw ( RuntimeException );
++
++ virtual Sequence< Type > SAL_CALL getTypes() throw ( RuntimeException );
++};
++
++DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pVar->GetName() )
++{
++ SbObjModule* pMod = PTR_CAST(SbObjModule,pVar);
++ if ( pMod )
++ {
++ sal_Int16 nType = pMod->GetModuleType();
++ if ( pMod->GetModuleType() == ModuleType::DOCUMENT )
++ {
++ Reference< XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
++ // Use proxy factory service to create aggregatable proxy.
++ SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,pMod->GetObject() );
++ Reference< XInterface > xIf;
++ if ( pUnoObj )
++ {
++ Any aObj = pUnoObj->getUnoAny();
++ aObj >>= xIf;
++ if ( xIf.is() )
++ {
++ m_xAggregateTypeProv.set( xIf, UNO_QUERY );
++ m_xAggInv.set( xIf, UNO_QUERY );
++ }
++ }
++ if ( xIf.is() )
++ {
++ try
++ {
++ Reference< XMultiComponentFactory > xMFac( xFactory, UNO_QUERY_THROW );
++ Reference< XPropertySet> xPSMPropertySet( xMFac, UNO_QUERY_THROW );
++ Reference< XComponentContext > xCtx;
++ xPSMPropertySet->getPropertyValue(
++ String( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xCtx;
++ Reference< XProxyFactory > xProxyFac( xMFac->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.ProxyFactory" ) ), xCtx ), UNO_QUERY_THROW );
++ m_xAggProxy = xProxyFac->createProxy( xIf );
++ }
++ catch( Exception& )
++ {
++ OSL_ENSURE( false, "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
++ }
++ }
++
++ if ( m_xAggProxy.is() )
++ {
++ osl_incrementInterlockedCount( &m_refCount );
++
++ /* i35609 - Fix crash on Solaris. The setDelegator call needs
++ to be in its own block to ensure that all temporary Reference
++ instances that are acquired during the call are released
++ before m_refCount is decremented again */
++ {
++ m_xAggProxy->setDelegator( static_cast< cppu::OWeakObject * >( this ) );
++ }
++
++ osl_decrementInterlockedCount( &m_refCount );
++ }
++ }
++ }
++}
++
++void SAL_CALL
++DocObjectWrapper::acquire() throw ()
++{
++ osl_incrementInterlockedCount( &m_refCount );
++ OSL_TRACE("DocObjectWrapper::acquire(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
++}
++void SAL_CALL
++DocObjectWrapper::release() throw ()
++{
++ if ( osl_decrementInterlockedCount( &m_refCount ) == 0 )
++ {
++ OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
++ delete this;
++ }
++ else
++ OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
++}
++
++DocObjectWrapper::~DocObjectWrapper()
++{
++}
++
++Sequence< Type > SAL_CALL DocObjectWrapper::getTypes()
++ throw ( RuntimeException )
++{
++ if ( m_Types.getLength() == 0 )
++ {
++ Sequence< Type > sTypes;
++ if ( m_xAggregateTypeProv.is() )
++ sTypes = m_xAggregateTypeProv->getTypes();
++ m_Types.realloc( sTypes.getLength() + 1 );
++ Type* pPtr = m_Types.getArray();
++ for ( int i=0; i<m_Types.getLength(); ++i, ++pPtr )
++ {
++ if ( i == 0 )
++ *pPtr = XInvocation::static_type( NULL );
++ else
++ *pPtr = sTypes[ i - 1 ];
++ }
++ }
++ return m_Types;
++}
++
++Reference< XIntrospectionAccess > SAL_CALL
++DocObjectWrapper::getIntrospection( ) throw (RuntimeException)
++{
++ return NULL;
++}
++
++Any SAL_CALL
++DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence< Any >& aParams, Sequence< ::sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) throw (IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException)
++{
++ if ( m_xAggInv.is() && m_xAggInv->hasMethod( aFunctionName ) )
++ return m_xAggInv->invoke( aFunctionName, aParams, aOutParamIndex, aOutParam );
++ SbMethodRef pMethod = getMethod( aFunctionName );
++ if ( !pMethod )
++ throw RuntimeException();
++ // check number of parameters
++ sal_Int32 nParamsCount = aParams.getLength();
++ SbxInfo* pInfo = pMethod->GetInfo();
++ if ( pInfo )
++ {
++ sal_Int32 nSbxOptional = 0;
++ USHORT n = 1;
++ for ( const SbxParamInfo* pParamInfo = pInfo->GetParam( n ); pParamInfo; pParamInfo = pInfo->GetParam( ++n ) )
++ {
++ if ( ( pParamInfo->nFlags & SBX_OPTIONAL ) != 0 )
++ ++nSbxOptional;
++ else
++ nSbxOptional = 0;
++ }
++ sal_Int32 nSbxCount = n - 1;
++ if ( nParamsCount < nSbxCount - nSbxOptional )
++ {
++ throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "wrong number of parameters!" ) ), Reference< XInterface >() );
++ }
++ }
++ // set parameters
++ SbxArrayRef xSbxParams;
++ if ( nParamsCount > 0 )
++ {
++ xSbxParams = new SbxArray;
++ const Any* pParams = aParams.getConstArray();
++ for ( sal_Int32 i = 0; i < nParamsCount; ++i )
++ {
++ SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
++ unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), pParams[i] );
++ xSbxParams->Put( xSbxVar, static_cast< USHORT >( i ) + 1 );
++
++ // Enable passing by ref
++ if ( xSbxVar->GetType() != SbxVARIANT )
++ xSbxVar->SetFlag( SBX_FIXED );
++ }
++ }
++ if ( xSbxParams.Is() )
++ pMethod->SetParameters( xSbxParams );
++
++ // call method
++ SbxVariableRef xReturn = new SbxVariable;
++ ErrCode nErr = SbxERR_OK;
++
++ nErr = pMethod->Call( xReturn );
++ Any aReturn;
++ // get output parameters
++ if ( xSbxParams.Is() )
++ {
++ SbxInfo* pInfo_ = pMethod->GetInfo();
++ if ( pInfo_ )
++ {
++ OutParamMap aOutParamMap;
++ for ( USHORT n = 1, nCount = xSbxParams->Count(); n < nCount; ++n )
++ {
++ const SbxParamInfo* pParamInfo = pInfo_->GetParam( n );
++ if ( pParamInfo && ( pParamInfo->eType & SbxBYREF ) != 0 )
++ {
++ SbxVariable* pVar = xSbxParams->Get( n );
++ if ( pVar )
++ {
++ SbxVariableRef xVar = pVar;
++ aOutParamMap.insert( OutParamMap::value_type( n - 1, sbxToUnoValue( xVar ) ) );
++ }
++ }
++ }
++ sal_Int32 nOutParamCount = aOutParamMap.size();
++ aOutParamIndex.realloc( nOutParamCount );
++ aOutParam.realloc( nOutParamCount );
++ sal_Int16* pOutParamIndex = aOutParamIndex.getArray();
++ Any* pOutParam = aOutParam.getArray();
++ for ( OutParamMap::iterator aIt = aOutParamMap.begin(); aIt != aOutParamMap.end(); ++aIt, ++pOutParamIndex, ++pOutParam )
++ {
++ *pOutParamIndex = aIt->first;
++ *pOutParam = aIt->second;
++ }
++ }
++ }
++
++ // get return value
++ aReturn = sbxToUnoValue( xReturn );
++
++ pMethod->SetParameters( NULL );
++
++ return aReturn;
++}
++
++void SAL_CALL
++DocObjectWrapper::setValue( const ::rtl::OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException)
++{
++ if ( m_xAggInv.is() && m_xAggInv->hasProperty( aPropertyName ) )
++ return m_xAggInv->setValue( aPropertyName, aValue );
++
++ SbPropertyRef pProperty = getProperty( aPropertyName );
++ if ( !pProperty.Is() )
++ throw UnknownPropertyException();
++ unoToSbxValue( (SbxVariable*) pProperty, aValue );
++}
++
++Any SAL_CALL
++DocObjectWrapper::getValue( const ::rtl::OUString& aPropertyName ) throw (UnknownPropertyException, RuntimeException)
++{
++ if ( m_xAggInv.is() && m_xAggInv->hasProperty( aPropertyName ) )
++ return m_xAggInv->getValue( aPropertyName );
++
++ SbPropertyRef pProperty = getProperty( aPropertyName );
++ if ( !pProperty.Is() )
++ throw UnknownPropertyException();
++
++ SbxVariable* pProp = ( SbxVariable* ) pProperty;
++ if ( pProp->GetType() == SbxEMPTY )
++ pProperty->Broadcast( SBX_HINT_DATAWANTED );
++
++ Any aRet = sbxToUnoValue( pProp );
++ return aRet;
++}
++
++::sal_Bool SAL_CALL
++DocObjectWrapper::hasMethod( const ::rtl::OUString& aName ) throw (RuntimeException)
++{
++ if ( m_xAggInv.is() && m_xAggInv->hasMethod( aName ) )
++ return sal_True;
++ return getMethod( aName ).Is();
++}
++
++::sal_Bool SAL_CALL
++DocObjectWrapper::hasProperty( const ::rtl::OUString& aName ) throw (RuntimeException)
++{
++ sal_Bool bRes = sal_False;
++ if ( m_xAggInv.is() && m_xAggInv->hasProperty( aName ) )
++ bRes = sal_True;
++ else bRes = getProperty( aName ).Is();
++ return bRes;
++}
++
++Any SAL_CALL DocObjectWrapper::queryInterface( const Type& aType )
++ throw ( RuntimeException )
++{
++ Any aRet = DocObjectWrapper_BASE::queryInterface( aType );
++ if ( aRet.hasValue() )
++ return aRet;
++ else if ( m_xAggProxy.is() )
++ aRet = m_xAggProxy->queryAggregation( aType );
++ return aRet;
++}
++
++SbMethodRef DocObjectWrapper::getMethod( const rtl::OUString& aName ) throw (RuntimeException)
++{
++ SbMethodRef pMethod = NULL;
++ if ( m_pMod )
++ {
++ USHORT nSaveFlgs = m_pMod->GetFlags();
++ // Limit search to this module
++ m_pMod->ResetFlag( SBX_GBLSEARCH );
++ pMethod = (SbMethod*) m_pMod->SbModule::Find( aName, SbxCLASS_METHOD );
++ m_pMod->SetFlags( nSaveFlgs );
++ }
++
++ return pMethod;
++}
++
++SbPropertyRef DocObjectWrapper::getProperty( const rtl::OUString& aName ) throw (RuntimeException)
++{
++ SbPropertyRef pProperty = NULL;
++ if ( m_pMod )
++ {
++ USHORT nSaveFlgs = m_pMod->GetFlags();
++ // Limit search to this module.
++ m_pMod->ResetFlag( SBX_GBLSEARCH );
++ pProperty = (SbProperty*)m_pMod->SbModule::Find( aName, SbxCLASS_PROPERTY );
++ m_pMod->SetFlag( nSaveFlgs );
++ }
++
++ return pProperty;
++}
++
+
+ TYPEINIT1(SbModule,SbxObject)
+ TYPEINIT1(SbMethod,SbxMethod)
+@@ -151,7 +506,6 @@ IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, /*pNull*/ )
+ return 0L;
+ }
+
+-#if 0
+ bool UnlockControllerHack( StarBASIC* pBasic )
+ {
+ bool bRes = false;
+@@ -177,7 +531,7 @@ bool UnlockControllerHack( StarBASIC* pBasic )
+ }
+ return bRes;
+ }
+-#endif
++
+ /////////////////////////////////////////////////////////////////////////////
+
+ // Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen
+@@ -194,14 +548,25 @@ SbModule::SbModule( const String& rName, BOOL bVBACompat )
+
+ SbModule::~SbModule()
+ {
++ OSL_TRACE("Module named %s is destructing", rtl::OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ if( pImage )
+ delete pImage;
+ if( pBreaks )
+ delete pBreaks;
+ if( pClassData )
+ delete pClassData;
++ mxWrapper = NULL;
+ }
+
++uno::Reference< script::XInvocation >
++SbModule::GetUnoModule()
++{
++ if ( !mxWrapper.is() )
++ mxWrapper = new DocObjectWrapper( this );
++
++ OSL_TRACE("Module named %s returning wrapper mxWrapper (0x%x)", rtl::OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), mxWrapper.get() );
++ return mxWrapper;
++}
+ BOOL SbModule::IsCompiled() const
+ {
+ return BOOL( pImage != 0 );
+@@ -429,6 +794,64 @@ void SbModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ SbxVariable* pVar = pHint->GetVar();
+ SbProperty* pProp = PTR_CAST(SbProperty,pVar);
+ SbMethod* pMeth = PTR_CAST(SbMethod,pVar);
++ SbProcedureProperty* pProcProperty = PTR_CAST( SbProcedureProperty, pVar );
++ if( pProcProperty )
++ {
++ if( pHint->GetId() == SBX_HINT_DATAWANTED )
++ {
++ String aProcName;
... etc. - the rest is truncated
More information about the ooo-build-commit
mailing list