summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/docsh.hxx3
-rw-r--r--sw/inc/unocoll.hxx3
-rw-r--r--sw/inc/unomap.hxx2
-rw-r--r--sw/inc/unoprnms.hxx4
-rw-r--r--sw/inc/unotbl.hxx4
-rw-r--r--sw/prj/build.lst5
-rw-r--r--sw/prj/d.lst1
-rw-r--r--sw/source/core/unocore/unomap.cxx2
-rw-r--r--sw/source/core/unocore/unoprnms.cxx4
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx8
-rw-r--r--sw/util/makefile.mk35
11 files changed, 64 insertions, 7 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 6bfd5437a20e..145ae7bd0f07 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -85,6 +85,7 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
comphelper::EmbeddedObjectContainer* pOLEChildList;
sal_Int16 nUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode
bool bInUpdateFontList; //prevent nested calls of UpdateFontList
+ bool bIsATemplate; //prevent nested calls of UpdateFontList
// Methoden fuer den Zugriff aufs Doc
SW_DLLPRIVATE void AddLink();
SW_DLLPRIVATE void RemoveLink();
@@ -299,6 +300,8 @@ public:
GetController();
SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef );
+ SW_DLLPRIVATE sal_Bool IsTemplate() { return bIsATemplate; }
+ SW_DLLPRIVATE void SetIsTemplate( bool bValue ) { bIsATemplate = bValue; }
virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const;
};
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index f728c51293e9..7c5c66f050e7 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -43,6 +43,7 @@
#include <cppuhelper/implbase4.hxx> // helper for implementations
#include <IMark.hxx>
#include <unobaseclass.hxx>
+#include "swdllapi.h"
/***************************************************
***************************************************
*
@@ -283,7 +284,7 @@ cppu::WeakImplHelper3
::com::sun::star::lang::XServiceInfo
>
SwCollectionBaseClass;
-class SwXTextTables : public SwCollectionBaseClass,
+class SW_DLLPUBLIC SwXTextTables : public SwCollectionBaseClass,
public SwUnoCollection
{
protected:
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index 9de2db4f493c..163d7b9897fd 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -250,6 +250,7 @@
#define WID_DOC_LOCK_UPDATES 1016
#define WID_DOC_HAS_VALID_SIGNATURES 1017
#define WID_DOC_BUILDID 1024
+#define WID_DOC_ISTEMPLATEID 1025
// --> OD 2006-03-21 #b6375613#
#define WID_APPLY_WORKAROUND_FOR_B6375613 1070
// <--
@@ -294,6 +295,7 @@
#define WID_LAYOUT_SIZE 1104
#define WID_DOC_DIALOG_LIBRARIES 1105
+#define WID_DOC_VBA_DOCOBJ 1106
//AutoText
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index c9f4d1d01265..d0e077576a70 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -807,7 +807,9 @@ enum SwPropNameIds
// --> OD 2009-07-13 #i73249#
/* 0737 */ UNO_NAME_DESCRIPTION,
// <--
-/* 0738 */ SW_PROPNAME_END
+/* 0738 */ UNO_NAME_IS_TEMPLATE,
+/* 0739 */ UNO_NAME_VBA_DOCOBJ,
+/* 0740 */ SW_PROPNAME_END
};
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 0ad2b3c494c8..a8ca07bb0f34 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -214,14 +214,13 @@ typedef cppu::WeakImplHelper3<
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XPropertySet
> SwXTextTableCursor_Base;
-class SwXTextTableCursor : public SwXTextTableCursor_Base
+class SW_DLLPUBLIC SwXTextTableCursor : public SwXTextTableCursor_Base
,public SwClient
,public OTextCursorHelper
{
SwDepend aCrsrDepend;
const SfxItemPropertySet* m_pPropSet;
- SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
// SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
protected:
@@ -271,6 +270,7 @@ public:
const SwUnoCrsr* GetCrsr() const;
SwUnoCrsr* GetCrsr();
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
/*-----------------11.12.97 09:38-------------------
diff --git a/sw/prj/build.lst b/sw/prj/build.lst
index d8cac64ff9e8..426a9f040379 100644
--- a/sw/prj/build.lst
+++ b/sw/prj/build.lst
@@ -1,4 +1,4 @@
-sw sw : l10n connectivity OOo:writerperfect svx stoc uui writerfilter NULL
+sw sw : l10n connectivity OOo:writerperfect svx stoc uui writerfilter vbahelper NULL
sw sw usr1 - all sw_mkout NULL
sw sw\inc nmake - all sw_inc NULL
sw sw\uiconfig\layout nmake - all sw_layout NULL
@@ -33,6 +33,7 @@ sw sw\source\ui\smartmenu nmake
sw sw\source\ui\table nmake - all sw_table sw_inc NULL
sw sw\source\ui\uiview nmake - all sw_uivw sw_sdi sw_inc NULL
sw sw\source\ui\uno nmake - all sw_uiuno sw_sdi sw_inc NULL
+sw sw\source\ui\vba nmake - all sw_vba sw_inc NULL
sw sw\source\ui\utlui nmake - all sw_utlui sw_inc NULL
sw sw\source\ui\web nmake - all sw_web sw_uinc sw_sdi sw_inc NULL
sw sw\source\ui\wrtsh nmake - all sw_wrtsh sw_inc NULL
@@ -69,7 +70,7 @@ sw sw\source\filter\writer nmake - all sw_wrtr sw_i
sw sw\source\filter\ww1 nmake - all sw_ww1 sw_inc NULL
sw sw\source\filter\ww8 nmake - all sw_ww8 sw_inc NULL
sw sw\source\filter\xml nmake - all sw_xml sw_inc NULL
-sw sw\source\ui nmake - all sw_ui sw_app sw_cctrl sw_chrdl sw_conf sw_dbui sw_dchdl sw_dcvw sw_dlg sw_envlp sw_fldui sw_fmtui sw_frmdl sw_globd sw_index sw_ling sw_misc sw_rbbar sw_shell sw_table sw_uiuno sw_uivw sw_utlui sw_web sw_wrtsh sw_smartmenu NULL
+sw sw\source\ui nmake - all sw_ui sw_app sw_cctrl sw_chrdl sw_conf sw_dbui sw_dchdl sw_dcvw sw_dlg sw_envlp sw_fldui sw_fmtui sw_frmdl sw_globd sw_index sw_ling sw_misc sw_rbbar sw_shell sw_table sw_uiuno sw_uivw sw_utlui sw_web sw_wrtsh sw_smartmenu sw_vba NULL
sw sw\source\core nmake - all sw_core sw_attr sw_bast sw_crsr sw_dcnd sw_doc sw_draw sw_edit sw_excpt sw_fld sw_frmed sw_grph sw_layo sw_ole sw_para sw_sw3io sw_swg sw_text sw_tox sw_txtnd sw_uco sw_undo sw_view sw_acc sw_objpos sw_NumberTree sw_tablecore NULL
sw sw\source\filter nmake - all sw_flt sw_ascii sw_bsflt sw_html sw_rtf sw_wrtr sw_ww1 sw_ww8 sw_xml NULL
sw sw\util nmake - all sw_util sw_core sw_flt sw_sdi sw_ui NULL
diff --git a/sw/prj/d.lst b/sw/prj/d.lst
index 09c417cd6f17..958771dad257 100644
--- a/sw/prj/d.lst
+++ b/sw/prj/d.lst
@@ -63,6 +63,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar
..\%__SRC%\bin\swd?????.dll %_DEST%\bin%_EXT%\swd?????.dll
..\%__SRC%\bin\swui?????.dll %_DEST%\bin%_EXT%\swui?????.dll
..\%__SRC%\bin\msword?????.dll %_DEST%\bin%_EXT%\msword?????.dll
+..\%__SRC%\bin\vbaswobj*.dll %_DEST%\bin%_EXT%\vbaswobj*.dll
..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res
..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 3730da041f90..8337eefe084f 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1591,11 +1591,13 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_CHAR_LOCALE), RES_CHRATR_LANGUAGE , CPPU_E2T(CPPUTYPE_LOCALE), PropertyAttribute::MAYBEVOID, MID_LANG_LOCALE },
{ SW_PROP_NMID(UNO_NAME_CHARACTER_COUNT), WID_DOC_CHAR_COUNT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_DIALOG_LIBRARIES), WID_DOC_DIALOG_LIBRARIES, CPPU_E2T(CPPUTYPE_REFLIBCONTAINER), PropertyAttribute::READONLY, 0},
+ { SW_PROP_NMID(UNO_NAME_VBA_DOCOBJ), WID_DOC_VBA_DOCOBJ, CPPU_E2T(CPPUTYPE_PROPERTYVALUE), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_INDEX_AUTO_MARK_FILE_U_R_L), WID_DOC_AUTO_MARK_URL, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_PARAGRAPH_COUNT), WID_DOC_PARA_COUNT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_RECORD_CHANGES), WID_DOC_CHANGES_RECORD, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_SHOW_CHANGES), WID_DOC_CHANGES_SHOW, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_WORD_COUNT), WID_DOC_WORD_COUNT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::READONLY, 0},
+ { SW_PROP_NMID(UNO_NAME_IS_TEMPLATE), WID_DOC_ISTEMPLATEID, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_WORD_SEPARATOR), WID_DOC_WORD_SEPARATOR, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_HIDE_FIELD_TIPS), WID_DOC_HIDE_TIPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_REDLINE_DISPLAY_TYPE), WID_DOC_REDLINE_DISPLAY, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0},
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 7b58a4120de7..d6951964fa07 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -779,7 +779,9 @@ const SwPropNameTab aPropNameTab = {
/* 0734 CHAR_OVERLINE_COLOR */ {MAP_CHAR_LEN("CharOverlineColor")},
/* 0735 CHAR_OVERLINE_HAS_COLOR */ {MAP_CHAR_LEN("CharOverlineHasColor")},
/* 0736 UNO_NAME_OUTLINE_LEVEL */ {MAP_CHAR_LEN("OutlineLevel")},//#outline level,add<-zhaojianwei Outlinelevel
-/* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")}
+/* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")},
+/* 0738 UNO_NAME_IS_TEMPLATE */ {MAP_CHAR_LEN("IsTemplate")},
+/* 0739 UNO_NAME_VBA_DOCOBJ */ {MAP_CHAR_LEN("ThisVBADocObj")},
};
const SwPropNameLen& SwGetPropName( USHORT nId )
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index db81543fb883..aa1713f1c345 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2253,6 +2253,14 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
case WID_DOC_DIALOG_LIBRARIES:
aAny <<= pDocShell->GetDialogContainer();
break;
+ case WID_DOC_VBA_DOCOBJ:
+ {
+ beans::PropertyValue aProp;
+ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWordDoc") );
+ aProp.Value <<= pDocShell->GetModel();
+ aAny <<= aProp;
+ }
+ break;
case WID_DOC_RUNTIME_UID:
aAny <<= getRuntimeUID();
break;
diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk
index 608002af5d21..9d2924fdb9dc 100644
--- a/sw/util/makefile.mk
+++ b/sw/util/makefile.mk
@@ -127,6 +127,7 @@ SHL1STDLIBS+= \
$(SALHELPERLIB) \
$(ICUUCLIB) \
$(I18NUTILLIB) \
+ $(VBAHELPERLIB) \
$(AVMEDIALIB)
.IF "$(GUI)"=="WNT"
@@ -338,6 +339,40 @@ SHL4STDLIBS= \
$(CPPUHELPERLIB) \
$(SALLIB) \
$(ICUUCLIB) \
+ $(BASICLIB) \
$(I18NUTILLIB)
+#target vba
+TARGET_VBA=vbaswobj
+SHL5TARGET=$(TARGET_VBA)$(DLLPOSTFIX).uno
+SHL5IMPLIB= i$(TARGET_VBA)
+
+SHL5VERSIONMAP=$(TARGET_VBA).map
+SHL5DEF=$(MISC)$/$(SHL5TARGET).def
+DEF5NAME=$(SHL5TARGET)
+SHL5STDLIBS= \
+ $(ISWLIB) \
+ $(CPPUHELPERLIB) \
+ $(VCLLIB) \
+ $(CPPULIB) \
+ $(COMPHELPERLIB) \
+ $(SVLIB) \
+ $(UNOTOOLSLIB) \
+ $(TOOLSLIB) \
+ $(SALLIB)\
+ $(VBAHELPERLIB) \
+ $(BASICLIB) \
+ $(SFXLIB) \
+ $(SVXLIB) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(VCLLIB) \
+ $(TKLIB) \
+ $(I18NISOLANGLIB) \
+ $(SVXCORELIB) \
+ $(SVXMSFILTERLIB) \
+
+SHL5DEPN=$(SHL1TARGETN)
+SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib
+
.INCLUDE : target.mk