summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RepositoryFixes.mk47
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx7
-rwxr-xr-xbasic/source/classes/sbunoobj.cxx94
-rw-r--r--basic/source/runtime/dllmgr.cxx3
-rw-r--r--berkeleydb/makefile.mk2
-rw-r--r--cairo/cairo/makefile.mk2
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx14
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx10
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_ObjectProperties.hxx4
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx109
-rw-r--r--configure.in12
-rw-r--r--cppuhelper/source/tdmgr.cxx34
-rw-r--r--curl/makefile.mk2
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx21
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx14
-rwxr-xr-xfilter/source/graphicfilter/ipict/shape.cxx6
-rw-r--r--framework/Library_fwe.mk13
-rw-r--r--framework/Library_fwi.mk16
-rw-r--r--framework/Library_fwk.mk13
-rw-r--r--framework/Library_fwl.mk13
-rw-r--r--framework/Library_fwm.mk13
-rw-r--r--framework/prj/build.lst1
-rw-r--r--framework/qa/unoapi/makefile.mk48
-rw-r--r--[-rwxr-xr-x]framework/source/layoutmanager/uielement.cxx39
-rw-r--r--icu/makefile.mk28
-rw-r--r--instsetoo_native/util/openoffice.lst18
-rw-r--r--jurt/com/sun/star/lib/uno/protocols/urp/Cache.java2
-rw-r--r--jurt/prj/build.lst1
-rw-r--r--jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java100
-rw-r--r--jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java17
-rw-r--r--jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java45
-rw-r--r--jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk9
-rw-r--r--libxml2/makefile.mk2
-rw-r--r--libxmlsec/makefile.mk2
-rw-r--r--libxslt/makefile.mk2
-rw-r--r--lpsolve/makefile.mk2
-rw-r--r--nss/makefile.mk2
-rw-r--r--offapi/com/sun/star/awt/grid/UnoControlGridModel.idl2
-rw-r--r--oox/inc/oox/drawingml/chart/chartspacemodel.hxx1
-rw-r--r--oox/source/drawingml/chart/chartspaceconverter.cxx23
-rw-r--r--oox/source/drawingml/chart/chartspacefragment.cxx3
-rw-r--r--oox/source/drawingml/chart/chartspacemodel.cxx3
-rw-r--r--oox/source/token/properties.txt2
-rwxr-xr-xopenssl/opensslmingw.patch4
-rw-r--r--package/source/manifest/ManifestExport.cxx5
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx61
-rw-r--r--qadevOOo/prj/build.lst1
-rw-r--r--redland/raptor/makefile.mk2
-rw-r--r--redland/rasqal/makefile.mk2
-rw-r--r--redland/redland/makefile.mk2
-rw-r--r--sal/inc/sal/types.h2
-rw-r--r--sal/osl/all/makefile.mk6
-rw-r--r--sal/osl/all/printtrace.cxx65
-rw-r--r--sal/osl/inc/printtrace.h46
-rw-r--r--sal/osl/os2/diagnose.c26
-rw-r--r--sal/osl/unx/diagnose.c32
-rwxr-xr-x[-rw-r--r--]sal/osl/w32/diagnose.c37
-rw-r--r--sal/systools/win32/uwinapi/ResolveUnicows.cpp5
-rw-r--r--sc/inc/charthelper.hxx11
-rw-r--r--sc/inc/clipparam.hxx12
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/source/core/data/clipparam.cxx10
-rw-r--r--sc/source/core/data/documen5.cxx32
-rw-r--r--sc/source/core/tool/charthelper.cxx153
-rw-r--r--sc/source/ui/app/drwtrans.cxx12
-rw-r--r--sc/source/ui/docshell/arealink.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx3
-rw-r--r--sc/source/ui/docshell/tablink.cxx3
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx46
-rw-r--r--sc/source/ui/drawfunc/makefile.mk1
-rw-r--r--sc/source/ui/inc/drwtrans.hxx6
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx7
-rw-r--r--[-rwxr-xr-x]sc/source/ui/unoobj/dapiuno.cxx17
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx25
-rw-r--r--sc/source/ui/view/viewfun3.cxx52
-rw-r--r--sc/source/ui/view/viewfun7.cxx48
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdview3.cxx21
-rw-r--r--set_soenv.in1
-rw-r--r--sfx2/AllLangResTarget_sfx2.mk3
-rwxr-xr-xsfx2/Library_sfx.mk20
-rw-r--r--sfx2/inc/frmload.hxx2
-rw-r--r--sfx2/inc/sfx2/docfile.hxx1
-rw-r--r--sfx2/inc/sfx2/objsh.hxx11
-rw-r--r--sfx2/inc/sfx2/sfxbasecontroller.hxx3
-rw-r--r--sfx2/inc/sfx2/sfxbasemodel.hxx31
-rw-r--r--sfx2/prj/build.lst3
-rw-r--r--sfx2/qa/cppunit/makefile.mk86
-rw-r--r--sfx2/qa/unoapi/makefile.mk48
-rw-r--r--sfx2/source/appl/app.cxx2
-rw-r--r--sfx2/source/config/config.hrc41
-rw-r--r--sfx2/source/config/config.src35
-rw-r--r--sfx2/source/config/evntconf.cxx3
-rw-r--r--sfx2/source/doc/doctempl.cxx4
-rw-r--r--sfx2/source/doc/docvor.cxx18
-rw-r--r--sfx2/source/doc/objcont.cxx50
-rw-r--r--sfx2/source/doc/objxtor.cxx25
-rwxr-xr-xsfx2/source/doc/printhelper.cxx8
-rw-r--r--sfx2/source/view/frmload.cxx40
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx10
-rw-r--r--solenv/gbuild/gbuild.mk4
-rwxr-xr-xsolenv/gbuild/platform/macosx.mk2
-rw-r--r--solenv/gbuild/platform/winmingw.mk575
-rw-r--r--solenv/inc/installationtest.mk3
-rw-r--r--solenv/inc/javaunittest.mk27
-rw-r--r--solenv/inc/minor.mk6
-rwxr-xr-x[-rw-r--r--]solenv/inc/wntgcci.mk4
-rw-r--r--sot/inc/sot/factory.hxx1
-rw-r--r--sot/inc/sot/object.hxx40
-rw-r--r--sot/inc/sot/sotref.hxx8
-rw-r--r--sot/source/base/factory.cxx39
-rw-r--r--sot/source/base/object.cxx290
-rw-r--r--svl/Library_fsstorage.mk15
-rw-r--r--svl/Library_passwordcontainer.mk15
-rw-r--r--svl/Library_svl.mk17
-rw-r--r--svl/prj/build.lst1
-rw-r--r--svl/qa/complex/passwordcontainer/makefile.mk134
-rw-r--r--svtools/AllLangResTarget_svt.mk2
-rw-r--r--svtools/Executable_bmp.mk15
-rw-r--r--svtools/Executable_bmpsum.mk15
-rw-r--r--svtools/Executable_g2g.mk15
-rw-r--r--svtools/Library_hatchwindowfactory.mk15
-rw-r--r--svtools/Library_productregistration.mk15
-rw-r--r--svtools/Library_svt.mk20
-rw-r--r--svtools/prj/build.lst2
-rw-r--r--svtools/qa/unoapi/makefile.mk48
-rw-r--r--svtools/source/edit/syntaxhighlight.cxx2
-rw-r--r--svtools/source/hatchwindow/hatchwindow.cxx6
-rw-r--r--svtools/source/hatchwindow/hatchwindowfactory.cxx2
-rw-r--r--svtools/source/misc/embedhlp.cxx1
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx18
-rw-r--r--svx/inc/svx/unoshtxt.hxx2
-rw-r--r--svx/source/form/fmscriptingenv.cxx1
-rw-r--r--svx/source/form/fmundo.cxx3
-rw-r--r--svx/source/svdraw/svdotext.cxx4
-rw-r--r--svx/source/unodraw/unoshtxt.cxx8
-rw-r--r--sw/Library_msword.mk16
-rw-r--r--sw/Library_sw.mk16
-rw-r--r--sw/Library_swd.mk13
-rw-r--r--sw/Library_swui.mk16
-rw-r--r--sw/Library_vbaswobj.mk16
-rw-r--r--sw/inc/doc.hxx16
-rw-r--r--sw/inc/unomailmerge.hxx2
-rw-r--r--sw/prj/build.lst3
-rw-r--r--sw/qa/complex/accessibility/makefile.mk50
-rw-r--r--sw/qa/complex/checkColor/makefile.mk50
-rw-r--r--sw/qa/unoapi/makefile.mk48
-rw-r--r--sw/source/core/doc/docglbl.cxx4
-rw-r--r--sw/source/core/doc/docnew.cxx21
-rw-r--r--sw/source/core/docnode/ndtbl.cxx7
-rw-r--r--sw/source/core/docnode/section.cxx10
-rw-r--r--sw/source/core/fields/expfld.cxx16
-rw-r--r--sw/source/core/ole/ndole.cxx18
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx1
-rw-r--r--sw/source/core/view/vprint.cxx8
-rw-r--r--sw/source/filter/basflt/shellio.cxx6
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx2
-rw-r--r--sw/source/ui/app/appenv.cxx2
-rw-r--r--sw/source/ui/app/apphdl.cxx2
-rw-r--r--sw/source/ui/app/applab.cxx2
-rw-r--r--sw/source/ui/app/docsh.cxx23
-rw-r--r--sw/source/ui/app/docsh2.cxx2
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx22
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx6
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx12
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx2
-rw-r--r--sw/source/ui/inc/uivwimp.hxx7
-rw-r--r--sw/source/ui/inc/unotxvw.hxx2
-rw-r--r--sw/source/ui/inc/view.hxx6
-rw-r--r--sw/source/ui/uiview/view.cxx6
-rw-r--r--sw/source/ui/uiview/view2.cxx5
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx1
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx10
-rw-r--r--sw/source/ui/uno/unotxvw.cxx4
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx26
-rw-r--r--testautomation/writer/required/includes/w_007_.inc1
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx1064
-rw-r--r--testtools/source/bridgetest/cppobj.cxx2
-rw-r--r--testtools/source/bridgetest/currentcontextchecker.cxx12
-rw-r--r--toolkit/Library_tk.mk13
-rw-r--r--toolkit/prj/build.lst1
-rw-r--r--toolkit/qa/unoapi/knownissues.xcl1
-rw-r--r--toolkit/qa/unoapi/makefile.mk48
-rw-r--r--tools/Executable_mkunroll.mk15
-rw-r--r--tools/Executable_rscdep.mk23
-rw-r--r--tools/Executable_so_checksum.mk15
-rw-r--r--tools/Executable_sspretty.mk15
-rw-r--r--tools/Library_tl.mk20
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx11
-rw-r--r--vcl/aqua/source/dtrans/service_entry.cxx12
-rw-r--r--vcl/aqua/source/gdi/salvd.cxx25
-rw-r--r--vcl/aqua/source/window/salframe.cxx71
-rw-r--r--vcl/source/app/sound.cxx5
-rw-r--r--xmloff/Library_xo.mk15
-rw-r--r--xmloff/Library_xof.mk15
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx15
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx30
-rw-r--r--xmloff/source/chart/transporttypes.hxx5
200 files changed, 3696 insertions, 1605 deletions
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 24b2dc96b449..31604e13c672 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -62,6 +62,50 @@ endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+gb_Library_FILENAMES := $(patsubst comphelper:icomphelper%,comphelper:icomphelp%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst cui:icui%,cui:icuin%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst i18nisolang1:ii18nisolang1%,i18nisolang1:ii18nisolang%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst i18nisolang1:iii18nisolang1%,i18nisolang1:iii18nisolang%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst sb:isb%,sb:basic%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst sfx:isfx%,sfx:sfx%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst svt:isvt%,svt:svtool%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst tl:itl%,tl:itools%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst vbahelper:ivbahelper%,vbahelper:vbahelper%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst vos3:ivos3%,vos3:ivos%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst xml2:ixml2%,xml2:libxml2$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
+ifeq ($(gb_PRODUCT),$(true))
+gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
+else
+gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71_stldebug%,$(gb_Library_FILENAMES))
+endif
+gb_Library_NOILIBFILENAMES:=\
+ icuuc \
+ sot \
+ uwinapi \
+
+gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
+gb_Library_FILENAMES += $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):$(lib)$(gb_Library_PLAINEXT))
+
+gb_Library_ILIBFILENAMES:=\
+ unicows \
+ uuid \
+
+gb_Library_DLLFILENAMES := $(filter-out $(foreach lib,$(gb_Library_ILIBFILENAMES),$(lib):%),$(gb_Library_DLLFILENAMES))
+gb_Library_DLLFILENAMES += $(foreach lib,$(gb_Library_ILIBFILENAMES),$(lib):$(PSDK_HOME)/lib/$(lib)$(gb_Library_ILIBEXT))
+
+gb_Library_DLLFILENAMES := $(patsubst comphelper:comphelper%,comphelper:comphelp4%,$(gb_Library_DLLFILENAMES))
+gb_Library_DLLFILENAMES := $(patsubst icuuc:icuuc%,icuuc:icuuc40%,$(gb_Library_DLLFILENAMES))
+gb_Library_DLLFILENAMES := $(patsubst ucbhelper:ucbhelper%,ucbhelper:ucbhelper4%,$(gb_Library_DLLFILENAMES))
+gb_Library_DLLFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_DLLFILENAMES))
+
+ifeq ($(USE_SYSTEM_STL),YES)
+gb_Library_FILENAMES := $(patsubst stl:%,stl:$(gb_Library_IARCSYSPRE)stdc++_s$(gb_Library_IARCSYSPRE),$(gb_Library_FILENAMES))
+gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
+endif
+
+else
gb_Library_FILENAMES := $(patsubst comphelper:icomphelper%,comphelper:icomphelp%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst cui:icui%,cui:icuin%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst i18nisolang1:ii18nisolang1%,i18nisolang1:ii18nisolang%,$(gb_Library_FILENAMES))
@@ -110,6 +154,8 @@ gb_Library_DLLFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_DLLFILENAMES))
endif
+endif
+
ifeq ($(OS),SOLARIS)
gb_Library_FILENAMES := $(patsubst comphelper:libcomphelper%,comphelper:libcomphelp4%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
@@ -135,4 +181,3 @@ gb_Library_TARGETS := $(filter-out icuuc,$(gb_Library_TARGETS))
endif
# vim: set noet sw=4 ts=4:
-
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index a5a1d4c8ca12..695f57ff2e02 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -507,6 +507,13 @@ namespace basic
// register as listener for the BasicManager being destroyed
StartListening( *_out_rpBasicManager );
+
+ // #i104876: Library container must not be modified just after
+ // creation. This happens as side effect when creating default
+ // "Standard" libraries and needs to be corrected here
+ xBasicLibs->setModified( sal_False );
+ xDialogLibs->setModified( sal_False );
+
}
//--------------------------------------------------------------------
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index e176eb9e3654..51a93ce94e4a 100755
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1297,6 +1297,30 @@ Any sbxToUnoValue( SbxVariable* pVar )
return sbxToUnoValueImpl( pVar );
}
+
+// Funktion, um einen globalen Bezeichner im
+// UnoScope zu suchen und fuer Sbx zu wrappen
+static bool implGetTypeByName( const String& rName, Type& rRetType )
+{
+ bool bSuccess = false;
+
+ Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
+ if( xTypeAccess->hasByHierarchicalName( rName ) )
+ {
+ Any aRet = xTypeAccess->getByHierarchicalName( rName );
+ Reference< XTypeDescription > xTypeDesc;
+ aRet >>= xTypeDesc;
+
+ if( xTypeDesc.is() )
+ {
+ rRetType = Type( xTypeDesc->getTypeClass(), xTypeDesc->getName() );
+ bSuccess = true;
+ }
+ }
+ return bSuccess;
+}
+
+
// Konvertierung von Sbx nach Uno mit bekannter Zielklasse
Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty )
{
@@ -1387,6 +1411,39 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty
}
break;
+ case TypeClass_TYPE:
+ {
+ if( eBaseType == SbxOBJECT )
+ {
+ // XIdlClass?
+ Reference< XIdlClass > xIdlClass;
+
+ SbxBaseRef pObj = (SbxBase*)pVar->GetObject();
+ if( pObj && pObj->ISA(SbUnoObject) )
+ {
+ Any aUnoAny = ((SbUnoObject*)(SbxBase*)pObj)->getUnoAny();
+ aUnoAny >>= xIdlClass;
+ }
+
+ if( xIdlClass.is() )
+ {
+ ::rtl::OUString aClassName = xIdlClass->getName();
+ Type aType( xIdlClass->getTypeClass(), aClassName.getStr() );
+ aRetVal <<= aType;
+ }
+ }
+ else if( eBaseType == SbxSTRING )
+ {
+ // String representing type?
+ String aTypeName = pVar->GetString();
+ Type aType;
+ bool bSuccess = implGetTypeByName( aTypeName, aType );
+ if( bSuccess )
+ aRetVal <<= aType;
+ }
+ }
+ break;
+
/* folgende Typen lassen wir erstmal weg
case TypeClass_SERVICE: break;
case TypeClass_CLASS: break;
@@ -4237,6 +4294,8 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
(void)pBasic;
(void)bWrite;
+ static String aTypeTypeString( RTL_CONSTASCII_USTRINGPARAM("type") );
+
// 2 parameters needed
if ( rPar.Count() != 3 )
{
@@ -4248,6 +4307,41 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
String aTypeName = rPar.Get(1)->GetString();
SbxVariable* pVal = rPar.Get(2);
+ if( aTypeName == aTypeTypeString )
+ {
+ SbxDataType eBaseType = pVal->SbxValue::GetType();
+ String aValTypeName;
+ if( eBaseType == SbxSTRING )
+ {
+ aValTypeName = pVal->GetString();
+ }
+ else if( eBaseType == SbxOBJECT )
+ {
+ // XIdlClass?
+ Reference< XIdlClass > xIdlClass;
+
+ SbxBaseRef pObj = (SbxBase*)pVal->GetObject();
+ if( pObj && pObj->ISA(SbUnoObject) )
+ {
+ Any aUnoAny = ((SbUnoObject*)(SbxBase*)pObj)->getUnoAny();
+ aUnoAny >>= xIdlClass;
+ }
+
+ if( xIdlClass.is() )
+ aValTypeName = xIdlClass->getName();
+ }
+ Type aType;
+ bool bSuccess = implGetTypeByName( aValTypeName, aType );
+ if( bSuccess )
+ {
+ Any aTypeAny( aType );
+ SbxVariableRef refVar = rPar.Get(0);
+ SbxObjectRef xUnoAnyObject = new SbUnoAnyObject( aTypeAny );
+ refVar->PutObject( xUnoAnyObject );
+ }
+ return;
+ }
+
// Check the type
Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
Any aRet;
diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx
index 04f1ee0a8acc..dbef947f4e94 100644
--- a/basic/source/runtime/dllmgr.cxx
+++ b/basic/source/runtime/dllmgr.cxx
@@ -206,7 +206,8 @@ SbError marshalString(
return e;
}
std::vector< char > * blob = data.newBlob();
- blob->insert(blob->begin(), str.getStr(), str.getStr() + str.getLength());
+ blob->insert(
+ blob->begin(), str.getStr(), str.getStr() + str.getLength() + 1);
*buffer = address(*blob);
data.unmarshalStrings.push_back(StringData(variable, *buffer, special));
return ERRCODE_NONE;
diff --git a/berkeleydb/makefile.mk b/berkeleydb/makefile.mk
index 751af3ca687c..b27d483e9e60 100644
--- a/berkeleydb/makefile.mk
+++ b/berkeleydb/makefile.mk
@@ -135,7 +135,7 @@ db_LDFLAGS+=-L$(COMPATH)/lib -L$(MINGW_CLIB_DIR)
db_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
CFLAGS+=-D_GLIBCXX_DLL
-db_LIBS+=-lstdc++_s
+db_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
db_LIBXSO_LIBS=$(LIBSTLPORT) $(db_LIBS)
.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk
index a5ddbc6af935..ceeb18547305 100644
--- a/cairo/cairo/makefile.mk
+++ b/cairo/cairo/makefile.mk
@@ -78,7 +78,7 @@ cairo_CC=$(CC) -mthreads
cairo_CC+=-shared-libgcc
.ENDIF
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-cairo_LIBS+=-lstdc++_s
+cairo_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 062dcc1a129d..7a0907b05a28 100644..100755
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -237,7 +237,7 @@ struct lcl_ComplexRowDescriptionsOperator : public lcl_Operator
virtual bool setsCategories( bool bDataInColumns )
{
- return !bDataInColumns;
+ return bDataInColumns;
}
virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess )
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 2a41d35313e8..448adbf3e89c 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -59,6 +59,7 @@
#include "chartview/NumberFormatterWrapper.hxx"
#include "AxisIndexDefines.hxx"
#include "AxisHelper.hxx"
+#include "ExplicitCategoriesProvider.hxx"
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
@@ -116,6 +117,7 @@ ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const rtl::OUS
, m_bIsCrossingAxisIsCategoryAxis(false)
, m_aCategories()
, m_xChartDocument( 0 )
+ , m_bComplexCategoriesAxis( false )
{
rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
m_bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS"));
@@ -206,6 +208,13 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if( m_bIsCrossingAxisIsCategoryAxis )
m_aCategories = DiagramHelper::getExplicitSimpleCategories( Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY) );
}
+
+ m_bComplexCategoriesAxis = false;
+ if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY )
+ {
+ ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, xChartModel );
+ m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories();
+ }
}
}
@@ -322,6 +331,10 @@ uno::Reference< chart2::XChartDocument > ObjectPropertiesDialogParameter::getDoc
{
return m_xChartDocument;
}
+bool ObjectPropertiesDialogParameter::IsComplexCategoriesAxis() const
+{
+ return m_bComplexCategoriesAxis;
+}
//const USHORT nNoArrowDlg = 1100;
const USHORT nNoArrowNoShadowDlg = 1101;
@@ -566,6 +579,7 @@ void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
{
bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered();
((SchAxisLabelTabPage&)rPage).ShowStaggeringControls( bShowStaggeringControls );
+ ( dynamic_cast< SchAxisLabelTabPage& >( rPage ) ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() );
break;
}
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 3dcaa3092e57..87cc48ec6a55 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -78,7 +78,8 @@ SchAxisLabelTabPage::SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rIn
m_nInitialDegrees( 0 ),
m_bHasInitialDegrees( true ),
m_bInitialStacking( false ),
- m_bHasInitialStacking( true )
+ m_bHasInitialStacking( true ),
+ m_bComplexCategories( false )
{
FreeResource();
@@ -295,6 +296,11 @@ void SchAxisLabelTabPage::ShowStaggeringControls( BOOL bShowStaggeringControls )
}
}
+void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories )
+{
+ m_bComplexCategories = bComplexCategories;
+}
+
// event handling routines
// -----------------------
@@ -310,7 +316,7 @@ IMPL_LINK ( SchAxisLabelTabPage, ToggleShowLabel, void *, EMPTYARG )
aRbAuto.Enable( bEnable );
aFlTextFlow.Enable( bEnable );
- aCbTextOverlap.Enable( bEnable );
+ aCbTextOverlap.Enable( bEnable && !m_bComplexCategories );
aCbTextBreak.Enable( bEnable );
m_aFtTextDirection.Enable( bEnable );
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index 6043b16001ac..a1b8c7530743 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -76,6 +76,7 @@ private:
bool m_bHasInitialDegrees; /// false = DialControl in tristate
bool m_bInitialStacking;
bool m_bHasInitialStacking; /// false = checkbox in tristate
+ bool m_bComplexCategories;
DECL_LINK ( ToggleShowLabel, void* );
@@ -90,6 +91,7 @@ public:
virtual void Reset( const SfxItemSet& rInAttrs );
void ShowStaggeringControls( BOOL bShowStaggeringControls );
+ void SetComplexCategories( bool bComplexCategories );
};
//.............................................................................
} //namespace chart
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
index 8ceabdbe33b7..140c33389fe3 100644
--- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -69,6 +69,8 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >
getDocument() const;
+ bool IsComplexCategoriesAxis() const;
+
private:
rtl::OUString m_aObjectCID;
ObjectType m_eObjectType;
@@ -96,6 +98,8 @@ private:
::com::sun::star::uno::Sequence< rtl::OUString > m_aCategories;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
+
+ bool m_bComplexCategoriesAxis;
};
/*************************************************************************
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 8ec895fbd452..c17e56ce6bc5 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -48,6 +48,8 @@
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <editeng/unoprnms.hxx>
+#include <svx/unoshape.hxx>
+#include <svx/unoshtxt.hxx>
#include <algorithm>
#include <memory>
@@ -110,7 +112,7 @@ Reference< drawing::XShape > createSingleLabel(
//correctPositionForRotation
LabelPositionHelper::correctPositionForRotation( xShape2DText
- , rAxisProperties.m_aLabelAlignment, rAxisLabelProperties.fRotationAngleDegree, false );
+ , rAxisProperties.m_aLabelAlignment, rAxisLabelProperties.fRotationAngleDegree, rAxisProperties.m_bComplexCategories );
return xShape2DText;
}
@@ -259,7 +261,7 @@ TickInfo* EquidistantLabelIterator::nextInfo()
return pTickInfo;
}
-B2DVector lcl_getLabelsDistance( TickIter& rIter, const B2DVector& rDistanceTickToText )
+B2DVector lcl_getLabelsDistance( TickIter& rIter, const B2DVector& rDistanceTickToText, double fRotationAngleDegree )
{
//calculates the height or width of a line of labels
//thus a following line of labels can be shifted for that distance
@@ -282,7 +284,7 @@ B2DVector lcl_getLabelsDistance( TickIter& rIter, const B2DVector& rDistanceTick
xShape2DText = pTickInfo->xTextShape;
if( xShape2DText.is() )
{
- awt::Size aSize = xShape2DText->getSize();
+ awt::Size aSize = ShapeFactory::getSizeAfterRotation( xShape2DText, fRotationAngleDegree );
if(fabs(aStaggerDirection.getX())>fabs(aStaggerDirection.getY()))
nDistance = ::std::max(nDistance,aSize.Width);
else
@@ -319,6 +321,47 @@ void lcl_shiftLables( TickIter& rIter, const B2DVector& rStaggerDistance )
}
}
+bool lcl_hasWordBreak( const Reference< drawing::XShape >& rxShape )
+{
+ if ( rxShape.is() )
+ {
+ SvxShape* pShape = SvxShape::getImplementation( rxShape );
+ SvxShapeText* pShapeText = dynamic_cast< SvxShapeText* >( pShape );
+ if ( pShapeText )
+ {
+ SvxTextEditSource* pTextEditSource = dynamic_cast< SvxTextEditSource* >( pShapeText->GetEditSource() );
+ if ( pTextEditSource )
+ {
+ pTextEditSource->UpdateOutliner();
+ SvxTextForwarder* pTextForwarder = pTextEditSource->GetTextForwarder();
+ if ( pTextForwarder )
+ {
+ USHORT nParaCount = pTextForwarder->GetParagraphCount();
+ for ( USHORT nPara = 0; nPara < nParaCount; ++nPara )
+ {
+ USHORT nLineCount = pTextForwarder->GetLineCount( nPara );
+ for ( USHORT nLine = 0; nLine < nLineCount; ++nLine )
+ {
+ USHORT nLineStart = 0;
+ USHORT nLineEnd = 0;
+ pTextForwarder->GetLineBoundaries( nLineStart, nLineEnd, nPara, nLine );
+ USHORT nWordStart = 0;
+ USHORT nWordEnd = 0;
+ if ( pTextForwarder->GetWordIndices( nPara, nLineStart, nWordStart, nWordEnd ) &&
+ ( nWordStart != nLineStart ) )
+ {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
class MaxLabelEquidistantTickIter : public EquidistantTickIter
{
//iterate over first two and last two labels and the longest label
@@ -714,10 +757,23 @@ bool VCartesianAxis::createTextShapes(
recordMaximumTextSize( pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree );
+ //better rotate if single words are broken apart
+ if( nLimitedSpaceForText>0 && !rAxisLabelProperties.bOverlapAllowed
+ && ::rtl::math::approxEqual( rAxisLabelProperties.fRotationAngleDegree, 0.0 )
+ && m_aAxisProperties.m_bComplexCategories
+ && lcl_hasWordBreak( pTickInfo->xTextShape ) )
+ {
+ rAxisLabelProperties.fRotationAngleDegree = 90;
+ rAxisLabelProperties.bLineBreakAllowed = false;
+ m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree;
+ removeTextShapesFromTicks();
+ return false;
+ }
+
//if NO OVERLAP -> remove overlapping shapes
if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed )
{
- if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, m_aAxisLabelProperties.fRotationAngleDegree ) )
+ if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ) )
{
bool bOverlapAlsoAfterSwitchingOnAutoStaggering = true;
if( !bIsStaggered && isAutoStaggeringOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis ) )
@@ -1286,10 +1342,15 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
::std::auto_ptr< TickIter > apTickIter = createLabelTickIterator( nTextLevel );
if(apTickIter.get())
{
+ double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
if( nTextLevel>0 )
+ {
lcl_shiftLables( *apTickIter.get(), aCummulatedLabelsDistance );
+ fRotationAngleDegree = 0.0;
+ }
aCummulatedLabelsDistance += lcl_getLabelsDistance( *apTickIter.get()
- , pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties ) );
+ , pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties )
+ , fRotationAngleDegree );
}
}
}
@@ -1302,7 +1363,7 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
lcl_shiftLables( aOuterIter
, lcl_getLabelsDistance( aInnerIter
- , pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties ) ) );
+ , pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties ), 0.0 ) );
}
}
@@ -1344,10 +1405,23 @@ void SAL_CALL VCartesianAxis::createLabels()
nScreenDistanceBetweenTicks*=2; //the above used tick iter does contain also the sub ticks -> thus the given distance is only the half
}
- AxisLabelProperties aCopy(m_aAxisLabelProperties);
- aCopy.bRhythmIsFix = true;
- aCopy.nRhythm = 1;
- AxisLabelProperties& rAxisLabelProperties = nTextLevel==0 ? m_aAxisLabelProperties : aCopy;
+ AxisLabelProperties aComplexProps(m_aAxisLabelProperties);
+ if( m_aAxisProperties.m_bComplexCategories )
+ {
+ if( nTextLevel==0 )
+ {
+ aComplexProps.bLineBreakAllowed = true;
+ aComplexProps.bOverlapAllowed = !::rtl::math::approxEqual( aComplexProps.fRotationAngleDegree, 0.0 );
+ }
+ else
+ {
+ aComplexProps.bOverlapAllowed = true;
+ aComplexProps.bRhythmIsFix = true;
+ aComplexProps.nRhythm = 1;
+ aComplexProps.fRotationAngleDegree = 0.0;
+ }
+ }
+ AxisLabelProperties& rAxisLabelProperties = m_aAxisProperties.m_bComplexCategories ? aComplexProps : m_aAxisLabelProperties;
while( !createTextShapes( m_xTextTarget, *apTickIter.get(), rAxisLabelProperties, pTickmarkHelper2D, nScreenDistanceBetweenTicks ) )
{
};
@@ -1417,7 +1491,7 @@ void SAL_CALL VCartesianAxis::updatePositions()
::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = m_aAllTickInfos.begin();
const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = m_aAllTickInfos.end();
- for( ; aDepthIter != aDepthEnd; aDepthIter++ )
+ for( sal_Int32 nDepth=0; aDepthIter != aDepthEnd; aDepthIter++, nDepth++ )
{
::std::vector< TickInfo >::iterator aTickIter = aDepthIter->begin();
const ::std::vector< TickInfo >::const_iterator aTickEnd = aDepthIter->end();
@@ -1434,8 +1508,12 @@ void SAL_CALL VCartesianAxis::updatePositions()
static_cast<sal_Int32>(aTickScreenPos2D.getX())
,static_cast<sal_Int32>(aTickScreenPos2D.getY()));
+ double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
+ if( nDepth>0 )
+ fRotationAngleDegree = 0.0;
+
// #i78696# use mathematically correct rotation now
- const double fRotationAnglePi(m_aAxisLabelProperties.fRotationAngleDegree * (F_PI / -180.0));
+ const double fRotationAnglePi(fRotationAngleDegree * (F_PI / -180.0));
uno::Any aATransformation = ShapeFactory::makeTransformation(aAnchorScreenPosition2D, fRotationAnglePi);
//set new position
@@ -1454,7 +1532,7 @@ void SAL_CALL VCartesianAxis::updatePositions()
//correctPositionForRotation
LabelPositionHelper::correctPositionForRotation( xShape2DText
- , m_aAxisProperties.m_aLabelAlignment, m_aAxisLabelProperties.fRotationAngleDegree, false );
+ , m_aAxisProperties.m_aLabelAlignment, fRotationAngleDegree, m_aAxisProperties.m_bComplexCategories );
}
}
}
@@ -1526,7 +1604,10 @@ void SAL_CALL VCartesianAxis::createShapes()
::std::auto_ptr< TickIter > apTickIter = createLabelTickIterator( nTextLevel );
if( apTickIter.get() )
{
- B2DVector aLabelsDistance( lcl_getLabelsDistance( *apTickIter.get(), pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties, false ) ) );
+ double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
+ if( nTextLevel>0 )
+ fRotationAngleDegree = 0.0;
+ B2DVector aLabelsDistance( lcl_getLabelsDistance( *apTickIter.get(), pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties, false ), fRotationAngleDegree ) );
sal_Int32 nCurrentLength = static_cast<sal_Int32>(aLabelsDistance.getLength());
aTickmarkPropertiesList.push_back( m_aAxisProperties.makeTickmarkPropertiesForComplexCategories( nOffset + nCurrentLength, 0, nTextLevel ) );
nOffset += nCurrentLength;
diff --git a/configure.in b/configure.in
index 57b54a4fa12c..8e2d9c4e6abc 100644
--- a/configure.in
+++ b/configure.in
@@ -2211,14 +2211,23 @@ _ACEOF
MINGW_GCCLIB_EH=YES
fi
AC_MSG_CHECKING([whether to use dynamic libstdc++])
+ MINGW_SHARED_LIBSTDCPP=
if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
+ MINGW_SHARED_LIBSTDCPP=stdc++_s
+ fi
+ if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then
+ MINGW_SHARED_LIBSTDCPP=stdc++.dll
+ fi
+ if test -n "$MINGW_SHARED_LIBSTDCPP" ; then
AC_MSG_CHECKING([dynamic libstdc++ name])
- MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'`
+ MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'`
MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null`
if test -n "$MINGW_GXXDLL"; then
+ MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP
MINGW_SHARED_GXXLIB=YES
AC_MSG_RESULT([use $MINGW_GXXDLL])
else
+ MINGW_SHARED_LIBSTDCPP=
AC_MSG_RESULT([no])
fi
else
@@ -2229,6 +2238,7 @@ _ACEOF
AC_SUBST(MINGW_SHARED_GCCLIB)
AC_SUBST(MINGW_GCCLIB_EH)
AC_SUBST(MINGW_SHARED_GXXLIB)
+ AC_SUBST(MINGW_SHARED_LIBSTDCPP)
AC_SUBST(MINGW_GCCDLL)
AC_SUBST(MINGW_GXXDLL)
fi
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 1174c1822fb6..4a8a88f2093a 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -27,6 +27,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cppuhelper.hxx"
+
+#include "sal/config.h"
+
+#include <vector>
+
#include <sal/alloca.h>
#include <osl/diagnose.h>
@@ -45,7 +50,7 @@
#include <com/sun/star/reflection/XEnumTypeDescription.hpp>
#include <com/sun/star/reflection/XIndirectTypeDescription.hpp>
#include <com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp>
-#include <com/sun/star/reflection/XInterfaceAttributeTypeDescription.hpp>
+#include <com/sun/star/reflection/XInterfaceAttributeTypeDescription2.hpp>
#include <com/sun/star/reflection/XMethodParameter.hpp>
#include <com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp>
#include <com/sun/star/reflection/XInterfaceTypeDescription2.hpp>
@@ -302,7 +307,7 @@ inline static typelib_TypeDescription * createCTD(
}
//==================================================================================================
inline static typelib_TypeDescription * createCTD(
- const Reference< XInterfaceAttributeTypeDescription > & xAttribute )
+ const Reference< XInterfaceAttributeTypeDescription2 > & xAttribute )
{
typelib_TypeDescription * pRet = 0;
if (xAttribute.is())
@@ -310,14 +315,31 @@ inline static typelib_TypeDescription * createCTD(
OUString aMemberName( xAttribute->getName() );
Reference< XTypeDescription > xType( xAttribute->getType() );
OUString aMemberTypeName( xType->getName() );
-
- typelib_typedescription_newInterfaceAttribute(
+ std::vector< rtl_uString * > getExc;
+ Sequence< Reference< XCompoundTypeDescription > > getExcs(
+ xAttribute->getGetExceptions() );
+ for (sal_Int32 i = 0; i != getExcs.getLength(); ++i)
+ {
+ OSL_ASSERT( getExcs[i].is() );
+ getExc.push_back( getExcs[i]->getName().pData );
+ }
+ std::vector< rtl_uString * > setExc;
+ Sequence< Reference< XCompoundTypeDescription > > setExcs(
+ xAttribute->getSetExceptions() );
+ for (sal_Int32 i = 0; i != setExcs.getLength(); ++i)
+ {
+ OSL_ASSERT( setExcs[i].is() );
+ setExc.push_back( setExcs[i]->getName().pData );
+ }
+ typelib_typedescription_newExtendedInterfaceAttribute(
(typelib_InterfaceAttributeTypeDescription **)&pRet,
xAttribute->getPosition(),
aMemberName.pData, // name
(typelib_TypeClass)xType->getTypeClass(),
aMemberTypeName.pData, // type name
- xAttribute->isReadOnly() );
+ xAttribute->isReadOnly(),
+ getExc.size(), getExc.empty() ? 0 : &getExc[0],
+ setExc.size(), setExc.empty() ? 0 : &setExc[0] );
}
return pRet;
}
@@ -643,7 +665,7 @@ static typelib_TypeDescription * createCTD(
pRet = createCTD( Reference< XInterfaceMethodTypeDescription >::query( xType ) );
break;
case TypeClass_INTERFACE_ATTRIBUTE:
- pRet = createCTD( Reference< XInterfaceAttributeTypeDescription >::query( xType ) );
+ pRet = createCTD( Reference< XInterfaceAttributeTypeDescription2 >::query( xType ) );
break;
default:
break;
diff --git a/curl/makefile.mk b/curl/makefile.mk
index f4e4c7f8ffd1..cb6ac50dc705 100644
--- a/curl/makefile.mk
+++ b/curl/makefile.mk
@@ -91,7 +91,7 @@ curl_CC+=-shared-libgcc
.ENDIF
curl_LIBS=-lws2_32 -lwinmm
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-curl_LIBS+=-lstdc++_s
+curl_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=.$/
#relative to CONFIGURE_DIR
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 3d360245f1ea..2a56a0acb52a 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -165,7 +165,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange
void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
{
// TODO: may be needs interaction handler to detect wherether the object state
- // can be changed even after errors
+ // can be changed even after errors
if ( m_nObjectState == embed::EmbedStates::LOADED )
{
@@ -485,14 +485,19 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState )
{
if ( nOldState != m_nObjectState )
// notify listeners that the object has changed the state
- StateChangeNotification_Impl( sal_False, nOldState, m_nObjectState ,aGuard);
+ StateChangeNotification_Impl( sal_False, nOldState, m_nObjectState, aGuard );
throw;
}
}
// notify listeners that the object has changed the state
- StateChangeNotification_Impl( sal_False, nOldState, nNewState,aGuard );
+ StateChangeNotification_Impl( sal_False, nOldState, nNewState, aGuard );
+
+ // let the object window be shown
+ if ( nNewState == embed::EmbedStates::UI_ACTIVE || nNewState == embed::EmbedStates::INPLACE_ACTIVE )
+ PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ),
+ uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
}
}
@@ -501,7 +506,6 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -517,7 +521,6 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -538,7 +541,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID )
{
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" );
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ResettableMutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -561,7 +564,10 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID )
// TODO/LATER: check if the verb is a supported one and if it is produce related operation
}
else
+ {
+ aGuard.clear();
changeState( nNewState );
+ }
}
//----------------------------------------------
@@ -569,7 +575,6 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -606,7 +611,6 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -659,7 +663,6 @@ sal_Int64 SAL_CALL OCommonEmbeddedObject::getStatus( sal_Int64 )
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index e0ff1266921a..f4c0c90162ed 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -342,7 +342,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName,
aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) );
// For now all the events are sent as object events
// aEvent.Source = ( xSource.is() ? xSource
- // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) );
+ // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) );
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
{
@@ -476,9 +476,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getImplementationId()
uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
- throw lang::DisposedException(); // TODO
+ throw lang::DisposedException();
return m_aClassID;
}
@@ -487,9 +486,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
::rtl::OUString SAL_CALL OCommonEmbeddedObject::getClassName()
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
- throw lang::DisposedException(); // TODO
+ throw lang::DisposedException();
return m_aClassName;
}
@@ -521,9 +519,9 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent(
}
// if ( m_bWaitSaveCompleted )
- // throw embed::WrongStateException(
- // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ),
- // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) );
+ // throw embed::WrongStateException(
+ // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ),
+ // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) );
return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY );
}
diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx
index fdf32830b728..c261b021472a 100755
--- a/filter/source/graphicfilter/ipict/shape.cxx
+++ b/filter/source/graphicfilter/ipict/shape.cxx
@@ -212,8 +212,8 @@ namespace PictReaderShape {
double const Y[2] = { oval.Top(), oval.Bottom() };
double width = X[1] - X[0];
double height = Y[1] - Y[0];
- if (ovalW > width) ovalW = width;
- if (ovalH > height) ovalH = height;
+ if (ovalW > width) ovalW = static_cast< int >( width );
+ if (ovalH > height) ovalH = static_cast< int >( height );
B2DRectangle rect(B2DPoint(X[0],Y[0]), B2DPoint(X[1],Y[1]));
B2DPolygon poly = tools::createPolygonFromRect(rect, (width != 0.0) ? ovalW/width : 0.0, (height != 0.0) ? ovalH/height : 0.0);
@@ -233,7 +233,7 @@ namespace PictReaderShape {
decalBR[0] -= (penSize+1)/2; decalBR[1] -= (penSize+1)/2;
}
// Quickdraw Drawing Reference 3-82: the pen size is only used for frame
- else decalBR[0] = decalBR[1] = 0.0;
+ else decalBR[0] = decalBR[1] = 0;
int numPt = orig.GetSize();
diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk
index 33d8959a474e..013fe5bbf56c 100644
--- a/framework/Library_fwe.mk
+++ b/framework/Library_fwe.mk
@@ -105,11 +105,24 @@ $(eval $(call gb_Library_add_linked_libs,fwe,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwe,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwe,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# TODO: visibility
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwi.mk b/framework/Library_fwi.mk
index 568f0a1eb22a..8512b3a874fe 100644
--- a/framework/Library_fwi.mk
+++ b/framework/Library_fwi.mk
@@ -84,6 +84,21 @@ $(eval $(call gb_Library_add_linked_libs,fwi,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwi,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ msvcrt \
+ unicows \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwi,\
advapi32 \
kernel32 \
@@ -93,5 +108,6 @@ $(eval $(call gb_Library_add_linked_libs,fwi,\
uwinapi \
))
endif
+endif
# TODO: visibility
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk
index 50c16b83b42a..1df0c931e564 100644
--- a/framework/Library_fwk.mk
+++ b/framework/Library_fwk.mk
@@ -190,10 +190,23 @@ $(eval $(call gb_Library_add_linked_libs,fwk,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwk,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwk,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwl.mk b/framework/Library_fwl.mk
index d2002115eaf0..b8b5290f1749 100644
--- a/framework/Library_fwl.mk
+++ b/framework/Library_fwl.mk
@@ -90,10 +90,23 @@ $(eval $(call gb_Library_add_linked_libs,fwl,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwl,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwl,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwm.mk b/framework/Library_fwm.mk
index 9ff49719148a..e67c2a627091 100644
--- a/framework/Library_fwm.mk
+++ b/framework/Library_fwm.mk
@@ -72,10 +72,23 @@ $(eval $(call gb_Library_add_linked_libs,fwm,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwm,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwm,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/framework/prj/build.lst b/framework/prj/build.lst
index 2c847918fee4..3a2eb98457f7 100644
--- a/framework/prj/build.lst
+++ b/framework/prj/build.lst
@@ -1,2 +1,3 @@
fr framework : LIBXSLT:libxslt l10n svtools NULL
fr framework\prj nmake - all fr_all NULL
+fr framework\qa\unoapi nmake - all fr_qa_unoapi NULL
diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..38a6cf7cced8
--- /dev/null
+++ b/framework/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = framework
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/framework/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx
index dda5aa352a08..722ca164f2b5 100755..100644
--- a/framework/source/layoutmanager/uielement.cxx
+++ b/framework/source/layoutmanager/uielement.cxx
@@ -132,24 +132,27 @@ namespace framework
UIElement& UIElement::operator= ( const UIElement& rUIElement )
{
- m_aType = rUIElement.m_aType;
- m_aName = rUIElement.m_aName;
- m_aUIName = rUIElement.m_aUIName;
- m_xUIElement = rUIElement.m_xUIElement;
- m_bFloating = rUIElement.m_bFloating;
- m_bVisible = rUIElement.m_bVisible;
- m_bUserActive = rUIElement.m_bUserActive;
- m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0;
- m_bDeactiveHide = rUIElement.m_bDeactiveHide;
- m_bMasterHide = rUIElement.m_bMasterHide;
- m_bContextSensitive = rUIElement.m_bContextSensitive;
- m_bContextActive = rUIElement.m_bContextActive;
- m_bNoClose = rUIElement.m_bNoClose;
- m_bSoftClose = rUIElement.m_bSoftClose;
- m_bStateRead = rUIElement.m_bStateRead;
- m_nStyle = rUIElement.m_nStyle;
- m_aDockedData = rUIElement.m_aDockedData;
- m_aFloatingData = rUIElement.m_aFloatingData;
+ if (&rUIElement != this)
+ {
+ m_aType = rUIElement.m_aType;
+ m_aName = rUIElement.m_aName;
+ m_aUIName = rUIElement.m_aUIName;
+ m_xUIElement = rUIElement.m_xUIElement;
+ m_bFloating = rUIElement.m_bFloating;
+ m_bVisible = rUIElement.m_bVisible;
+ m_bUserActive = rUIElement.m_bUserActive;
+ m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0;
+ m_bDeactiveHide = rUIElement.m_bDeactiveHide;
+ m_bMasterHide = rUIElement.m_bMasterHide;
+ m_bContextSensitive = rUIElement.m_bContextSensitive;
+ m_bContextActive = rUIElement.m_bContextActive;
+ m_bNoClose = rUIElement.m_bNoClose;
+ m_bSoftClose = rUIElement.m_bSoftClose;
+ m_bStateRead = rUIElement.m_bStateRead;
+ m_nStyle = rUIElement.m_nStyle;
+ m_aDockedData = rUIElement.m_aDockedData;
+ m_aFloatingData = rUIElement.m_aFloatingData;
+ }
return *this;
}
diff --git a/icu/makefile.mk b/icu/makefile.mk
index 7542aeb1ccd1..b4a9d7dd3bbf 100644
--- a/icu/makefile.mk
+++ b/icu/makefile.mk
@@ -149,9 +149,9 @@ icu_LDFLAGS+=-shared-libgcc
icu_LDFLAGS+=-L$(COMPATH)/lib/mingw -L$(COMPATH)/lib/w32api
.ENDIF
icu_LDFLAGS+=-L$(COMPATH)$/lib
-icu_LIBS=-lmingwthrd
+icu_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-icu_LIBS+=-lstdc++_s
+icu_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
icu_LDFLAGS+=-Wl,--enable-runtime-pseudo-reloc-v2
CONFIGURE_ACTION+=sh -c 'CFLAGS="-O -D_MT" CXXFLAGS="-O -D_MT" LDFLAGS="$(icu_LDFLAGS)" LIBS="$(icu_LIBS)" ./configure --build=i586-pc-mingw32 --enable-layout --enable-static --enable-shared=yes --enable-64bit-libs=no'
@@ -253,6 +253,30 @@ $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)$/so_add_binary
.ENDIF
+.IF "$(GUI)$(COM)"=="WNTGCC"
+ALLTAR : \
+ $(LB)$/icudata.lib \
+ $(LB)$/icuin$(ICU_BUILD_LIBPOST).lib \
+ $(LB)$/icuuc$(ICU_BUILD_LIBPOST).lib \
+ $(LB)$/icule$(ICU_BUILD_LIBPOST).lib \
+ $(LB)$/icutu$(ICU_BUILD_LIBPOST).lib
+
+$(LB)$/icudata.lib : $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
+ $(TOUCH) $@
+
+$(LB)$/icuin$(ICU_BUILD_LIBPOST).lib : $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
+ $(TOUCH) $@
+
+$(LB)$/icuuc$(ICU_BUILD_LIBPOST).lib : $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
+ $(TOUCH) $@
+
+$(LB)$/icule$(ICU_BUILD_LIBPOST).lib : $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
+ $(TOUCH) $@
+
+$(LB)$/icutu$(ICU_BUILD_LIBPOST).lib : $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
+ $(TOUCH) $@
+.ENDIF
+
# Since you never know what will be in a patch (for example, it may already
# patch at configure level) or in the case of a binary patch, we remove the
# entire package directory if a patch is newer.
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index a682cd8f0c75..eb036d6864ff 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -106,7 +106,7 @@ OpenOffice
script setup_osl
downloadname OOo_{productversion}_{os}_install_{languages}
langpackdownloadname OOo_{productversion}_languagepack_{os}_install_{languages}
- include {solarenvpath}/{os}/loader2,.,{localcommonpath}/bin,{localpath}/bin,{solarpath}/bin.{minor}/ooowoure,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
+ include {solarenvpath}/{os}/loader2,.,{localpath}/bin,{solarpath}/bin.{minor}/ooowoure,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
}
}
@@ -170,7 +170,7 @@ OpenOffice_wJRE
compression 5
script setup_osljre
downloadname OOo_{productversion}_{os}_installwjre_{languages}
- include {solarenvpath}/{os}/loader2,.,{localcommonpath}/bin,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
+ include {solarenvpath}/{os}/loader2,.,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
}
}
@@ -242,7 +242,7 @@ OpenOffice_Dev
script setup_osljre
downloadname OOo-dev_{productversion}_{os}_install_{languages}
langpackdownloadname OOo_{productversion}_languagepack_{os}_install_{languages}
- include {solarenvpath}/{os}/loader2,.,{localpath}/bin/dev,{localcommonpath}/bin,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
+ include {solarenvpath}/{os}/loader2,.,{localpath}/bin/dev,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
}
}
@@ -282,7 +282,7 @@ URE
active 1
compression 5
script ure
- include {solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/ure,{solarpath}/bin.{minor},{solarpath}/bin.{minor}/osl,{solarpath}/lib.{minor},{solarpath}/xml.{minor},{solarenvpath}/{os}/MS
+ include {solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/ure,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/xml.{minor},{solarenvpath}/{os}/MS
}
}
@@ -327,7 +327,7 @@ OpenOffice_SDK
active 1
compression 5
script sdkoo
- include {solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/bin.{minor},{solarenvpath}/{os}/MS
+ include {solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarenvpath}/{os}/MS
}
}
@@ -379,7 +379,7 @@ OpenOffice_Dev_SDK
active 1
compression 5
script sdkoo
- include {solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/bin.{minor},{solarenvpath}/{os}/MS
+ include {solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarenvpath}/{os}/MS
}
}
@@ -448,7 +448,7 @@ BrOffice
script setup_osl
downloadname BrOo_{productversion}_{os}_install_{languages}
langpackdownloadname BrOo_{productversion}_languagepack_{os}_install_{languages}
- include {solarenvpath}/{os}/loader2,.,{solarpath}/bin.{minor}/broffice,{localpath}/bin/broffice,{localcommonpath}/bin,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},{solarpath}/bin.{minor}/broffice,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
+ include {solarenvpath}/{os}/loader2,.,{solarpath}/bin.{minor}/broffice,{localpath}/bin/broffice,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
}
}
@@ -518,7 +518,7 @@ BrOffice_wJRE
compression 5
script setup_osljre
downloadname BrOo_{productversion}_{os}_installwjre_{languages}
- include {solarenvpath}/{os}/loader2,.,{solarpath}/bin.{minor}/broffice,{localpath}/bin/broffice,{localcommonpath}/bin,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},{solarpath}/bin.{minor}/broffice,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
+ include {solarenvpath}/{os}/loader2,.,{solarpath}/bin.{minor}/broffice,{localpath}/bin/broffice,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
}
}
@@ -590,6 +590,6 @@ BrOffice_Dev
script setup_osljre
downloadname BrOo-dev_{productversion}_{os}_install_{languages}
langpackdownloadname BrOo_{productversion}_languagepack_{os}_install_{languages}
- include {solarenvpath}/{os}/loader2,.,{solarpath}/bin.{minor}/broffice,{localpath}/bin/broffice_dev,{localcommonpath}/bin,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},{solarpath}/bin.{minor}/broffice,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/pck.{minor}/broffice_dev,{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
+ include {solarenvpath}/{os}/loader2,.,{solarpath}/bin.{minor}/broffice,{localpath}/bin/broffice_dev,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/broffice_dev,{solarpath}/pck.{minor}/broffice,{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external
}
}
diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java b/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java
index 48268a53a260..d9c57af30cce 100644
--- a/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java
+++ b/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java
@@ -52,7 +52,7 @@ final class Cache {
if (e == null) {
if (map.size() < maxSize) {
// There is still room for a new entry at the front:
- e = new Entry(content, map.size(), last, null);
+ e = new Entry(content, map.size(), null, first);
if (first == null) {
last = e;
} else {
diff --git a/jurt/prj/build.lst b/jurt/prj/build.lst
index 9b9b722bc3ae..6ba92a9ec6b6 100644
--- a/jurt/prj/build.lst
+++ b/jurt/prj/build.lst
@@ -17,3 +17,4 @@ ju jurt\com\sun\star\comp\urlresolver nmake - all ju_urlres ju_co_loader NULL
ju jurt\source\pipe nmake - all ju_src_pipe NULL
ju jurt\source\pipe\wrapper nmake - w ju_src_pipe_wrapper NULL
ju jurt\util nmake - all ju_ut ju_brid_jrm ju_co_bfactr ju_con ju_con_sock ju_con_pipe ju_cssl_uno ju_env_java ju_prot_urp ju_servman ju_urlres ju_src_pipe ju_libutil ju_uno NULL
+ju jurt\test\com\sun\star\lib\uno\protocols\urp nmake - all ju_test_css_lib_uno_protocols_urp NULL
diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java
index 31d3454bde48..2deb525adeac 100644
--- a/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java
+++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java
@@ -27,80 +27,114 @@
package com.sun.star.lib.uno.protocols.urp;
-import complexlib.ComplexTestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
-public final class Cache_Test extends ComplexTestCase {
- public String[] getTestMethodNames() {
- return new String[] { "test0", "test1", "test2", "test3" };
- }
-
- public void test0() {
+public final class Cache_Test {
+ @Test public void test0() {
Cache c = new Cache(0);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
- assure("1", i == Cache.NOT_CACHED && !f[0]);
+ assertTrue(i == Cache.NOT_CACHED && !f[0]);
i = c.add(f, "a");
- assure("2", i == Cache.NOT_CACHED && !f[0]);
+ assertTrue(i == Cache.NOT_CACHED && !f[0]);
i = c.add(f, "b");
- assure("3", i == Cache.NOT_CACHED && !f[0]);
+ assertTrue(i == Cache.NOT_CACHED && !f[0]);
i = c.add(f, "a");
- assure("4", i == Cache.NOT_CACHED && !f[0]);
+ assertTrue(i == Cache.NOT_CACHED && !f[0]);
}
- public void test1() {
+ @Test public void test1() {
Cache c = new Cache(1);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
- assure("1", i == 0 && !f[0]);
+ assertTrue(i == 0 && !f[0]);
i = c.add(f, "a");
- assure("2", i == 0 && f[0]);
+ assertTrue(i == 0 && f[0]);
i = c.add(f, "b");
- assure("3", i == 0 && !f[0]);
+ assertTrue(i == 0 && !f[0]);
i = c.add(f, "b");
- assure("4", i == 0 && f[0]);
+ assertTrue(i == 0 && f[0]);
i = c.add(f, "a");
- assure("5", i == 0 && !f[0]);
+ assertTrue(i == 0 && !f[0]);
}
- public void test2() {
+ @Test public void test2() {
Cache c = new Cache(2);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
- assure("1", i == 0 && !f[0]);
+ assertTrue(i == 0 && !f[0]);
i = c.add(f, "a");
- assure("2", i == 0 && f[0]);
+ assertTrue(i == 0 && f[0]);
i = c.add(f, "b");
- assure("3", i == 1 && !f[0]);
+ assertTrue(i == 1 && !f[0]);
i = c.add(f, "b");
- assure("4", i == 1 && f[0]);
+ assertTrue(i == 1 && f[0]);
i = c.add(f, "a");
- assure("5", i == 0 && f[0]);
+ assertTrue(i == 0 && f[0]);
i = c.add(f, "c");
- assure("6", i == 1 && !f[0]);
+ assertTrue(i == 1 && !f[0]);
i = c.add(f, "b");
- assure("7", i == 0 && !f[0]);
+ assertTrue(i == 0 && !f[0]);
}
- public void test3() {
+ @Test public void test3() {
Cache c = new Cache(3);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
- assure("1", i == 0 && !f[0]);
+ assertTrue(i == 0 && !f[0]);
i = c.add(f, "a");
- assure("3", i == 0 && f[0]);
+ assertTrue(i == 0 && f[0]);
i = c.add(f, "b");
- assure("5", i == 1 && !f[0]);
+ assertTrue(i == 1 && !f[0]);
i = c.add(f, "a");
- assure("3", i == 0 && f[0]);
+ assertTrue(i == 0 && f[0]);
i = c.add(f, "c");
- assure("7", i == 2 && !f[0]);
+ assertTrue(i == 2 && !f[0]);
i = c.add(f, "d");
- assure("9", i == 1 && !f[0]);
+ assertTrue(i == 1 && !f[0]);
i = c.add(f, "d");
- assure("11", i == 1 && f[0]);
+ assertTrue(i == 1 && f[0]);
+ }
+
+ @Test public void testNothingLostFromLruList() {
+ // Regardless in what order arbitrary values from 0, ..., 3 are inserted
+ // into a size-4 cache, afterwards adding -1, ..., -4 must return each
+ // possible index in the range from 0, ..., 3 exactly once (so their sum
+ // must be 6); this code systematically tests all such arbitrary ways up
+ // to length 8 (the code arguably violates recommendations for writing
+ // good tests, but actually helped track down an error in the Cache
+ // implementation):
+ int[] a = new int[8];
+ for (int i = 0; i < a.length; ++i) {
+ for (int j = 0; j < i; ++j) {
+ a[j] = 0;
+ }
+ for (;;) {
+ Cache c = new Cache(4);
+ for (int k = 0; k < i; ++k) {
+ c.add(new boolean[1], a[k]);
+ }
+ assertEquals(
+ 6,
+ (c.add(new boolean[1], -1) + c.add(new boolean[1], -2) +
+ c.add(new boolean[1], -3) + c.add(new boolean[1], -4)));
+ int j = i - 1;
+ while (j >= 0 && a[j] == 3) {
+ --j;
+ }
+ if (j < 0) {
+ break;
+ }
+ ++a[j];
+ for (int k = j + 1; k < i; ++k) {
+ a[k] = 0;
+ }
+ }
+ }
}
}
diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
index 4c01e9acc9c6..2621006faf95 100644
--- a/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
+++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
@@ -32,21 +32,14 @@ import com.sun.star.uno.IBridge;
import com.sun.star.uno.Type;
import com.sun.star.uno.TypeClass;
import com.sun.star.uno.XInterface;
-import complexlib.ComplexTestCase;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
+import org.junit.Test;
+import static org.junit.Assert.*;
-public final class Marshaling_Test extends ComplexTestCase {
- public String getTestObjectName() {
- return getClass().getName();
- }
-
- public String[] getTestMethodNames() {
- return new String[] { "test" };
- }
-
- public void test() throws Exception {
+public final class Marshaling_Test {
+ @Test public void test() throws Exception {
short cacheSize = (short)256;
TestBridge testBridge = new TestBridge();
Marshal marshal = new Marshal(testBridge, cacheSize);
@@ -239,7 +232,7 @@ public final class Marshaling_Test extends ComplexTestCase {
if(op1 instanceof Any)
op1 = ((Any)op1).getObject();
- assure("", compareObjects(op1, op2));
+ assertTrue(compareObjects(op1, op2));
}
}
diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java
index 393720c9756d..6a74710625e9 100644
--- a/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java
+++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java
@@ -34,20 +34,17 @@ import com.sun.star.uno.Any;
import com.sun.star.uno.IBridge;
import com.sun.star.uno.Type;
import com.sun.star.uno.XInterface;
-import complexlib.ComplexTestCase;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.util.LinkedList;
+import org.junit.Test;
+import static org.junit.Assert.*;
-public final class Protocol_Test extends ComplexTestCase {
- public String[] getTestMethodNames() {
- return new String[] { "test" };
- }
-
- public void test() throws Exception {
+public final class Protocol_Test {
+ @Test public void test() throws Exception {
IBridge iBridge = new TestBridge();
PipedInputStream inA = new PipedInputStream();
PipedOutputStream outA = new PipedOutputStream(inA);
@@ -93,7 +90,7 @@ public final class Protocol_Test extends ComplexTestCase {
new Object[] { "hallo" });
Message iMessage = iReceiver.readMessage();
Object[] t_params = iMessage.getArguments();
- assure("", "hallo".equals((String)t_params[0]));
+ assertEquals("hallo", (String)t_params[0]);
// send a reply
iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
@@ -118,7 +115,7 @@ public final class Protocol_Test extends ComplexTestCase {
iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
iSender.readMessage();
- assure("", "testString".equals(((String [])params[0])[0]));
+ assertEquals("testString", ((String [])params[0])[0]);
}
public void testCallWithInOutParameter(
@@ -133,7 +130,7 @@ public final class Protocol_Test extends ComplexTestCase {
Object[] t_params = iMessage.getArguments();
- assure("", "inString".equals(((String [])t_params[0])[0]));
+ assertEquals("inString", ((String [])t_params[0])[0]);
// provide reply
((String [])t_params[0])[0] = "outString";
@@ -142,7 +139,7 @@ public final class Protocol_Test extends ComplexTestCase {
iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
iSender.readMessage();
- assure("", "outString".equals(((String [])params[0])[0]));
+ assertEquals("outString", ((String [])params[0])[0]);
}
public void testCallWithResult(
@@ -161,7 +158,7 @@ public final class Protocol_Test extends ComplexTestCase {
Message iMessage = iSender.readMessage();
Object result = iMessage.getResult();
- assure("", "resultString".equals(result));
+ assertEquals("resultString", result);
}
public void testCallWhichRaisesException(
@@ -181,7 +178,7 @@ public final class Protocol_Test extends ComplexTestCase {
Object result = iMessage.getResult();
- assure("", result instanceof com.sun.star.uno.RuntimeException);
+ assertTrue(result instanceof com.sun.star.uno.RuntimeException);
}
public void testCallWithIn_Out_InOut_Paramters_and_result(
@@ -196,9 +193,9 @@ public final class Protocol_Test extends ComplexTestCase {
Object[] t_params = iMessage.getArguments();
- assure("", "hallo".equals((String)t_params[0]));
+ assertEquals("hallo", (String)t_params[0]);
- assure("", "inOutString".equals(((String [])t_params[2])[0]));
+ assertEquals("inOutString", ((String [])t_params[2])[0]);
((String [])t_params[1])[0] = "outString";
((String [])t_params[2])[0] = "inOutString_res";
@@ -209,11 +206,11 @@ public final class Protocol_Test extends ComplexTestCase {
iMessage = iSender.readMessage();
Object result = iMessage.getResult();
- assure("", "outString".equals(((String [])params[1])[0]));
+ assertEquals("outString", ((String [])params[1])[0]);
- assure("", "inOutString_res".equals(((String [])params[2])[0]));
+ assertEquals("inOutString_res", ((String [])params[2])[0]);
- assure("", "resultString".equals(result));
+ assertEquals("resultString", result);
}
public void testCallWhichReturnsAny(
@@ -229,9 +226,11 @@ public final class Protocol_Test extends ComplexTestCase {
false, new ThreadId(new byte[] { 0, 1 }), Any.VOID);
Message iMessage = iSender.readMessage();
Object result = iMessage.getResult();
- assure("", result instanceof Any
- && (TypeDescription.getTypeDescription(((Any) result).getType()).
- getZClass() == void.class));
+ assertTrue(
+ result instanceof Any &&
+ ((TypeDescription.getTypeDescription(((Any) result).getType()).
+ getZClass()) ==
+ void.class));
// send an ordinary request
iSender.writeRequest(
@@ -244,7 +243,7 @@ public final class Protocol_Test extends ComplexTestCase {
new Any(XInterface.class, null));
iMessage = iSender.readMessage();
result = iMessage.getResult();
- assure("", result == null);
+ assertNull(result);
// send an ordinary request
iSender.writeRequest(
@@ -256,7 +255,7 @@ public final class Protocol_Test extends ComplexTestCase {
false, new ThreadId(new byte[] { 0, 1 }), new Integer(501));
iMessage = iSender.readMessage();
result = iMessage.getResult();
- assure("", result.equals(new Integer(501)));
+ assertEquals(501, result);
}
private static final class Endpoint {
diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk b/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk
index c6e66558b65d..8403b2bd71ed 100644
--- a/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk
+++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk
@@ -24,10 +24,16 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
PRJ := ..$/..$/..$/..$/..$/..$/..$/..
PRJNAME := jurt
TARGET := test_com_sun_star_lib_uno_protocols_urp
+.IF "$(OOO_JUNIT_JAR)" != ""
PACKAGE := com$/sun$/star$/lib$/uno$/protocols$/urp
JAVATESTFILES := \
Cache_Test.java \
@@ -38,5 +44,8 @@ JAVAFILES := \
TestObject.java
JARFILES := ridl.jar
IDLTESTFILES := interfaces.idl
+.END
.INCLUDE: javaunittest.mk
+
+.END
diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk
index b172b9b89b8f..20a22e46fe0f 100644
--- a/libxml2/makefile.mk
+++ b/libxml2/makefile.mk
@@ -65,7 +65,7 @@ xml2_CC+=-shared-libgcc
.ENDIF
xml2_LIBS=-lws2_32
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-xml2_LIBS+=-lstdc++_s
+xml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure
diff --git a/libxmlsec/makefile.mk b/libxmlsec/makefile.mk
index f721db3148a4..322f82599e17 100644
--- a/libxmlsec/makefile.mk
+++ b/libxmlsec/makefile.mk
@@ -95,7 +95,7 @@ xmlsec_CC+=-shared-libgcc
.ENDIF
xmlsec_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-xmlsec_LIBS+=-lstdc++_s
+xmlsec_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure
diff --git a/libxslt/makefile.mk b/libxslt/makefile.mk
index c4bb5f50977b..d17b2c455f25 100644
--- a/libxslt/makefile.mk
+++ b/libxslt/makefile.mk
@@ -67,7 +67,7 @@ xslt_CC+=-shared-libgcc
.ENDIF
xslt_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-xslt_LIBS+=-lstdc++_s
+xslt_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure
diff --git a/lpsolve/makefile.mk b/lpsolve/makefile.mk
index 3e66303b038a..06cc41772dbf 100644
--- a/lpsolve/makefile.mk
+++ b/lpsolve/makefile.mk
@@ -57,7 +57,7 @@ BUILD_DIR=lpsolve55
lpsolve_LDFLAGS=-shared-libgcc
.ENDIF
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-lpsolve_LIBS=-lstdc++_s
+lpsolve_LIBS=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
BUILD_ACTION=lpsolve_LDFLAGS=$(lpsolve_LDFLAGS) lpsolve_LIBS=$(lpsolve_LIBS) cmd /c cgcc.bat
.ELSE
diff --git a/nss/makefile.mk b/nss/makefile.mk
index 34e278c4d84c..c2f0bf5984ca 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -113,7 +113,7 @@ nss_CXX+=-shared-libgcc
nss_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-nss_LIBS+=-lstdc++_s
+nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl
index 7eea49624045..b9cf8745d96e 100644
--- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl
+++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl
@@ -80,7 +80,7 @@ service UnoControlGridModel
<p>You can implement your own instance of <type>XGridDataModel</type> or use
the <type>DefaultGridDataModel</type>.
*/
- [property] XGridDataModel DataModel;
+ [property] XGridDataModel GridDataModel;
/** Specifies the vertical scrollbar mode.
<p>The default value is <FALSE/></p>
diff --git a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx
index 37c39e315e3e..79390c8b8022 100644
--- a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx
+++ b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx
@@ -63,6 +63,7 @@ struct ChartSpaceModel
bool mbAutoTitleDel; /// True = automatic title deleted manually.
bool mbPlotVisOnly; /// True = plot visible cells in a sheet only.
bool mbShowLabelsOverMax;/// True = show labels over chart maximum.
+ bool mbPivotChart; /// True = pivot chart.
explicit ChartSpaceModel();
~ChartSpaceModel();
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx
index b16ac91e09c9..bfcad1b43d04 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -40,6 +40,21 @@
#include "oox/drawingml/chart/plotareaconverter.hxx"
#include "oox/drawingml/chart/titleconverter.hxx"
+using ::rtl::OUString;
+using ::com::sun::star::awt::Point;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::makeAny;
+using ::com::sun::star::util::XNumberFormatsSupplier;
+using ::com::sun::star::drawing::XDrawPageSupplier;
+using ::com::sun::star::drawing::XShapes;
+using ::com::sun::star::chart2::XDiagram;
+using ::com::sun::star::chart2::XTitled;
+using ::com::sun::star::chart2::data::XDataReceiver;
+using ::com::sun::star::beans::XPropertySet;
+
namespace oox {
namespace drawingml {
namespace chart {
@@ -197,6 +212,14 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern
catch( Exception& )
{
}
+
+ // pivot chart
+ if ( mrModel.mbPivotChart )
+ {
+ PropertySet aProps( getChartDocument() );
+ aProps.setProperty( PROP_DisableDataTableDialog , true );
+ aProps.setProperty( PROP_DisableComplexChartTypes , true );
+ }
}
// ============================================================================
diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx
index d4b4a66f361f..06da27c02d01 100644
--- a/oox/source/drawingml/chart/chartspacefragment.cxx
+++ b/oox/source/drawingml/chart/chartspacefragment.cxx
@@ -81,6 +81,9 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const
case C_TOKEN( userShapes ):
mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
return 0;
+ case C_TOKEN( pivotSource ):
+ mrModel.mbPivotChart = true;
+ return 0;
}
break;
diff --git a/oox/source/drawingml/chart/chartspacemodel.cxx b/oox/source/drawingml/chart/chartspacemodel.cxx
index 3e2253a2ffc1..7f86448c8d08 100644
--- a/oox/source/drawingml/chart/chartspacemodel.cxx
+++ b/oox/source/drawingml/chart/chartspacemodel.cxx
@@ -38,7 +38,8 @@ ChartSpaceModel::ChartSpaceModel() :
mnStyle( 2 ),
mbAutoTitleDel( false ),
mbPlotVisOnly( false ),
- mbShowLabelsOverMax( false )
+ mbShowLabelsOverMax( false ),
+ mbPivotChart( false )
{
}
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 7d41b89bfa68..016ffc28bac5 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -116,6 +116,8 @@ DefaultValue
DiagonalBLTR
DiagonalTLBR
DialogLibraries
+DisableComplexChartTypes
+DisableDataTableDialog
DisplayLabels
DrillDownOnDoubleClick
Dropdown
diff --git a/openssl/opensslmingw.patch b/openssl/opensslmingw.patch
index 10b48531190d..0ea8287b53eb 100755
--- a/openssl/opensslmingw.patch
+++ b/openssl/opensslmingw.patch
@@ -69,9 +69,9 @@
+goto finished
+
+:shared_gxxlib
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lwsock32 -lgdi32 -lstdc++_s
++gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lwsock32 -lgdi32 %MINGW_SHARED_LIBSTDSPP%
+if errorlevel 1 goto end
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto -lstdc++_s
++gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto %MINGW_SHARED_LIBSTDSPP%
+if errorlevel 1 goto end
+goto finished
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index e4b9ec533c60..6175bdc4e613 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -166,6 +166,11 @@ ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const S
{
// this is ODF12 generation, let encrypted streams contain start-key-generation entry
bStoreStartKeyGeneration = sal_True;
+
+ // starting from ODF12 the version should be also in manifest:manifest element
+ pRootAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_VERSION ) ),
+ sCdataAttribute,
+ aDocVersion );
}
}
else
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 903191deb6be..ba83b34910ed 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -271,11 +271,10 @@ Sequence< OUString > SAL_CALL ZipPackageFolder::getElementNames( )
{
sal_uInt32 i=0, nSize = maContents.size();
Sequence < OUString > aSequence ( nSize );
- OUString *pNames = aSequence.getArray();
for ( ContentHash::const_iterator aIterator = maContents.begin(), aEnd = maContents.end();
aIterator != aEnd;
++i, ++aIterator)
- pNames[i] = (*aIterator).first;
+ aSequence[i] = (*aIterator).first;
return aSequence;
}
sal_Bool SAL_CALL ZipPackageFolder::hasByName( const OUString& aName )
@@ -358,7 +357,6 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
const ContentInfo &rInfo = *(*aCI).second;
Sequence < PropertyValue > aPropSet (PKG_SIZE_NOENCR_MNFST);
- PropertyValue *pValue = aPropSet.getArray();
if ( rInfo.bFolder )
pFolder = rInfo.pFolder;
@@ -369,12 +367,17 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
{
OUString sTempName = rPath + rShortName + OUString( RTL_CONSTASCII_USTRINGPARAM ( "/" ) );
- pValue[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty;
- pValue[PKG_MNFST_MEDIATYPE].Value <<= pFolder->GetMediaType();
- pValue[PKG_MNFST_VERSION].Name = sVersionProperty;
- pValue[PKG_MNFST_VERSION].Value <<= pFolder->GetVersion();
- pValue[PKG_MNFST_FULLPATH].Name = sFullPathProperty;
- pValue[PKG_MNFST_FULLPATH].Value <<= sTempName;
+ if ( pFolder->GetMediaType().getLength() )
+ {
+ aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty;
+ aPropSet[PKG_MNFST_MEDIATYPE].Value <<= pFolder->GetMediaType();
+ aPropSet[PKG_MNFST_VERSION].Name = sVersionProperty;
+ aPropSet[PKG_MNFST_VERSION].Value <<= pFolder->GetVersion();
+ aPropSet[PKG_MNFST_FULLPATH].Name = sFullPathProperty;
+ aPropSet[PKG_MNFST_FULLPATH].Value <<= sTempName;
+ }
+ else
+ aPropSet.realloc( 0 );
pFolder->saveContents( sTempName, rManList, rZipOut, rEncryptionKey, rRandomPool);
}
@@ -395,12 +398,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
sal_Bool bToBeEncrypted = pStream->IsToBeEncrypted() && (bHaveEncryptionKey || pStream->HasOwnKey());
sal_Bool bToBeCompressed = bToBeEncrypted ? sal_True : pStream->IsToBeCompressed();
- pValue[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty;
- pValue[PKG_MNFST_MEDIATYPE].Value <<= pStream->GetMediaType( );
- pValue[PKG_MNFST_VERSION].Name = sVersionProperty;
- pValue[PKG_MNFST_VERSION].Value <<= ::rtl::OUString(); // no version is stored for streams currently
- pValue[PKG_MNFST_FULLPATH].Name = sFullPathProperty;
- pValue[PKG_MNFST_FULLPATH].Value <<= pTempEntry->sPath;
+ aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty;
+ aPropSet[PKG_MNFST_MEDIATYPE].Value <<= pStream->GetMediaType( );
+ aPropSet[PKG_MNFST_VERSION].Name = sVersionProperty;
+ aPropSet[PKG_MNFST_VERSION].Value <<= ::rtl::OUString(); // no version is stored for streams currently
+ aPropSet[PKG_MNFST_FULLPATH].Name = sFullPathProperty;
+ aPropSet[PKG_MNFST_FULLPATH].Value <<= pTempEntry->sPath;
OSL_ENSURE( pStream->GetStreamMode() != PACKAGE_STREAM_NOTSET, "Unacceptable ZipPackageStream mode!" );
@@ -522,23 +525,22 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
// a magic header
aPropSet.realloc(PKG_SIZE_ENCR_MNFST);
- pValue = aPropSet.getArray();
- pValue[PKG_MNFST_INIVECTOR].Name = sInitialisationVectorProperty;
- pValue[PKG_MNFST_INIVECTOR].Value <<= pStream->getInitialisationVector();
- pValue[PKG_MNFST_SALT].Name = sSaltProperty;
- pValue[PKG_MNFST_SALT].Value <<= pStream->getSalt();
- pValue[PKG_MNFST_ITERATION].Name = sIterationCountProperty;
- pValue[PKG_MNFST_ITERATION].Value <<= pStream->getIterationCount ();
+ aPropSet[PKG_MNFST_INIVECTOR].Name = sInitialisationVectorProperty;
+ aPropSet[PKG_MNFST_INIVECTOR].Value <<= pStream->getInitialisationVector();
+ aPropSet[PKG_MNFST_SALT].Name = sSaltProperty;
+ aPropSet[PKG_MNFST_SALT].Value <<= pStream->getSalt();
+ aPropSet[PKG_MNFST_ITERATION].Name = sIterationCountProperty;
+ aPropSet[PKG_MNFST_ITERATION].Value <<= pStream->getIterationCount ();
// Need to store the uncompressed size in the manifest
OSL_ENSURE( nOwnStreamOrigSize >= 0, "The stream size was not correctly initialized!\n" );
- pValue[PKG_MNFST_UCOMPSIZE].Name = sSizeProperty;
- pValue[PKG_MNFST_UCOMPSIZE].Value <<= nOwnStreamOrigSize;
+ aPropSet[PKG_MNFST_UCOMPSIZE].Name = sSizeProperty;
+ aPropSet[PKG_MNFST_UCOMPSIZE].Value <<= nOwnStreamOrigSize;
if ( bRawStream || bTransportOwnEncrStreamAsRaw )
{
- pValue[PKG_MNFST_DIGEST].Name = sDigestProperty;
- pValue[PKG_MNFST_DIGEST].Value <<= pStream->getDigest();
+ aPropSet[PKG_MNFST_DIGEST].Name = sDigestProperty;
+ aPropSet[PKG_MNFST_DIGEST].Value <<= pStream->getDigest();
}
}
}
@@ -655,8 +657,8 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
if ( bToBeEncrypted )
{
- pValue[PKG_MNFST_DIGEST].Name = sDigestProperty;
- pValue[PKG_MNFST_DIGEST].Value <<= pStream->getDigest();
+ aPropSet[PKG_MNFST_DIGEST].Name = sDigestProperty;
+ aPropSet[PKG_MNFST_DIGEST].Value <<= pStream->getDigest();
pStream->SetIsEncrypted ( sal_True );
}
}
@@ -695,7 +697,8 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
// folder can have a mediatype only in package format
- if ( m_nFormat == embed::StorageFormats::PACKAGE || ( m_nFormat == embed::StorageFormats::OFOPXML && !rInfo.bFolder ) )
+ if ( aPropSet.getLength()
+ && ( m_nFormat == embed::StorageFormats::PACKAGE || ( m_nFormat == embed::StorageFormats::OFOPXML && !rInfo.bFolder ) ) )
rManList.push_back( aPropSet );
}
diff --git a/qadevOOo/prj/build.lst b/qadevOOo/prj/build.lst
index e159c6a7b6cc..50d60a563c64 100644
--- a/qadevOOo/prj/build.lst
+++ b/qadevOOo/prj/build.lst
@@ -4,4 +4,3 @@ qa qadevOOo nmake - all qa_runner_ant_build NULL
qa qadevOOo\runner nmake - all qa_make_package qa_runner_ant_build NULL
qa qadevOOo\qa\unoapi nmake - all qa_qa_unoapi qa_make_package NULL
-qa qadevOOo\qa\complex\junitskeleton nmake - all qa_complex_junitskel qa_make_package NULL
diff --git a/redland/raptor/makefile.mk b/redland/raptor/makefile.mk
index b67f6ef314ce..82e92b41b2b7 100644
--- a/redland/raptor/makefile.mk
+++ b/redland/raptor/makefile.mk
@@ -74,7 +74,7 @@ raptor_CC+=-shared-libgcc
.ENDIF
raptor_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-raptor_LIBS+=-lstdc++_s
+raptor_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
diff --git a/redland/rasqal/makefile.mk b/redland/rasqal/makefile.mk
index 66fca99d1600..6f2afc423f71 100644
--- a/redland/rasqal/makefile.mk
+++ b/redland/rasqal/makefile.mk
@@ -72,7 +72,7 @@ rasqal_CC+=-shared-libgcc
.ENDIF
rasqal_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-rasqal_LIBS+=-lstdc++_s
+rasqal_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
diff --git a/redland/redland/makefile.mk b/redland/redland/makefile.mk
index 20b1210dd2f9..ac1558475c5e 100644
--- a/redland/redland/makefile.mk
+++ b/redland/redland/makefile.mk
@@ -72,7 +72,7 @@ redland_CC+=-shared-libgcc
.ENDIF
redland_LIBS=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-redland_LIBS+=-lstdc++_s
+redland_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 14c24480d98b..2db057b2fa12 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -291,7 +291,7 @@ typedef void * sal_Handle;
These macros are used for inline declarations of exception classes, as in
rtl/malformeduriexception.hxx.
*/
-#if defined __GNUC__
+#if defined(__GNUC__) && ! defined(__MINGW32__)
#define SAL_EXCEPTION_DLLPUBLIC_EXPORT SAL_DLLPUBLIC_EXPORT
#define SAL_EXCEPTION_DLLPRIVATE SAL_DLLPRIVATE
#else
diff --git a/sal/osl/all/makefile.mk b/sal/osl/all/makefile.mk
index 0d105906effb..5da61e8b2ec3 100644
--- a/sal/osl/all/makefile.mk
+++ b/sal/osl/all/makefile.mk
@@ -55,7 +55,8 @@ SLOFILES= \
$(SLO)$/utility.obj\
$(SLO)$/filepath.obj\
$(SLO)$/debugbase.obj\
- $(SLO)$/loadmodulerelative.obj
+ $(SLO)$/loadmodulerelative.obj \
+ $(SLO)/printtrace.obj
# $(SLO)$/readline.obj\
@@ -64,7 +65,8 @@ OBJFILES= \
$(OBJ)$/utility.obj\
$(OBJ)$/filepath.obj\
$(OBJ)$/debugbase.obj\
- $(OBJ)$/loadmodulerelative.obj
+ $(OBJ)$/loadmodulerelative.obj \
+ $(OBJ)/printtrace.obj
# $(OBJ)$/readline.obj\
#.ENDIF
diff --git a/sal/osl/all/printtrace.cxx b/sal/osl/all/printtrace.cxx
new file mode 100644
index 000000000000..5d79d9b1de5a
--- /dev/null
+++ b/sal/osl/all/printtrace.cxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#include "precompiled_sal.hxx"
+
+#include "sal/config.h"
+
+#include <cstdarg>
+#include <cstdio>
+#include <cstring>
+
+#include <stdio.h> // snprintf, vsnprintf
+
+#include "osl/diagnose.h"
+#include "osl/thread.hxx"
+#include "rtl/string.h"
+#include "sal/types.h"
+
+#include "printtrace.h"
+
+void printTrace(unsigned long pid, char const * format, std::va_list arguments)
+{
+ char buf[1024];
+ int n1 = snprintf(
+ buf, sizeof buf, "Trace %lu/%" SAL_PRIuUINT32 ": \"", pid,
+ osl::Thread::getCurrentIdentifier());
+ OSL_ASSERT(
+ n1 >= 0 &&
+ (static_cast< unsigned int >(n1) <
+ sizeof buf - RTL_CONSTASCII_LENGTH("\"...\n")));
+ int n2 = sizeof buf - n1 - RTL_CONSTASCII_LENGTH("\"...\n");
+ int n3 = vsnprintf(buf + n1, n2, format, arguments);
+ if (n3 < 0) {
+ std::strcpy(buf + n1, "\"???\n");
+ } else if (n3 < n2) {
+ std::strcpy(buf + n1 + n3, "\"\n");
+ } else {
+ std::strcpy(buf + n1 + n2 - 1, "\"...\n");
+ }
+ std::fputs(buf, stderr);
+}
diff --git a/sal/osl/inc/printtrace.h b/sal/osl/inc/printtrace.h
new file mode 100644
index 000000000000..9e1d514b0d08
--- /dev/null
+++ b/sal/osl/inc/printtrace.h
@@ -0,0 +1,46 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_SAL_OSL_INC_PRINTTRACE_H
+#define INCLUDED_SAL_OSL_INC_PRINTTRACE_H
+
+#include "sal/config.h"
+
+#include <stdarg.h>
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+/* called internally by osl_trace */
+void printTrace(unsigned long pid, char const * format, va_list arguments);
+
+#if defined __cplusplus
+}
+#endif
+
+#endif
diff --git a/sal/osl/os2/diagnose.c b/sal/osl/os2/diagnose.c
index 4921e20fd5af..b105e0b78c29 100644
--- a/sal/osl/os2/diagnose.c
+++ b/sal/osl/os2/diagnose.c
@@ -35,6 +35,8 @@
#include <osl/diagnose.h>
#include <osl/thread.h>
+#include "printtrace.h"
+
BYTE oslTraceEnv[] = "OSL_TRACE_TO_FILE";
typedef pfunc_osl_printDebugMessage oslDebugMessageFunc;
@@ -53,29 +55,11 @@ void SAL_CALL osl_breakDebug()
/************************************************************************/
/* osl_trace */
/************************************************************************/
-/* comment this define to stop output thread identifier*/
-#define OSL_TRACE_THREAD 1
-void SAL_CALL osl_trace (
- const sal_Char* lpszFormat, ...)
-{
+void osl_trace(char const * pszFormat, ...) {
va_list args;
-
-#if defined(OSL_PROFILING)
- fprintf(stderr, "Time: %06lu : ", osl_getGlobalTimer() );
-#else
-#if defined(OSL_TRACE_THREAD)
- fprintf(stderr,"Thread: %6d :",osl_getThreadIdentifier(NULL));
-#else
- fprintf(stderr, "Trace Message: ");
-#endif
-#endif
-
- va_start(args, lpszFormat);
- vfprintf(stderr, lpszFormat, args);
+ va_start(args, pszFormat);
+ printTrace(0, pszFormat, args); /* TODO: pid */
va_end(args);
-
- fprintf(stderr,"\n");
- fflush(stderr);
}
/*----------------------------------------------------------------------------*/
diff --git a/sal/osl/unx/diagnose.c b/sal/osl/unx/diagnose.c
index bb8cbca406bd..02967b3ad7f7 100644
--- a/sal/osl/unx/diagnose.c
+++ b/sal/osl/unx/diagnose.c
@@ -28,7 +28,6 @@
#include "osl/diagnose.h"
#include "system.h"
-
#ifndef HAVE_DLFCN_H
#if defined(LINUX) || defined(SOLARIS)
@@ -58,6 +57,8 @@
#define INCLUDED_STDDEF_H
#endif
+#include "printtrace.h"
+
/************************************************************************/
/* Internal data structures and functions */
/************************************************************************/
@@ -301,32 +302,9 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL osl_setDetailedDebugMessageFunc (
/************************************************************************/
/* osl_trace */
/************************************************************************/
-/* comment this define to stop output thread identifier*/
-#define OSL_TRACE_THREAD 1
-void SAL_CALL osl_trace (
- const sal_Char* lpszFormat, ...)
-{
+void osl_trace(char const * pszFormat, ...) {
va_list args;
-
-#if defined(OSL_PROFILING)
- fprintf(stderr, "Time: %06lu : ", osl_getGlobalTimer() );
-#else
-#if defined(OSL_TRACE_THREAD)
- fprintf(
- stderr, "Thread: %6lu :",
- SAL_INT_CAST(unsigned long, osl_getThreadIdentifier(NULL)));
-#else
- fprintf(stderr, "Trace Message: ");
-#endif
-#endif
-
- va_start(args, lpszFormat);
- vfprintf(stderr, lpszFormat, args);
+ va_start(args, pszFormat);
+ printTrace((unsigned long) getpid(), pszFormat, args);
va_end(args);
-
- fprintf(stderr,"\n");
- fflush(stderr);
}
-
-/************************************************************************/
-
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index b46bff44b73c..9c75e4502743 100644..100755
--- a/sal/osl/w32/diagnose.c
+++ b/sal/osl/w32/diagnose.c
@@ -32,6 +32,8 @@
#include <osl/diagnose.h>
#include <osl/thread.h>
+#include "printtrace.h"
+
#define NO_DEBUG_CRT
static pfunc_osl_printDebugMessage _pPrintDebugMessage = NULL;
@@ -61,46 +63,21 @@ void SAL_CALL osl_breakDebug(void)
DebugBreak();
}
-
-
-/* Uncomment this define to get profiling time output */
-/* #define OSL_PROFILING */
-/* comment this define to stop output thread identifier*/
-#define OSL_TRACE_THREAD 1
-void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...)
-{
+void osl_trace(char const * pszFormat, ...) {
va_list args;
- int written = 0;
-
- va_start(args, lpszFormat);
-
-#if defined(OSL_PROFILING)
- fprintf(stderr, "time : %06lu : ", osl_getGlobalTimer() );
-#else
-#if defined(OSL_TRACE_THREAD)
- fprintf(stderr,"Thread: %6d :",osl_getThreadIdentifier(NULL));
-#else
- fprintf(stderr,"Trace Message : ");
-#endif
-#endif
-
+ va_start(args, pszFormat);
if ( IsDebuggerPresent() )
{
sal_Char szMessage[512];
- written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args );
+ int written = _vsnprintf(
+ szMessage, sizeof(szMessage) - 2, pszFormat, args );
if ( written == -1 )
written = sizeof(szMessage) - 2;
szMessage[ written++ ] = '\n';
szMessage[ written ] = 0;
OutputDebugString( szMessage );
}
-
- vfprintf(stderr,lpszFormat, args);
-
- fprintf(stderr,"\n");
-
- fflush(stderr);
-
+ printTrace((unsigned long) _getpid(), pszFormat, args);
va_end(args);
}
diff --git a/sal/systools/win32/uwinapi/ResolveUnicows.cpp b/sal/systools/win32/uwinapi/ResolveUnicows.cpp
index cd5943004f17..d2864d3413cb 100644
--- a/sal/systools/win32/uwinapi/ResolveUnicows.cpp
+++ b/sal/systools/win32/uwinapi/ResolveUnicows.cpp
@@ -1,6 +1,7 @@
#ifdef __MINGW32__
#define _GDI32_
#include "macros.h"
+#include <w32api.h>
#include <multimon.h>
extern "C" {
extern HMODULE hModuleUnicowsDLL;
@@ -461,7 +462,11 @@ DEFINE_UNICOWS_THUNK( kernel32, BOOL, WINAPI, UpdateResourceW, (HANDLE,LPCWSTR,L
DEFINE_UNICOWS_THUNK( version, DWORD, WINAPI, VerFindFileW, (DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT) )
DEFINE_UNICOWS_THUNK( version, DWORD, WINAPI, VerInstallFileW, (DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT) )
DEFINE_UNICOWS_THUNK( kernel32, DWORD, WINAPI, VerLanguageNameW, (DWORD,LPWSTR,DWORD) )
+#if ( __W32API_MAJOR_VERSION > 3 ) || ( __W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION > 13 )
+DEFINE_UNICOWS_THUNK( version, BOOL, WINAPI, VerQueryValueW, (const LPVOID,LPCWSTR,LPVOID*,PUINT) )
+#else
DEFINE_UNICOWS_THUNK( version, BOOL, WINAPI, VerQueryValueW, (const LPVOID,LPWSTR,LPVOID*,PUINT) )
+#endif
DEFINE_UNICOWS_THUNK( user32, SHORT, WINAPI, VkKeyScanExW, (WCHAR,HKL) )
DEFINE_UNICOWS_THUNK( user32, SHORT, WINAPI, VkKeyScanW, (WCHAR) )
DEFINE_UNICOWS_THUNK( user32, DWORD, WINAPI, SetupDecompressOrCopyFileW, (PCWSTR,PCWSTR,PUINT) )
diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx
index 50b8586bdace..7966e07d00f8 100644
--- a/sc/inc/charthelper.hxx
+++ b/sc/inc/charthelper.hxx
@@ -31,10 +31,15 @@
#include <tools/solar.h>
#include "address.hxx"
#include "global.hxx"
+#include "rangelst.hxx"
#include <com/sun/star/chart2/XChartDocument.hpp>
class SdrObject;
+class SdrPage;
+class ScModelObj;
+
+typedef ::std::vector< ScRangeList > ScRangeListVector;
/** Use this to handle charts in a calc document
*/
@@ -49,6 +54,12 @@ public:
::com::sun::star::uno::Sequence< rtl::OUString >& rRanges );
static void SetChartRanges( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc,
const ::com::sun::star::uno::Sequence< rtl::OUString >& rRanges );
+
+ static void AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrObject* pObject );
+ static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrPage* pPage );
+ static void GetChartNames( ::std::vector< ::rtl::OUString >& rChartNames, SdrPage* pPage );
+ static void CreateProtectedChartListenersAndNotify( ScDocument* pDoc, SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab,
+ const ScRangeListVector& rRangesVector, const ::std::vector< ::rtl::OUString >& rExcludedChartNames, bool bSameDoc = true );
};
#endif
diff --git a/sc/inc/clipparam.hxx b/sc/inc/clipparam.hxx
index 78b5474229d1..ce2d4ef30f46 100644
--- a/sc/inc/clipparam.hxx
+++ b/sc/inc/clipparam.hxx
@@ -30,6 +30,7 @@
#include "rangelst.hxx"
#include "rangenam.hxx"
+#include "charthelper.hxx"
#include <vector>
@@ -41,9 +42,11 @@ struct ScClipParam
{
enum Direction { Unspecified, Column, Row };
- ScRangeList maRanges;
- Direction meDirection;
- bool mbCutMode;
+ ScRangeList maRanges;
+ Direction meDirection;
+ bool mbCutMode;
+ sal_uInt32 mnSourceDocID;
+ ScRangeListVector maProtectedChartRangesVector;
ScClipParam();
ScClipParam(const ScRange& rRange, bool bCutMode);
@@ -70,6 +73,9 @@ struct ScClipParam
ScRange getWholeRange() const;
void transpose();
+
+ sal_uInt32 getSourceDocID() const { return mnSourceDocID; }
+ void setSourceDocID( sal_uInt32 nVal ) { mnSourceDocID = nVal; }
};
// ============================================================================
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 19cceb210b65..a9c08c2884fd 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -528,6 +528,7 @@
#define SC_UNO_ZOOMTYPE "ZoomType"
#define SC_UNO_ZOOMVALUE "ZoomValue"
#define SC_UNO_UPDTEMPL "UpdateFromTemplate"
+#define SC_UNO_VISAREASCREEN "VisibleAreaOnScreen"
/*Stampit enable/disable print cancel */
#define SC_UNO_ALLOWPRINTJOBCANCEL "AllowPrintJobCancel"
diff --git a/sc/source/core/data/clipparam.cxx b/sc/source/core/data/clipparam.cxx
index 9ab5995ca26c..352c599e54bb 100644
--- a/sc/source/core/data/clipparam.cxx
+++ b/sc/source/core/data/clipparam.cxx
@@ -36,13 +36,15 @@ using ::std::vector;
ScClipParam::ScClipParam() :
meDirection(Unspecified),
- mbCutMode(false)
+ mbCutMode(false),
+ mnSourceDocID(0)
{
}
ScClipParam::ScClipParam(const ScRange& rRange, bool bCutMode) :
meDirection(Unspecified),
- mbCutMode(bCutMode)
+ mbCutMode(bCutMode),
+ mnSourceDocID(0)
{
maRanges.Append(rRange);
}
@@ -50,7 +52,9 @@ ScClipParam::ScClipParam(const ScRange& rRange, bool bCutMode) :
ScClipParam::ScClipParam(const ScClipParam& r) :
maRanges(r.maRanges),
meDirection(r.meDirection),
- mbCutMode(r.mbCutMode)
+ mbCutMode(r.mbCutMode),
+ mnSourceDocID(r.mnSourceDocID),
+ maProtectedChartRangesVector(r.maProtectedChartRangesVector)
{
}
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index d86d174ab414..303dbd2ccae3 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -469,9 +469,12 @@ void ScDocument::UpdateChart( const String& rChartName )
}
// After the update, chart keeps track of its own data source ranges,
- // the listener doesn't need to listen anymore.
- if(pChartListenerCollection)
+ // the listener doesn't need to listen anymore, except the chart has
+ // an internal data provider.
+ if ( !( xChartDoc.is() && xChartDoc->hasInternalDataProvider() ) && pChartListenerCollection )
+ {
pChartListenerCollection->ChangeListening( rChartName, new ScRangeList );
+ }
}
void ScDocument::RestoreChartListener( const String& rName )
@@ -579,9 +582,28 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
svt::EmbeddedObjectRef::TryRunningState( xIPObj );
// After the change, chart keeps track of its own data source ranges,
- // the listener doesn't need to listen anymore.
-
- pChartListener->ChangeListening( new ScRangeList, bDataChanged );
+ // the listener doesn't need to listen anymore, except the chart has
+ // an internal data provider.
+ bool bInternalDataProvider = false;
+ if ( xIPObj.is() )
+ {
+ try
+ {
+ uno::Reference< chart2::XChartDocument > xChartDoc( xIPObj->getComponent(), uno::UNO_QUERY_THROW );
+ bInternalDataProvider = xChartDoc->hasInternalDataProvider();
+ }
+ catch ( uno::Exception& )
+ {
+ }
+ }
+ if ( bInternalDataProvider )
+ {
+ pChartListener->ChangeListening( aNewRLR, bDataChanged );
+ }
+ else
+ {
+ pChartListener->ChangeListening( new ScRangeList, bDataChanged );
+ }
}
}
}
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 1b2cde3d4a6d..6c091250c80d 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -33,6 +33,7 @@
#include "drwlayer.hxx"
#include "rangelst.hxx"
#include "chartlis.hxx"
+#include "docuno.hxx"
//#include <vcl/svapp.hxx>
#include <svx/svditer.hxx>
@@ -296,3 +297,155 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument
if( xModel.is() )
xModel->unlockControllers();
}
+
+void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrObject* pObject )
+{
+ if ( pDocument && pObject && ( pObject->GetObjIdentifier() == OBJ_OLE2 ) )
+ {
+ SdrOle2Obj* pSdrOle2Obj = dynamic_cast< SdrOle2Obj* >( pObject );
+ if ( pSdrOle2Obj && pSdrOle2Obj->IsChart() )
+ {
+ uno::Reference< embed::XEmbeddedObject > xEmbeddedObj = pSdrOle2Obj->GetObjRef();
+ if ( xEmbeddedObj.is() )
+ {
+ bool bDisableDataTableDialog = false;
+ svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj );
+ uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
+ if ( xProps.is() &&
+ ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) &&
+ bDisableDataTableDialog )
+ {
+ ::rtl::OUString aChartName = pSdrOle2Obj->GetPersistName();
+ ScRange aEmptyRange;
+ ScChartListener aSearcher( aChartName, pDocument, aEmptyRange );
+ USHORT nIndex = 0;
+ ScChartListenerCollection* pCollection = pDocument->GetChartListenerCollection();
+ if ( pCollection && pCollection->Search( &aSearcher, nIndex ) )
+ {
+ ScChartListener* pListener = static_cast< ScChartListener* >( pCollection->At( nIndex ) );
+ if ( pListener )
+ {
+ const ScRangeListRef& rRangeList = pListener->GetRangeList();
+ if ( rRangeList.Is() )
+ {
+ rRangesVector.push_back( *rRangeList );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrPage* pPage )
+{
+ if ( pDocument && pPage )
+ {
+ SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+ SdrObject* pObject = aIter.Next();
+ while ( pObject )
+ {
+ AddRangesIfProtectedChart( rRangesVector, pDocument, pObject );
+ pObject = aIter.Next();
+ }
+ }
+}
+
+void ScChartHelper::GetChartNames( ::std::vector< ::rtl::OUString >& rChartNames, SdrPage* pPage )
+{
+ if ( pPage )
+ {
+ SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+ SdrObject* pObject = aIter.Next();
+ while ( pObject )
+ {
+ if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
+ {
+ SdrOle2Obj* pSdrOle2Obj = dynamic_cast< SdrOle2Obj* >( pObject );
+ if ( pSdrOle2Obj && pSdrOle2Obj->IsChart() )
+ {
+ rChartNames.push_back( pSdrOle2Obj->GetPersistName() );
+ }
+ }
+ pObject = aIter.Next();
+ }
+ }
+}
+
+void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab,
+ const ScRangeListVector& rRangesVector, const ::std::vector< ::rtl::OUString >& rExcludedChartNames, bool bSameDoc )
+{
+ if ( pDoc && pPage && pModelObj )
+ {
+ size_t nRangeListCount = rRangesVector.size();
+ size_t nRangeList = 0;
+ SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+ SdrObject* pObject = aIter.Next();
+ while ( pObject )
+ {
+ if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
+ {
+ SdrOle2Obj* pSdrOle2Obj = dynamic_cast< SdrOle2Obj* >( pObject );
+ if ( pSdrOle2Obj && pSdrOle2Obj->IsChart() )
+ {
+ ::rtl::OUString aChartName = pSdrOle2Obj->GetPersistName();
+ ::std::vector< ::rtl::OUString >::const_iterator aEnd = rExcludedChartNames.end();
+ ::std::vector< ::rtl::OUString >::const_iterator aFound = ::std::find( rExcludedChartNames.begin(), aEnd, aChartName );
+ if ( aFound == aEnd )
+ {
+ uno::Reference< embed::XEmbeddedObject > xEmbeddedObj = pSdrOle2Obj->GetObjRef();
+ if ( xEmbeddedObj.is() && ( nRangeList < nRangeListCount ) )
+ {
+ bool bDisableDataTableDialog = false;
+ svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj );
+ uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
+ if ( xProps.is() &&
+ ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) &&
+ bDisableDataTableDialog )
+ {
+ if ( bSameDoc )
+ {
+ ScRange aEmptyRange;
+ ScChartListener aSearcher( aChartName, pDoc, aEmptyRange );
+ USHORT nIndex = 0;
+ ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection();
+ if ( pCollection && !pCollection->Search( &aSearcher, nIndex ) )
+ {
+ ScRangeList aRangeList( rRangesVector[ nRangeList++ ] );
+ ScRangeListRef rRangeList( new ScRangeList( aRangeList ) );
+ ScChartListener* pChartListener = new ScChartListener( aChartName, pDoc, rRangeList );
+ pCollection->Insert( pChartListener );
+ pChartListener->StartListeningTo();
+ }
+ }
+ else
+ {
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ),
+ uno::makeAny( sal_False ) );
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ),
+ uno::makeAny( sal_False ) );
+ }
+ }
+ }
+
+ if ( pModelObj && pModelObj->HasChangesListeners() )
+ {
+ Rectangle aRectangle = pSdrOle2Obj->GetSnapRect();
+ ScRange aRange( pDoc->GetRange( nTab, aRectangle ) );
+ ScRangeList aChangeRanges;
+ aChangeRanges.Append( aRange );
+
+ uno::Sequence< beans::PropertyValue > aProperties( 1 );
+ aProperties[ 0 ].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) );
+ aProperties[ 0 ].Value <<= aChartName;
+
+ pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert-chart" ) ), aChangeRanges, aProperties );
+ }
+ }
+ }
+ }
+ pObject = aIter.Next();
+ }
+ }
+}
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index b256233d7394..22153ff5ae6c 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -68,6 +68,9 @@
#include "drawview.hxx"
#include "viewdata.hxx"
#include "scmod.hxx"
+#include "chartlis.hxx"
+#include "rangeutl.hxx"
+#include "formula/grammar.hxx"
// #108584#
#include "scitems.hxx"
@@ -79,6 +82,7 @@
#include <editeng/fhgtitem.hxx>
#include <vcl/svapp.hxx>
+
using namespace com::sun::star;
// -----------------------------------------------------------------------
@@ -235,9 +239,15 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
//
if ( pContainerShell )
{
- const ScDocument* pDoc = pContainerShell->GetDocument();
+ ScDocument* pDoc = pContainerShell->GetDocument();
if ( pDoc )
+ {
nSourceDocID = pDoc->GetDocumentID();
+ if ( pPage )
+ {
+ ScChartHelper::FillProtectedChartRangesVector( m_aProtectedChartRangesVector, pDoc, pPage );
+ }
+ }
}
}
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index d819785c843b..1cd4c4700894 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -270,9 +270,9 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter);
+ // aRef->DoClose() will be closed explicitly, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
-//REMOVE SvEmbeddedObjectRef aRef = pSrcShell;
- SfxObjectShellRef aRef = pSrcShell;
+ SfxObjectShellLock aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
ScDocument* pSrcDoc = pSrcShell->GetDocument();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 78287257c080..5de8b17b0598 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -781,8 +781,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, pMed->GetName() );
+ // pOtherDocSh->DoClose() will be called explicitly later, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pOtherDocSh = new ScDocShell;
- SfxObjectShellRef aDocShTablesRef = pOtherDocSh;
+ SfxObjectShellLock aDocShTablesRef = pOtherDocSh;
pOtherDocSh->DoLoad( pMed );
ULONG nErr = pOtherDocSh->GetErrorCode();
if (nErr)
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 697b39052b9f..5414e19c1ca4 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -219,8 +219,9 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if ( bInEdit ) // only if using the edit dialog,
pMed->UseInteractionHandler( TRUE ); // enable the filter options dialog
+ // aRef->DoClose() will be called explicitly, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
- SfxObjectShellRef aRef = pSrcShell;
+ SfxObjectShellLock aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
// Optionen koennten gesetzt worden sein
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 4a456522003c..6e174a186b84 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -56,6 +56,9 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "scmod.hxx"
+#include "charthelper.hxx"
+#include "docuno.hxx"
+#include "docsh.hxx"
// -----------------------------------------------------------------------
@@ -399,6 +402,14 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ bool bCopy = false;
+ ScViewData* pViewData = ( pViewShell ? pViewShell->GetViewData() : NULL );
+ ScDocument* pDocument = ( pViewData ? pViewData->GetDocument() : NULL );
+ SdrPageView* pPageView = ( pView ? pView->GetSdrPageView() : NULL );
+ SdrPage* pPage = ( pPageView ? pPageView->GetPage() : NULL );
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ ScRangeListVector aProtectedChartRangesVector;
+
if ( rMEvt.IsLeft() )
{
if ( pView->IsDragObj() )
@@ -406,6 +417,29 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
/******************************************************************
* Objekt wurde verschoben
******************************************************************/
+ if ( rMEvt.IsMod1() )
+ {
+ if ( pPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
+ }
+ if ( pView && pDocument )
+ {
+ const SdrMarkList& rSdrMarkList = pView->GetMarkedObjectList();
+ ULONG nMarkCount = rSdrMarkList.GetMarkCount();
+ for ( ULONG i = 0; i < nMarkCount; ++i )
+ {
+ SdrMark* pMark = rSdrMarkList.GetMark( i );
+ SdrObject* pObj = ( pMark ? pMark->GetMarkedSdrObj() : NULL );
+ if ( pObj )
+ {
+ ScChartHelper::AddRangesIfProtectedChart( aProtectedChartRangesVector, pDocument, pObj );
+ }
+ }
+ }
+ bCopy = true;
+ }
+
pView->EndDragObj( rMEvt.IsMod1() );
pView->ForceMarkedToAnotherPage();
@@ -566,6 +600,18 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
pViewShell->GetViewData()->GetDispatcher().
Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ if ( bCopy && pViewData && pDocument && pPage )
+ {
+ ScDocShell* pDocShell = pViewData->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ if ( pModelObj )
+ {
+ SCTAB nTab = pViewData->GetTabNo();
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pPage, pModelObj, nTab,
+ aProtectedChartRangesVector, aExcludedChartNames );
+ }
+ }
+
return (bReturn);
}
diff --git a/sc/source/ui/drawfunc/makefile.mk b/sc/source/ui/drawfunc/makefile.mk
index a50c450ab373..f82008e4cdeb 100644
--- a/sc/source/ui/drawfunc/makefile.mk
+++ b/sc/source/ui/drawfunc/makefile.mk
@@ -75,6 +75,7 @@ SLOFILES = \
$(SLO)$/mediash.obj
EXCEPTIONSFILES= \
+ $(SLO)$/fusel.obj \
$(SLO)$/fuins2.obj \
$(SLO)$/graphsh.obj \
$(SLO)$/mediash.obj
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
index 9a1175d3310d..cb04b6114efe 100644
--- a/sc/source/ui/inc/drwtrans.hxx
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -34,6 +34,8 @@
#include <sfx2/objsh.hxx>
#include "global.hxx"
+#include "charthelper.hxx"
+#include "rangelst.hxx"
class SdrModel;
@@ -69,6 +71,8 @@ private:
sal_uInt32 nSourceDocID;
+ ScRangeListVector m_aProtectedChartRangesVector;
+
void InitDocShell();
//REMOVE SvInPlaceObjectRef GetSingleObject();
@@ -104,6 +108,8 @@ public:
static ScDrawTransferObj* GetOwnClipboard( Window* pUIWin );
virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException );
static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ const ScRangeListVector& GetProtectedChartRangesVector() const { return m_aProtectedChartRangesVector; }
};
#endif
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 86f59d66a7a4..168202548a30 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -232,7 +232,8 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
// Rechteck anpassen
//! Fehler/Exception, wenn leer/ungueltig ???
Point aRectPos( aRect.X, aRect.Y );
- if (aRectPos.X() < 0) aRectPos.X() = 0;
+ bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ if ( ( aRectPos.X() < 0 && !bLayoutRTL ) || ( aRectPos.X() > 0 && bLayoutRTL ) ) aRectPos.X() = 0;
if (aRectPos.Y() < 0) aRectPos.Y() = 0;
Size aRectSize( aRect.Width, aRect.Height );
if (aRectSize.Width() <= 0) aRectSize.Width() = 5000; // Default-Groesse
@@ -298,7 +299,7 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
xObj->setVisualAreaSize( nAspect, aSz );
pPage->InsertObject( pObj );
- pModel->AddUndo( new SdrUndoInsertObj( *pObj ) ); //! Undo-Kommentar?
+ pModel->AddUndo( new SdrUndoNewObj( *pObj ) );
// Dies veranlaesst Chart zum sofortigen Update
//SvData aEmpty;
@@ -318,7 +319,7 @@ void SAL_CALL ScChartsObj::removeByName( const rtl::OUString& aName )
ScDrawLayer* pModel = pDoc->GetDrawLayer(); // ist nicht 0
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); // ist nicht 0
- pModel->AddUndo( new SdrUndoRemoveObj( *pObj ) ); //! Undo-Kommentar?
+ pModel->AddUndo( new SdrUndoDelObj( *pObj ) );
pPage->RemoveObject( pObj->GetOrdNum() );
//! Notify etc.???
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c7bf89671161..342f12ee1205 100755..100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1394,6 +1394,23 @@ void ScDataPilotTableObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
Refreshed_Impl();
}
+ else if ( rHint.ISA( ScUpdateRefHint ) )
+ {
+ ScRange aRange( 0, 0, nTab );
+ ScRangeList aRanges;
+ aRanges.Append( aRange );
+ const ScUpdateRefHint& rRef = static_cast< const ScUpdateRefHint& >( rHint );
+ if ( aRanges.UpdateReference( rRef.GetMode(), GetDocShell()->GetDocument(), rRef.GetRange(),
+ rRef.GetDx(), rRef.GetDy(), rRef.GetDz() ) &&
+ aRanges.Count() == 1 )
+ {
+ const ScRange* pRange = aRanges.GetObject( 0 );
+ if ( pRange )
+ {
+ nTab = pRange->aStart.Tab();
+ }
+ }
+ }
ScDataPilotDescriptorBase::Notify( rBC, rHint );
}
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 7646e52c030f..71ed56a93dad 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -51,6 +51,7 @@
#include <sfx2/viewfrm.hxx>
#include <rtl/uuid.h>
#include <toolkit/helper/convert.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include "drawsh.hxx"
#include "drtxtob.hxx"
@@ -114,6 +115,7 @@ const SfxItemPropertyMapEntry* lcl_GetViewOptPropertyMap()
{MAP_CHAR_LEN(SC_UNO_VISAREA), 0, &getCppuType((awt::Rectangle*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_ZOOMTYPE), 0, &getCppuType((sal_Int16*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_ZOOMVALUE), 0, &getCppuType((sal_Int16*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_VISAREASCREEN),0, &getCppuType((awt::Rectangle*)0), 0, 0},
{0,0,0,0,0,0}
};
return aViewOptPropertyMap_Impl;
@@ -418,10 +420,15 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const
ScAddress aCell(pViewShell->GetViewData()->GetPosX(eWhichH),
pViewShell->GetViewData()->GetPosY(eWhichV),
pViewShell->GetViewData()->GetTabNo());
- Rectangle aVisRect(pDoc->GetMMRect(aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab()));
-
- aVisRect.SetSize(pWindow->PixelToLogic(pWindow->GetSizePixel(), pWindow->GetDrawMapMode(sal_True)));
-
+ Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) );
+ Size aVisSize( pWindow->PixelToLogic( pWindow->GetSizePixel(), pWindow->GetDrawMapMode( sal_True ) ) );
+ Point aVisPos( aCellRect.TopLeft() );
+ if ( pDoc->IsLayoutRTL( aCell.Tab() ) )
+ {
+ aVisPos = aCellRect.TopRight();
+ aVisPos.X() -= aVisSize.Width();
+ }
+ Rectangle aVisRect( aVisPos, aVisSize );
aVisArea = AWTRectangle(aVisRect);
}
}
@@ -2038,6 +2045,16 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty
else if ( aString.EqualsAscii( SC_UNO_VISAREA ) ) aRet <<= GetVisArea();
else if ( aString.EqualsAscii( SC_UNO_ZOOMTYPE ) ) aRet <<= GetZoomType();
else if ( aString.EqualsAscii( SC_UNO_ZOOMVALUE ) ) aRet <<= GetZoom();
+ else if ( aString.EqualsAscii( SC_UNO_VISAREASCREEN ) )
+ {
+ ScViewData* pViewData = pViewSh->GetViewData();
+ Window* pActiveWin = ( pViewData ? pViewData->GetActiveWin() : NULL );
+ if ( pActiveWin )
+ {
+ Rectangle aRect = pActiveWin->GetWindowExtentsRelative( NULL );
+ aRet <<= AWTRectangle( aRect );
+ }
+ }
}
return aRet;
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 3104b7ed8b8f..f7a126c2dac8 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -164,6 +164,9 @@
#include "scitems.hxx"
#include <svx/dbexch.hrc>
#include <svx/svdetc.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdoole2.hxx>
+#include <svx/svdpage.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <svl/stritem.hxx>
@@ -206,6 +209,10 @@
#include "drwtrans.hxx"
#include "docuno.hxx"
#include "clipparam.hxx"
+#include "drawview.hxx"
+#include "chartlis.hxx"
+#include "charthelper.hxx"
+
using namespace com::sun::star;
@@ -337,7 +344,28 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
}
ScClipParam aClipParam(aRange, bCut);
+ aClipParam.setSourceDocID( pDoc->GetDocumentID() );
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects);
+
+ if ( pDoc && pClipDoc )
+ {
+ ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer();
+ if ( pDrawLayer )
+ {
+ ScClipParam& rClipParam = pClipDoc->GetClipParam();
+ ScRangeListVector& rRangesVector = rClipParam.maProtectedChartRangesVector;
+ SCTAB nTabCount = pClipDoc->GetTableCount();
+ for ( SCTAB nTab = 0; nTab < nTabCount; ++nTab )
+ {
+ SdrPage* pPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
+ if ( pPage )
+ {
+ ScChartHelper::FillProtectedChartRangesVector( rRangesVector, pDoc, pPage );
+ }
+ }
+ }
+ }
+
if (bSysClip)
{
ScDrawLayer::SetGlobalDrawPersist(NULL);
@@ -1350,8 +1378,19 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
AdjustBlockHeight(); // update row heights before pasting objects
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ SdrPage* pPage = NULL;
+
if ( nFlags & IDF_OBJECTS )
{
+ ScDrawView* pScDrawView = GetScDrawView();
+ SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : NULL );
+ pPage = ( pModel ? pModel->GetPage( static_cast< sal_uInt16 >( nStartTab ) ) : NULL );
+ if ( pPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
+ }
+
// Paste the drawing objects after the row heights have been updated.
pDoc->CopyFromClip( aUserRange, aFilteredMark, IDF_OBJECTS, pRefUndoDoc, pClipDoc,
@@ -1450,6 +1489,19 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
aModificator.SetDocumentModified();
PostPasteFromClip(aUserRange, rMark);
+
+ if ( nFlags & IDF_OBJECTS )
+ {
+ ScModelObj* pModelObj = ( pDocSh ? ScModelObj::getImplementation( pDocSh->GetModel() ) : NULL );
+ if ( pDoc && pPage && pModelObj )
+ {
+ bool bSameDoc = ( rClipParam.getSourceDocID() == pDoc->GetDocumentID() );
+ const ScRangeListVector& rProtectedChartRangesVector( rClipParam.maProtectedChartRangesVector );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDoc, pPage, pModelObj, nStartTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDoc );
+ }
+ }
+
return TRUE;
}
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index afa06ddfee3e..bdc0ac895b8e 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -56,6 +56,10 @@
#include "drwlayer.hxx"
#include "drwtrans.hxx"
#include "globstr.hrc"
+#include "chartlis.hxx"
+#include "docuno.hxx"
+#include "docsh.hxx"
+#include "convuno.hxx"
extern Point aDragStartDiff;
@@ -149,9 +153,16 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
else
{
SdrModel* pDrawModel = pDragEditView->GetModel();
- SdrPage* pDestPage = pDrawModel->GetPage( static_cast<sal_uInt16>(GetViewData()->GetTabNo()) );
+ SCTAB nTab = GetViewData()->GetTabNo();
+ SdrPage* pDestPage = pDrawModel->GetPage( static_cast< sal_uInt16 >( nTab ) );
DBG_ASSERT(pDestPage,"nanu, Page?");
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ if ( pDestPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pDestPage );
+ }
+
SdrMarkList aMark = pDragEditView->GetMarkedObjectList();
aMark.ForceSort();
ULONG nMarkAnz=aMark.GetMarkCount();
@@ -184,6 +195,16 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if (bPasteIsMove)
pDragEditView->DeleteMarked();
+
+ ScDocument* pDocument = GetViewData()->GetDocument();
+ ScDocShell* pDocShell = GetViewData()->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ if ( pDocument && pDestPage && pModelObj && pDrawTrans )
+ {
+ const ScRangeListVector& rProtectedChartRangesVector( pDrawTrans->GetProtectedChartRangesVector() );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pDestPage, pModelObj, nTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDoc );
+ }
}
}
else
@@ -204,6 +225,15 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if ( pClient && pClient->IsObjectInPlaceActive() )
nOptions |= SDRINSERT_DONTMARK;
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ SCTAB nTab = GetViewData()->GetTabNo();
+ SdrPage* pPage = pScDrawView->GetModel()->GetPage( static_cast< sal_uInt16 >( nTab ) );
+ DBG_ASSERT( pPage, "Page?" );
+ if ( pPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
+ }
+
// #89247# Set flag for ScDocument::UpdateChartListeners() which is
// called during paste.
if ( !bSameDocClipboard )
@@ -216,10 +246,6 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// #68991# Paste puts all objects on the active (front) layer
// controls must be on SC_LAYER_CONTROLS
-
- SCTAB nTab = GetViewData()->GetTabNo();
- SdrPage* pPage = pScDrawView->GetModel()->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page?");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -234,6 +260,18 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// #75299# all graphics objects must have names
GetViewData()->GetDocument()->EnsureGraphicNames();
+
+ ScDocument* pDocument = GetViewData()->GetDocument();
+ ScDocShell* pDocShell = GetViewData()->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard( NULL );
+ if ( pDocument && pPage && pModelObj && ( pTransferObj || pDrawTrans ) )
+ {
+ const ScRangeListVector& rProtectedChartRangesVector(
+ pTransferObj ? pTransferObj->GetProtectedChartRangesVector() : pDrawTrans->GetProtectedChartRangesVector() );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pPage, pModelObj, nTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDocClipboard );
+ }
}
if (bGroup)
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index 7357d7ea00b8..2aaa7f23af95 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -73,7 +73,8 @@ ColorData HGBAdapt (
Theme::Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties)
- : maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()),
+ : mbIsHighContrastMode(false),
+ maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()),
maPageBackgroundColor(COL_WHITE),
maGradients(),
maIcons(),
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 53c0d3636d82..fd709dc22038 100644..100755
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -1006,6 +1006,27 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pImageMap )
pObj->InsertUserData( new SdIMapInfo( *pImageMap ) );
+ if ( pObj && pObj->IsChart() )
+ {
+ bool bDisableDataTableDialog = false;
+ svt::EmbeddedObjectRef::TryRunningState( xObj );
+ uno::Reference< beans::XPropertySet > xProps( xObj->getComponent(), uno::UNO_QUERY );
+ if ( xProps.is() &&
+ ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) &&
+ bDisableDataTableDialog )
+ {
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ),
+ uno::makeAny( sal_False ) );
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ),
+ uno::makeAny( sal_False ) );
+ uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
+ if ( xModifiable.is() )
+ {
+ xModifiable->setModified( sal_True );
+ }
+ }
+ }
+
bReturn = TRUE;
}
}
diff --git a/set_soenv.in b/set_soenv.in
index 8a99842291de..5061745103b1 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1976,6 +1976,7 @@ if ( $platform =~ m/cygwin/ )
ToFile( "MINGW_SHARED_GCCLIB", "@MINGW_SHARED_GCCLIB@", "e" );
ToFile( "MINGW_GCCLIB_EH", "@MINGW_GCCLIB_EH@", "e" );
ToFile( "MINGW_SHARED_GXXLIB", "@MINGW_SHARED_GXXLIB@", "e" );
+ ToFile( "MINGW_SHARED_LIBSTDCPP", "@MINGW_SHARED_LIBSTDCPP@", "e" );
ToFile( "MINGW_GCCDLL", "@MINGW_GCCDLL@", "e" );
ToFile( "MINGW_GXXDLL", "@MINGW_GXXDLL@", "e" );
}
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index aa3270e08a07..ad1419add42a 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -63,8 +63,11 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/passwd.src \
sfx2/source/dialog/printopt.src \
sfx2/source/dialog/recfloat.src \
+ sfx2/source/dialog/securitypage.src \
sfx2/source/dialog/srchdlg.src \
+ sfx2/source/dialog/taskpane.src \
sfx2/source/dialog/templdlg.src \
+ sfx2/source/dialog/titledockwin.src \
sfx2/source/dialog/versdlg.src \
sfx2/source/doc/doc.src \
sfx2/source/doc/doctdlg.src \
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index ed941d5b9a9f..3c3ebe85294e 100755
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -285,6 +285,25 @@ $(eval $(call gb_Library_add_cxxobjects,sfx,\
, $(gb_LinkTarget_EXCEPTIONFLAGS) -nologo -UPRECOMPILED_HEADERS \
))
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,sfx,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ gdi32 \
+ kernel32 \
+ msvcrt \
+ ole32 \
+ shell32 \
+ user32 \
+ uuid \
+))
+else
$(eval $(call gb_Library_add_linked_libs,sfx,\
advapi32 \
gdi32 \
@@ -297,6 +316,7 @@ $(eval $(call gb_Library_add_linked_libs,sfx,\
uuid \
uwinapi \
))
+endif
else
$(eval $(call gb_Library_add_cxxobjects,sfx,\
sfx2/source/appl/shutdowniconw32 \
diff --git a/sfx2/inc/frmload.hxx b/sfx2/inc/frmload.hxx
index b03bdd724c20..74c5a1ff35d1 100644
--- a/sfx2/inc/frmload.hxx
+++ b/sfx2/inc/frmload.hxx
@@ -113,7 +113,7 @@ private:
const ::rtl::OUString& i_rFactoryURL
) const;
- SfxObjectShellLock impl_findObjectShell(
+ SfxObjectShellRef impl_findObjectShell(
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel2 >& i_rxDocument
) const;
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 35656202650f..f2253a8f2b67 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -75,7 +75,6 @@ class SvStringsDtor;
#define OWEAKOBJECT ::cppu::OWeakObject
#define REFERENCE ::com::sun::star::uno::Reference
#define XINTERFACE ::com::sun::star::uno::XInterface
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define EXCEPTION ::com::sun::star::uno::Exception
#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
#define ANY ::com::sun::star::uno::Any
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 9473ac126bd7..3e696369c7a3 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -158,11 +158,6 @@ typedef sal_uInt32 SfxObjectShellFlags;
//--------------------------------------------------------------------
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define OUSTRING ::rtl::OUString
-
-//--------------------------------------------------------------------
-
#define HIDDENINFORMATION_RECORDEDCHANGES 0x0001
#define HIDDENINFORMATION_NOTES 0x0002
#define HIDDENINFORMATION_DOCUMENTVERSIONS 0x0004
@@ -209,6 +204,7 @@ class SFX2_DLLPUBLIC SfxObjectShell :
public ::comphelper::IEmbeddedHelper, public ::sfx2::IXmlIdRegistrySupplier
{
friend struct ModifyBlocker_Impl;
+friend class SfxObjectShellLock;
private:
struct SfxObjectShell_Impl* pImp; // interne Daten
@@ -617,7 +613,7 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetBaseModel() const;
// Nur uebergangsweise fuer die Applikationen !!!
- virtual SEQUENCE< OUSTRING > GetEventNames();
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames();
Window* GetDialogParent( SfxMedium* pMedium=0 );
String UpdateTitle( SfxMedium* pMed=NULL, USHORT nDocViewNo=0 );
@@ -831,7 +827,6 @@ public:
//#endif
//--------------------------------------------------------------------
-
#ifndef SFX_DECL_OBJECTSHELL_DEFINED
#define SFX_DECL_OBJECTSHELL_DEFINED
SV_DECL_REF(SfxObjectShell)
@@ -840,8 +835,6 @@ SV_DECL_LOCK(SfxObjectShell)
SV_IMPL_LOCK(SfxObjectShell)
SV_IMPL_REF(SfxObjectShell)
-SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& rName, BOOL bWriting );
-
//#if 0 // _SOLAR__PRIVATE
//--------------------------------------------------------------------
class AutoReloadTimer_Impl : public Timer
diff --git a/sfx2/inc/sfx2/sfxbasecontroller.hxx b/sfx2/inc/sfx2/sfxbasecontroller.hxx
index ca30d243bbac..de01f1965d74 100644
--- a/sfx2/inc/sfx2/sfxbasecontroller.hxx
+++ b/sfx2/inc/sfx2/sfxbasecontroller.hxx
@@ -66,7 +66,6 @@
// Some defines to write better code :-)
#define REFERENCE ::com::sun::star::uno::Reference
#define ANY ::com::sun::star::uno::Any
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define XDISPATCH ::com::sun::star::frame::XDispatch
#define DISPATCHDESCRIPTOR ::com::sun::star::frame::DispatchDescriptor
#define XMODEL ::com::sun::star::frame::XModel
@@ -304,7 +303,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
//____________________________________________________________________________________________________
// XControllerBorder
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index 26122419e661..d0978ebc1e5f 100644
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -161,7 +161,6 @@
#define EVENTOBJECT ::com::sun::star::lang::EventObject
#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define MUTEX ::osl::Mutex
#define OUSTRING ::rtl::OUString
#define UNOTYPE ::com::sun::star::uno::Type
@@ -385,7 +384,7 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual SEQUENCE< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
/**___________________________________________________________________________________________________
@short get implementation id
@@ -401,7 +400,7 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual SEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
//____________________________________________________________________________________________________
@@ -580,7 +579,7 @@ public:
*/
virtual sal_Bool SAL_CALL attachResource( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& aArgs )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aArgs )
throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@@ -611,7 +610,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -861,7 +860,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -876,7 +875,7 @@ public:
@onerror -
*/
- virtual void SAL_CALL setPrinter( const SEQUENCE< PROPERTYVALUE >& seqPrinter )
+ virtual void SAL_CALL setPrinter( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqPrinter )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -891,14 +890,14 @@ public:
@onerror -
*/
- virtual void SAL_CALL print( const SEQUENCE< PROPERTYVALUE >& seqOptions )
+ virtual void SAL_CALL print( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqOptions )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XStorable2
//____________________________________________________________________________________________________
- virtual void SAL_CALL storeSelf( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ virtual void SAL_CALL storeSelf( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
@@ -979,7 +978,7 @@ public:
*/
virtual void SAL_CALL storeAsURL( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) ;
/**___________________________________________________________________________________________________
@@ -996,7 +995,7 @@ public:
*/
virtual void SAL_CALL storeToURL( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
@@ -1037,7 +1036,7 @@ public:
@onerror -
*/
- virtual void SAL_CALL load( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ virtual void SAL_CALL load( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::frame::DoubleInitializationException,
::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException,
@@ -1058,7 +1057,7 @@ public:
//____________________________________________________________________________________________________
virtual void SAL_CALL loadFromStorage( const REFERENCE< XSTORAGE >& xStorage,
- const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
throw ( ILLEGALARGUMENTEXCEPTION,
DOUBLEINITIALIZATIONEXCEPTION,
IOEXCEPTION,
@@ -1066,7 +1065,7 @@ public:
RUNTIMEEXCEPTION );
virtual void SAL_CALL storeToStorage( const REFERENCE< XSTORAGE >& xStorage,
- const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
throw ( ILLEGALARGUMENTEXCEPTION,
IOEXCEPTION,
EXCEPTION,
@@ -1164,7 +1163,7 @@ public:
*/
- virtual SEQUENCE< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
+ virtual ::com::sun::star::uno::Sequence< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@@ -1544,7 +1543,7 @@ private:
SAL_DLLPRIVATE ::rtl::OUString GetMediumFilterName_Impl();
SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments ,
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments ,
sal_Bool bSaveTo ) ;
SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() );
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index f8fddef145a6..76f87fa844c8 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,7 +1,8 @@
sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL
sf sfx2 usr1 - all sf_mkout NULL
sf sfx2\prj nmake - all sf_prj NULL
-
+sf sfx2\qa\cppunit nmake - all sf_qa_cppunit NULL
+sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL
# fails on unxsoli4
# sf sfx2\qa\complex\standalonedocumentinfo nmake - all sf_qa_complex_standalonedocumentinfo sf_util NULL
diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk
new file mode 100644
index 000000000000..b53a04ec43f9
--- /dev/null
+++ b/sfx2/qa/cppunit/makefile.mk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ=../..
+PRJNAME=sfx2
+TARGET=qa_cppunit
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+DLLPRE = # no leading "lib" on .so files
+
+# --- Libs ---------------------------------------------------------
+
+SHL1OBJS= \
+ $(SLO)/test_metadatable.obj \
+
+
+SHL1STDLIBS= \
+ $(CPPUNITLIB) \
+ $(SALLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(VCLLIB) \
+ $(SFXLIB) \
+
+
+SHL1TARGET= test_metadatable
+SHL1RPATH = NONE
+SHL1IMPLIB= i$(SHL1TARGET)
+# SHL1DEF= $(MISC)/$(SHL1TARGET).def
+DEF1NAME=$(SHL1TARGET)
+# DEF1EXPORTFILE= export.exp
+SHL1VERSIONMAP= version.map
+
+# --- All object files ---------------------------------------------
+
+SLOFILES= \
+ $(SHL1OBJS) \
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : _cppunit.mk
+
+.END
diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..ea91ba4d1c44
--- /dev/null
+++ b/sfx2/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = sfx2
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/sfx2/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 727d9f17c493..eb9307ad7538 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -375,6 +375,8 @@ SfxApplication::SfxApplication()
SfxApplication::~SfxApplication()
{
+ OSL_ENSURE( GetObjectShells_Impl().Count() == 0, "Memory leak: some object shells were not removed!" );
+
Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
SfxModule::DestroyModules_Impl();
diff --git a/sfx2/source/config/config.hrc b/sfx2/source/config/config.hrc
deleted file mode 100644
index 582a2972f913..000000000000
--- a/sfx2/source/config/config.hrc
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SFX_CONFIG_HRC
-#define _SFX_CONFIG_HRC
-
-#include <sfx2/sfx.hrc>
-
-// #defines *****************************************************************
-
-#define BTN_OK 2
-#define BTN_CANCEL 3
-#define FT_OK 4
-#define FT_CANCEL 5
-
-#endif
-
diff --git a/sfx2/source/config/config.src b/sfx2/source/config/config.src
deleted file mode 100644
index cb3259e09ad0..000000000000
--- a/sfx2/source/config/config.src
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-//#include "config.hrc"
-//#include "sfxlocal.hrc"
-#include <sfx2/sfx.hrc>
-
-String STR_FILTERNAME_CFG
-{
- Text [ en-US ] = "Configuration" ;
-};
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 185ec0626c51..59c56cc291a7 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -34,7 +34,7 @@
#include <basic/sbmod.hxx>
#include <tools/urlobj.hxx>
#include <basic/sbx.hxx>
- #include <sot/storage.hxx>
+#include <sot/storage.hxx>
#include <unotools/securityoptions.hxx>
#include <rtl/ustring.h>
@@ -47,7 +47,6 @@
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/dispatch.hxx>
-#include "config.hrc"
#include "sfx2/sfxresid.hxx"
#include "eventsupplier.hxx"
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index f5ea04e5e08d..f962542aac10 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -137,7 +137,11 @@ namespace DocTempl {
class DocTempl_EntryData_Impl
{
RegionData_Impl* mpParent;
+
+ // the following member must be SfxObjectShellLock since it controlls that SfxObjectShell lifetime by design
+ // and users of this class expect it to be so.
SfxObjectShellLock mxObjShell;
+
OUString maTitle;
OUString maOwnURL;
OUString maTargetURL;
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 6367f2a65d76..c017a5779cdd 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -546,6 +546,9 @@ BOOL SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, BOOL bSelect )
return SvTreeListBox::Select(pEntry,bSelect);
Path aPath(this, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
GetObjectShell(aPath)->TriggerHelpPI(
aPath[nLevel+1], aPath[nLevel+2], aPath[nLevel+3]);
return SvTreeListBox::Select(pEntry,bSelect);
@@ -691,10 +694,12 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
BOOL bRemovedFromSource = FALSE;
Path aSource(pSourceBox, pSource);
Path aTarget(this, pTarget);
- SfxObjectShellRef aSourceDoc =
- ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
+ SfxObjectShellRef aSourceDoc = ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
SfxObjectShellRef aTargetDoc = GetObjectShell(aTarget);
+
const USHORT nSLevel =
((SfxOrganizeListBox_Impl *)pSourceBox)->GetDocLevel();
const USHORT nTLevel = GetDocLevel();
@@ -1210,6 +1215,9 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
{
const USHORT nDocLevel = GetDocLevel();
Path aPath(this, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = GetObjectShell(aPath);
if(aRef.Is())
{
@@ -1887,6 +1895,9 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
if(!QueryDelete_Impl(pDialog, STR_DELETE_TEMPLATE, pFocusBox->GetEntryText(pEntry)))
return 1;
Path aPath(pFocusBox, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = pFocusBox->GetObjectShell(aPath);
if(aRef.Is() &&
aRef->Remove(aPath[1+pFocusBox->GetDocLevel()],
@@ -1953,6 +1964,9 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
if ( !pEntry )
return 1;
Path aPath( pFocusBox, pEntry );
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = pFocusBox->GetObjectShell( aPath );
if ( aRef.Is() )
{
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 91f5842c1fb7..4aea842e44e9 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -1088,60 +1088,10 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
//REPLACE pInfo->Save(xDocStor);
}
}
-/*
- SfxConfigManager *pCfgMgr = SFX_CFGMANAGER();
- {
- SfxConfigManager *pTemplCfg = new SfxConfigManager(aTemplStor, pCfgMgr);
- SetConfigManager(pTemplCfg);
- SetTemplateConfig(TRUE);
-
- // Falls der gerade zerst"orte CfgMgr des Dokuments der
- // aktive war, pCfgMgr lieber neu holen
- pCfgMgr = SFX_CFGMANAGER();
-
- // ggf. den neuen ConfigManager aktivieren
- if ( this == SfxObjectShell::Current() )
- pTemplCfg->Activate(pCfgMgr);
- }
-*/
- // Template und Template-DocInfo werden nicht mehr gebraucht
-// delete pTemplInfo;
}
}
}
-SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& aTargetURL, BOOL bForWriting )
-{
- // check for own format
- SfxObjectShellRef xDoc;
- StreamMode nMode = bForWriting ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY;
- SfxMedium *pMed = new SfxMedium( aTargetURL, nMode, FALSE, 0 );
- const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(TRUE);
- if( SFX_APP()->GetFilterMatcher().GuessFilter( *pMed, &pFilter ) == ERRCODE_NONE && pFilter && pFilter->IsOwnFormat() )
- {
- // create document
- xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
- if ( xDoc.Is() )
- {
- // partially load, so don't use DoLoad!
- xDoc->DoInitNew(0);
- // TODO/LATER: make sure that we don't use binary templates!
- if( xDoc->LoadFrom( *pMed ) )
- {
- // connect to storage, abandon temp. storage
- xDoc->DoSaveCompleted( pMed );
- }
- else
- xDoc.Clear();
- }
- }
- else
- delete pMed;
-
- return xDoc;
-}
-
sal_Bool SfxObjectShell::IsHelpDocument() const
{
const SfxFilter* pFilter = GetMedium()->GetFilter();
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 693911f0404c..a5141662fa3d 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -172,12 +172,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
SfxObjectShell::SetCurrentComponent( Reference< XInterface >() );
}
- if ( mpDoc->Get_Impl()->bHiddenLockedByAPI )
- {
- mpDoc->Get_Impl()->bHiddenLockedByAPI = FALSE;
- mpDoc->OwnerLock(FALSE);
- }
- else if ( !mpDoc->Get_Impl()->bClosing )
+ if ( !mpDoc->Get_Impl()->bClosing )
// GCC stuerzt ab, wenn schon im dtor, also vorher Flag abfragen
mpDoc->DoClose();
}
@@ -835,22 +830,6 @@ void SfxObjectShell::InitBasicManager_Impl()
}
//--------------------------------------------------------------------
-#if 0 //(mba)
-SotObjectRef SfxObjectShell::CreateAggObj( const SotFactory* pFact )
-{
- // SvDispatch?
- SotFactory* pDispFact = SvDispatch::ClassFactory();
- if( pFact == pDispFact )
- return( (SfxShellObject*)GetSbxObject() );
-
- // sonst unbekannte Aggregation
- DBG_ERROR("unkekannte Factory");
- SotObjectRef aSvObjectRef;
- return aSvObjectRef;
-}
-#endif
-
-//--------------------------------------------------------------------
sal_uInt16 SfxObjectShell::Count()
{
@@ -873,7 +852,7 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
//--------------------------------------------------------------------
-SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames()
+uno::Sequence< ::rtl::OUString > SfxObjectShell::GetEventNames()
{
static uno::Sequence< ::rtl::OUString >* pEventNameContainer = NULL;
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 1dc2423bcdaf..d088f6981f49 100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -344,7 +344,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
// Name-Property?
if ( rProp.Name.compareToAscii( "Name" ) == 0 )
{
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if ( ( rProp.Value >>= sTemp ) == sal_False )
throw ::com::sun::star::lang::IllegalArgumentException();
@@ -618,9 +618,9 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
if ( rProp.Name.compareToAscii( "FileName" ) == 0 )
{
// unpack th URL and check for a valid and well known protocol
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if (
- ( rProp.Value.getValueType()!=::getCppuType((const OUSTRING*)0)) ||
+ ( rProp.Value.getValueType()!=::getCppuType((const ::rtl::OUString*)0)) ||
(!(rProp.Value>>=sTemp))
)
{
@@ -717,7 +717,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// Pages-Property
else if ( rProp.Name.compareToAscii( "Pages" ) == 0 )
{
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if( rProp.Value >>= sTemp )
{
aCheckedArgs[nProps].Name = rProp.Name;
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index a4707f03d364..4dbb8a3c640e 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -263,25 +263,6 @@ sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const USHORT _nSlo
}
// --------------------------------------------------------------------------------------------------------------------
-void SfxFrameLoader_Impl::impl_lockHiddenDocument( SfxObjectShell& i_rDocument, const ::comphelper::NamedValueCollection& i_rDescriptor ) const
-{
- const sal_Bool bHidden = i_rDescriptor.getOrDefault( "Hidden", sal_False );
- if ( !bHidden )
- return;
-
- const SfxViewFrame* pExistingViewFrame = SfxViewFrame::GetFirst( &i_rDocument );
- if ( pExistingViewFrame )
- return;
-
- // the document is to be loaded hidden, and it is not yet displayed in any other frame
- // To prevent it from being closed when the loader returns, increase its OwnerLock
- // (the OwnerLock is normally increased by every frame in which the document is displayed, and by this loader)
- i_rDocument.RestoreNoDelete();
- i_rDocument.OwnerLock( TRUE );
- i_rDocument.Get_Impl()->bHiddenLockedByAPI = TRUE;
-}
-
-// --------------------------------------------------------------------------------------------------------------------
void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollection& io_rDescriptor ) const
{
const ::rtl::OUString sURL = io_rDescriptor.getOrDefault( "URL", ::rtl::OUString() );
@@ -331,7 +312,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
}
// --------------------------------------------------------------------------------------------------------------------
-SfxObjectShellLock SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
+SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
{
for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, FALSE ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, FALSE ) )
{
@@ -635,15 +616,12 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
// tell the doc its (current) load args.
impl_removeLoaderArguments( aDescriptor );
xModel->attachResource( xModel->getURL(), aDescriptor.getPropertyValues() );
- // TODO: not sure this is correct. The original, pre-refactoring code did it this way. However, I could
- // imagine scenarios where it is *not* correct to overrule the *existing* model args (XModel::getArgs)
- // with the ones passed to the loader here. For instance, what about the MacroExecutionMode? The document
- // might have a mode other than the one passed to the loader, and we always overwrite the former with
- // the latter.
}
// get the SfxObjectShell (still needed at the moment)
- const SfxObjectShellLock xDoc = impl_findObjectShell( xModel );
+ // SfxObjectShellRef is used here ( instead of ...Lock ) since the model is closed below if necessary
+ // SfxObjectShellLock would be even dangerous here, since the lifetime control should be done outside in case of success
+ const SfxObjectShellRef xDoc = impl_findObjectShell( xModel );
ENSURE_OR_THROW( xDoc.Is(), "no SfxObjectShell for the given model" );
// ensure the ID of the to-be-created view is in the descriptor, if possible
@@ -651,16 +629,6 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
const sal_Int16 nViewNo = xDoc->GetFactory().GetViewNo_Impl( nViewId, 0 );
const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetAPIViewName() );
- // if the document is created hidden, prevent it from being deleted until it is shown or disposed
- impl_lockHiddenDocument( *xDoc, aDescriptor );
- // TODO; if we wouldn't use a SfxObjectShellLock instance for xDoc, but a simple SfxObjectShellRef,
- // then this would not be necessary, /me thinks. That is, the *Lock classes inc/dec a "Lock" counter
- // (additional to the ref counter) in their ctor/dtor, and if the lock counter goes to 0, the
- // object is closed (DoClose). The impl_lockHiddenDocument is to prevent exactly that premature
- // closing. However, a *Ref object wouldn't close, anyway. And in case of unsuccessfull loading, the
- // code at the very end of this method cares for closing the XModel, which should also close the
- // ObjectShell.
-
// plug the document into the frame
impl_createDocumentView( xModel, _rTargetFrame, aViewCreationArgs, sViewName );
bLoadSuccess = sal_True;
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index b8ad1cfc61f7..8fd223279372 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -734,7 +734,7 @@ ANY SfxBaseController::getViewData() throw( ::com::sun::star::uno::RuntimeExcept
if ( m_pData->m_pViewShell )
{
m_pData->m_pViewShell->WriteUserData( sData1 ) ;
- OUSTRING sData( sData1 );
+ ::rtl::OUString sData( sData1 );
aAny <<= sData ;
}
@@ -750,7 +750,7 @@ void SAL_CALL SfxBaseController::restoreViewData( const ANY& aValue ) throw( ::c
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pData->m_pViewShell )
{
- OUSTRING sData;
+ ::rtl::OUString sData;
aValue >>= sData ;
m_pData->m_pViewShell->ReadUserData( sData ) ;
}
@@ -781,7 +781,7 @@ REFERENCE< XMODEL > SAL_CALL SfxBaseController::getModel() throw( ::com::sun::st
//________________________________________________________________________________________________________
REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOURL& aURL ,
- const OUSTRING& sTargetFrameName,
+ const ::rtl::OUString& sTargetFrameName,
sal_Int32 eSearchFlags ) throw( RUNTIMEEXCEPTION )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -938,12 +938,12 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
// SfxBaseController -> XDispatchProvider
//________________________________________________________________________________________________________
-SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
+uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const uno::Sequence< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
{
// Create return list - which must have same size then the given descriptor
// It's not allowed to pack it!
sal_Int32 nCount = seqDescripts.getLength();
- SEQUENCE< REFERENCE< XDISPATCH > > lDispatcher( nCount );
+ uno::Sequence< REFERENCE< XDISPATCH > > lDispatcher( nCount );
for( sal_Int32 i=0; i<nCount; ++i )
{
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 193ca6d3bab3..9eee851cefac 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -112,7 +112,11 @@ ifeq ($(OS),LINUX)
include $(GBUILDDIR)/platform/linux.mk
else
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+include $(GBUILDDIR)/platform/winmingw.mk
+else
include $(GBUILDDIR)/platform/windows.mk
+endif
else
ifeq ($(OS),SOLARIS)
include $(GBUILDDIR)/platform/solaris.mk
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 742d2aef82fc..c7c3558583a3 100755
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -28,7 +28,7 @@
GUI := UNX
COM := GCC
-gb_MKTEMP := TMPDIR= mktemp -t
+gb_MKTEMP := TMPDIR= /usr/bin/mktemp -t
gb_CC := $(CC)
gb_CXX := $(CXX)
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
new file mode 100644
index 000000000000..430a4edb3f05
--- /dev/null
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -0,0 +1,575 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+GUI := WNT
+COM := GCC
+
+gb_MKTEMP := mktemp -p
+
+gb_CC := $(CC)
+gb_CXX := $(CXX)
+gb_LINK := $(shell $(CC) -print-prog-name=ld)
+gb_AR := $(shell $(CC) -print-prog-name=ar)
+gb_AWK := awk
+ifeq ($(USE_MINGW),cygwin)
+gb_MINGWLIBDIR := $(COMPATH)/lib/mingw
+else
+ifeq ($(USE_MINGW),cygwin-w64-mingw32)
+gb_MINGWLIBDIR := $(COMPATH)/usr/i686-w64-mingw32/sys-root/mingw/lib
+else
+gb_MINGWLIBDIR := $(COMPATH)/lib
+endif
+endif
+ifeq ($(MINGW_SHARED_GXXLIB),YES)
+gb_MINGW_LIBSTDCPP := $(subst -l,,$(MINGW_SHARED_LIBSTDCPP))
+else
+gb_MINGW_LIBSTDCPP := \
+ stdc++ \
+ moldname
+endif
+ifeq ($(MINGW_SHARED_GCCLIB),YES)
+gb_MINGW_LIBGCC := \
+ gcc_s \
+ gcc
+else
+ifeq ($(MINGW_GCCLIB_EH),YES)
+gb_MINGW_LIBGCC := \
+ gcc \
+ gcc_eh
+else
+gb_MINGW_LIBGCC := gcc
+endif
+endif
+
+gb_OSDEFS := \
+ -DWINVER=0x0500 \
+ -D_WIN32_IE=0x0500 \
+ -DNT351 \
+ -DWIN32 \
+ -DWNT \
+
+ifeq ($(GXX_INCLUDE_PATH),)
+GXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
+endif
+
+gb_COMPILERDEFS := \
+ -DGCC \
+ -D$(CVER) \
+ -DCVER=$(CVER) \
+ -DGLIBC=2 \
+ -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
+ -DCPPU_ENV=gcc3 \
+ -D_MT \
+ -D_NATIVE_WCHAR_T_DEFINED \
+ -D_MSC_EXTENSIONS \
+ -D_FORCENAMELESSUNION \
+
+ifeq ($(USE_MINGW),cygwin-w64-mingw32)
+gb_COMPILERDEFS +=-D_declspec=__declspec
+endif
+
+gb_CPUDEFS := \
+ -DINTEL \
+ -D_M_IX86 \
+
+gb_CFLAGS := \
+ -Wall \
+ -Wendif-labels \
+ -Wextra \
+ -fmessage-length=0 \
+ -fno-strict-aliasing \
+ -pipe \
+ -nostdinc \
+
+gb_CXXFLAGS := \
+ -Wall \
+ -Wendif-labels \
+ -Wextra \
+ -Wno-ctor-dtor-privacy \
+ -Wno-non-virtual-dtor \
+ -Wreturn-type \
+ -Wshadow \
+ -Wuninitialized \
+ -fmessage-length=0 \
+ -fno-strict-aliasing \
+ -fno-use-cxa-atexit \
+ -pipe \
+ -nostdinc \
+
+ifneq ($(SYSBASE),)
+gb_CXXFLAGS += --sysroot=$(SYSBASE)
+gb_CFLAGS += --sysroot=$(SYSBASE)
+endif
+gb_LinkTarget_EXCEPTIONFLAGS := \
+ -DEXCEPTIONS_ON \
+ -fexceptions \
+ -fno-enforce-eh-specs \
+
+gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
+
+
+gb_LinkTarget_NOEXCEPTIONFLAGS := \
+ -DEXCEPTIONS_OFF \
+ -fno-exceptions \
+
+gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
+
+gb_LinkTarget_LDFLAGS := \
+ --export-all-symbols \
+ --kill-at \
+ --subsystem console \
+ --exclude-libs ALL \
+ --enable-stdcall-fixup \
+ --enable-runtime-pseudo-reloc-v2 \
+ -L$(gb_Library_DLLDIR) \
+ $(patsubst %,-L%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
+
+ifeq ($(MINGW_GCCLIB_EH),YES)
+gb_LinkTarget_LDFLAGS += -shared-libgcc
+endif
+
+ifeq ($(gb_DEBUGLEVEL),2)
+gb_COMPILEROPTFLAGS := -O0
+else
+gb_COMPILEROPTFLAGS := -Os
+endif
+
+
+# Helper class
+
+gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR))
+gb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR))
+gb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR))
+gb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR))
+
+define gb_Helper_abbreviate_dirs_native
+R=$(gb_Helper_REPODIR_NATIVE) && \
+$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,S=$(gb_Helper_SRCDIR_NATIVE) && \
+$(subst $(gb_Helper_SRCDIR_NATIVE)/,$$S/,O=$(gb_Helper_OUTDIR_NATIVE)) && \
+$(subst $(gb_Helper_SRCDIR_NATIVE)/,$$S/,$(subst $(REPODIR)/,$$R/,$(subst $(SRCDIR)/,$$S/,$(subst $(gb_Helper_OUTDIR_NATIVE)/,$$O/,$(subst $(OUTDIR)/,$$O/,W=$(gb_Helper_WORKDIR_NATIVE) && $(subst $(gb_Helper_WORKDIR_NATIVE)/,$$W/,$(subst $(WORKDIR)/,$$W/,$(1)))))))))
+endef
+
+# CObject class
+
+ifeq ($(gb_FULLDEPS),$(true))
+define gb_CObject__command_deponcompile
+$(call gb_Helper_abbreviate_dirs_native,\
+ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
+ $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
+ -I$(dir $(3)) \
+ $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
+ $(3) \
+ -f - \
+ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
+ -v OBJECTFILE=$(1) \
+ -v OUTDIR=$(OUTDIR)/ \
+ -v WORKDIR=$(WORKDIR)/ \
+ -v SRCDIR=$(SRCDIR)/ \
+ -v REPODIR=$(REPODIR)/ \
+ > $(call gb_CObject_get_dep_target,$(2)))
+endef
+else
+CObject__command_deponcompile =
+endif
+
+define gb_CObject__command
+$(call gb_Output_announce,$(2),$(true),C ,3)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) && \
+ unset INCLUDE && \
+ $(gb_CC) \
+ -c $(3) \
+ -o $(1) \
+ $(4) $(5) \
+ -I$(dir $(3)) \
+ $(6))
+$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
+endef
+
+
+
+# CxxObject class
+
+ifeq ($(gb_FULLDEPS),$(true))
+define gb_CxxObject__command_deponcompile
+$(call gb_Helper_abbreviate_dirs_native,\
+ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
+ $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
+ -I$(dir $(3)) \
+ $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
+ $(3) \
+ -f - \
+ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
+ -v OBJECTFILE=$(1) \
+ -v OUTDIR=$(OUTDIR)/ \
+ -v WORKDIR=$(WORKDIR)/ \
+ -v SRCDIR=$(SRCDIR)/ \
+ -v REPODIR=$(REPODIR)/ \
+ > $(call gb_CxxObject_get_dep_target,$(2)))
+endef
+else
+gb_CxxObject__command_deponcompile =
+endif
+
+define gb_CxxObject__command
+$(call gb_Output_announce,$(2),$(true),CXX,3)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) && \
+ unset INCLUDE && \
+ $(gb_CXX) \
+ -c $(3) \
+ -o $(1) \
+ $(4) $(5) \
+ -I$(dir $(3)) \
+ $(6))
+$(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
+
+endef
+
+
+# PrecompiledHeader class
+
+gb_PrecompiledHeader_EXT := .gch
+
+gb_PrecompiledHeader_get_enableflags = -I$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR) \
+ -DPRECOMPILED_HEADERS \
+ -Winvalid-pch \
+
+ifeq ($(gb_FULLDEPS),$(true))
+define gb_PrecompiledHeader__command_deponcompile
+$(call gb_Helper_abbreviate_dirs_native,\
+ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
+ $(4) $(5) \
+ -I$(dir $(3)) \
+ $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
+ $(3) \
+ -f - \
+ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
+ -v OBJECTFILE=$(1) \
+ -v OUTDIR=$(OUTDIR)/ \
+ -v WORKDIR=$(WORKDIR)/ \
+ -v SRCDIR=$(SRCDIR)/ \
+ -v REPODIR=$(REPODIR)/ \
+ > $(call gb_PrecompiledHeader_get_dep_target,$(2)))
+endef
+else
+gb_PrecompiledHeader__command_deponcompile =
+endif
+
+define gb_PrecompiledHeader__command
+$(call gb_Output_announce,$(2),$(true),PCH,1)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
+ unset INCLUDE && \
+ $(gb_CXX) \
+ -x c++-header \
+ $(4) $(5) \
+ -I$(dir $(3)) \
+ $(6) \
+ -c $(3) \
+ -o$(1))
+$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
+
+endef
+
+# NoexPrecompiledHeader class
+
+gb_NoexPrecompiledHeader_EXT := .gch
+
+gb_NoexPrecompiledHeader_get_enableflags = -I$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR) \
+ -Winvalid-pch \
+
+ifeq ($(gb_FULLDEPS),$(true))
+define gb_NoexPrecompiledHeader__command_deponcompile
+$(call gb_Helper_abbreviate_dirs_native,\
+ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
+ $(4) $(5) \
+ -I$(dir $(3)) \
+ $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
+ $(3) \
+ -f - \
+ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
+ -v OBJECTFILE=$(1) \
+ -v OUTDIR=$(OUTDIR)/ \
+ -v WORKDIR=$(WORKDIR)/ \
+ -v SRCDIR=$(SRCDIR)/ \
+ -v REPODIR=$(REPODIR)/ \
+ > $(call gb_NoexPrecompiledHeader_get_dep_target,$(2)))
+endef
+else
+gb_NoexPrecompiledHeader__command_deponcompile =
+endif
+
+define gb_NoexPrecompiledHeader__command
+$(call gb_Output_announce,$(2),$(true),PCH,1)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
+ unset INCLUDE && \
+ $(gb_CXX) \
+ -x c++-header \
+ $(4) $(5) \
+ -I$(dir $(3)) \
+ $(6) \
+ -c $(3) \
+ -o$(1))
+$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
+
+endef
+
+
+# LinkTarget class
+
+gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
+
+ifeq ($(gb_DEBUGLEVEL),2)
+gb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+gb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+
+endif
+
+gb_LinkTarget_INCLUDE :=\
+ $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
+ $(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
+
+gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
+
+define gb_LinkTarget__command
+$(if $(subst -static $(LDFLAGS),,$(TARGETTYPE_FLAGS) $(LDFLAGS)),$(if $(DLLTARGET),$(call gb_SharedLinkTarget__command,$(1),$(2),$(3),$(4),$(5),$(6),$(7)),$(call gb_ExecutableLinkTarget__command,$(1),$(2),$(3),$(4),$(5),$(6),$(7))),$(call gb_StaticLinkTarget__command,$(1),$(2),$(6),$(7)))
+endef
+
+define gb_SharedLinkTarget__command
+$(call gb_Output_announce,$(2),$(true),LNK,4)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) && \
+ RESPONSEFILE=$$(mktemp --tmpdir=$(gb_Helper_MISC)) && \
+ echo "$(foreach object,$(7),$(call gb_CxxObject_get_target,$(object))) \
+ $(foreach object,$(6),$(call gb_CObject_get_target,$(object)))" > $${RESPONSEFILE} && \
+ $(gb_LINK) \
+ $(3) \
+ --enable-auto-image-base \
+ -e _DllMainCRTStartup@12 \
+ $(gb_MINGWLIBDIR)/dllcrt2.o \
+ $(MINGW_CLIB_DIR)/crtbegin.o \
+ @$${RESPONSEFILE} \
+ --start-group $(foreach lib,$(5),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
+ --start-group $(patsubst %.dll,-l%,$(foreach lib,$(4),$(call gb_Library_get_dllname,$(lib)))) --end-group \
+ $(MINGW_CLIB_DIR)/crtend.o \
+ -Map $(basename $(DLLTARGET)).map \
+ -o $(DLLTARGET) && touch $(1))
+endef
+
+define gb_ExecutableLinkTarget__command
+$(call gb_Output_announce,$(2),$(true),LNK,4)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) && \
+ RESPONSEFILE=$$(mktemp --tmpdir=$(gb_Helper_MISC)) && \
+ echo "$(foreach object,$(7),$(call gb_CxxObject_get_target,$(object))) \
+ $(foreach object,$(6),$(call gb_CObject_get_target,$(object)))" > $${RESPONSEFILE} && \
+ $(gb_LINK) \
+ $(3) \
+ $(gb_MINGWLIBDIR)/crt2.o \
+ $(MINGW_CLIB_DIR)/crtbegin.o \
+ @$${RESPONSEFILE} \
+ --start-group $(foreach lib,$(5),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
+ --start-group $(patsubst %.dll,-l%,$(foreach lib,$(4),$(call gb_Library_get_dllname,$(lib)))) --end-group \
+ $(MINGW_CLIB_DIR)/crtend.o \
+ -Map $(basename $(1)).map \
+ -o $(1))
+endef
+
+define gb_StaticLinkTarget__command
+$(call gb_Output_announce,$(2),$(true),LNK,4)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) && \
+ RESPONSEFILE=$$(mktemp --tmpdir=$(gb_Helper_MISC)) && \
+ echo "$(foreach object,$(7),$(call gb_CxxObject_get_target,$(object))) \
+ $(foreach object,$(6),$(call gb_CObject_get_target,$(object)))" > $${RESPONSEFILE} && \
+ $(gb_AR) -rsu\
+ $(1) \
+ @$${RESPONSEFILE})
+endef
+
+
+# Library class
+
+gb_Library_DEFS := -D_DLL_ -D_DLL
+gb_Library_TARGETTYPEFLAGS := -shared
+gb_Library_get_rpath :=
+
+gb_Library_SYSPRE := i
+gb_Library_PLAINEXT := .lib
+
+gb_Library_PLAINLIBS_NONE += \
+ mingwthrd \
+ mingw32 \
+ mingwex \
+ $(gb_MINGW_LIBSTDCPP) \
+ $(gb_MINGW_LIBGCC) \
+ advapi32 \
+ gdi32 \
+ kernel32 \
+ msvcrt \
+ mpr \
+ moldname \
+ ole32 \
+ oleaut32 \
+ shell32 \
+ unicows \
+ user32 \
+ uuid \
+ uwinapi \
+ z \
+
+gb_LinkTarget_LAYER := \
+ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
+ $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOOLIB) \
+
+gb_Library_FILENAMES :=\
+ $(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
+
+gb_Library_DLLEXT := .dll
+gb_Library_MAJORVER := 3
+gb_Library_RTEXT := gcc3$(gb_Library_DLLEXT)
+ifeq ($(gb_PRODUCT),$(true))
+gb_Library_STLEXT := port_gcc$(gb_Library_DLLEXT)
+else
+gb_Library_STLEXT := port_gcc_stldebug$(gb_Library_DLLEXT)
+endif
+gb_Library_OOOEXT := gi$(gb_Library_DLLEXT)
+gb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
+gb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
+gb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT)
+
+gb_Library_DLLFILENAMES := \
+ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
+ $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \
+ $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \
+ $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
+ $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
+ $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \
+
+gb_Library_IARCSYSPRE := lib
+gb_Library_IARCEXT := .a
+
+gb_Library_ILIBEXT := .lib
+
+define gb_Library_Library_platform
+$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
+
+$(call gb_LinkTarget_set_auxtargets,$(2),\
+ $(patsubst %.dll,%.map,$(3)) \
+)
+
+$(call gb_Library_get_target,$(1)) \
+$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
+
+$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
+
+endef
+
+define gb_Library_get_dllname
+$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
+endef
+
+
+# StaticLibrary class
+
+gb_StaticLibrary_DEFS :=
+gb_StaticLibrary_TARGETTYPEFLAGS := -static
+gb_StaticLibrary_SYSPRE := lib
+gb_StaticLibrary_PLAINEXT := .a
+gb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
+
+gb_StaticLibrary_FILENAMES := \
+ $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
+ $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
+
+gb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES))
+
+define gb_StaticLibrary_StaticLibrary_platform
+$(call gb_LinkTarget_get_target,$(2)) : TARGETTYPE := staticlib
+$(call gb_LinkTarget_get_target,$(2)) : LAYER :=
+
+endef
+
+# Executable class
+
+gb_Executable_EXT := .exe
+gb_Executable_TARGETTYPEFLAGS :=
+gb_Executable_get_rpath :=
+gb_Executable_Executable_platform =
+
+
+# SdiTarget class
+
+gb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
+
+# SrsPartMergeTarget
+
+gb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
+
+# SrsPartTarget class
+
+gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
+gb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
+
+ifeq ($(gb_FULLDEPS),$(true))
+define gb_SrsPartTarget__command_dep
+$(call gb_Helper_abbreviate_dirs_native,\
+ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
+ $(3) $(4) \
+ $(2) \
+ -f - \
+ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
+ -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
+ -v OUTDIR=$(OUTDIR)/ \
+ -v WORKDIR=$(WORKDIR)/ \
+ -v SRCDIR=$(SRCDIR)/ \
+ -v REPODIR=$(REPODIR)/ \
+ > $(call gb_SrsPartTarget_get_dep_target,$(1)))
+endef
+else
+gb_SrsPartTarget__command_dep =
+endif
+
+# ComponentTarget
+
+gb_ComponentTarget_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
+gb_ComponentTarget_PREFIXBASISNATIVE := vnd.sun.star.expand:$$BRAND_BASE_DIR/program/
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/inc/installationtest.mk b/solenv/inc/installationtest.mk
index 8540140d1533..5d99bdeb0e2a 100644
--- a/solenv/inc/installationtest.mk
+++ b/solenv/inc/installationtest.mk
@@ -97,7 +97,8 @@ cpptest .PHONY :
-env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/types.rdb \
-env:arg-soffice=$(my_soffice) -env:arg-user=$(MISC)/$(TARGET)/user \
$(my_cppenv) $(TEST_ARGUMENTS:^"-env:arg-testarg.") $(CPPTEST_LIBRARY)
- $(RM) -r $(MISC)/$(TARGET)/user
+ # As a workaround for #i111400#, ignore failure of $(RM):
+ - $(RM) -r $(MISC)/$(TARGET)/user
.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == ""
$(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag
cpptest : $(MISC)/$(TARGET)/installation.flag
diff --git a/solenv/inc/javaunittest.mk b/solenv/inc/javaunittest.mk
index e129052a445e..6d7c564da2a0 100644
--- a/solenv/inc/javaunittest.mk
+++ b/solenv/inc/javaunittest.mk
@@ -52,9 +52,8 @@
# <platform>/class/, so that they are not accidentally included in jar files
# packed from <platform>/class/ subdirectories.
-TESTS := $(subst,.java,.test $(JAVATESTFILES))
JAVAFILES +:= $(JAVATESTFILES)
-JARFILES +:= OOoRunner.jar
+EXTRAJARFILES += $(OOO_JUNIT_JAR)
.INCLUDE: settings.mk
@@ -67,22 +66,26 @@ CLASSDIR !:= $(CLASSDIR)/test
.INCLUDE: target.mk
-ALLTAR: $(TESTS)
-
-$(JAVAFILES): $(MISC)/$(TARGET).classdir.flag
+$(JAVATARGET) : $(MISC)/$(TARGET).classdir.flag
$(MISC)/$(TARGET).classdir.flag:
- $(MKDIR) $(CLASSDIR)
$(TOUCH) $@
-.IF "$(TESTS)" != ""
-$(TESTS): $(JAVACLASSFILES)
-.ENDIF
+.IF "$(JAVATESTFILES)" != ""
+ALLTAR : test
+.END
-%.test .PHONY: %.java
- $(JAVAI) $(JAVAIFLAGS) $(JAVACPS) $(CLASSPATH) org.openoffice.Runner \
- -TestBase java_complex -NoOffice yes \
- -o $(subst,/,. $(subst,.test, $(PACKAGE).$@))
+.IF "$(SOLAR_JAVA)" == "TRUE" && "$(OOO_JUNIT_JAR)" != ""
+test .PHONY : $(JAVATARGET)
+ $(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \
+ '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \
+ org.junit.runner.JUnitCore \
+ $(foreach,i,$(JAVATESTFILES) $(subst,/,. $(PACKAGE)).$(i:s/.java//))
+.ELSE
+test .PHONY :
+ echo 'test needs SOLAR_JAVA=TRUE and OOO_JUNIT_JAR'
+.END
.IF "$(IDLTESTFILES)" != ""
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index 108e841a72f4..7e9c2e2bf834 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m97(Build:9566)
-BUILD=9566
-LAST_MINOR=m97
+RSCREVISION=300m98(Build:9568)
+BUILD=9568
+LAST_MINOR=m98
SOURCEVERSION=DEV300
diff --git a/solenv/inc/wntgcci.mk b/solenv/inc/wntgcci.mk
index a6c7e67cfd9f..5951538458a4 100644..100755
--- a/solenv/inc/wntgcci.mk
+++ b/solenv/inc/wntgcci.mk
@@ -85,7 +85,7 @@ CDEFS+=-D_DLL
# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
CFLAGSWARNCC=-Wall -Wextra -Wendif-labels
CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \
- -Wno-non-virtual-dtor -Wno-uninitialized
+ -Wno-non-virtual-dtor
CFLAGSWALLCC=$(CFLAGSWARNCC)
CFLAGSWALLCXX=$(CFLAGSWARNCXX)
CFLAGSWERRCC=-Werror
@@ -128,7 +128,7 @@ LINKFLAGSDEBUG=-g
LINKFLAGSOPT=
.IF "$(MINGW_SHARED_GXXLIB)"=="YES" && "$(DYNAMIC_CRT)"!=""
-STDLIBCPP=-lstdc++_s
+STDLIBCPP=$(MINGW_SHARED_LIBSTDCPP)
.ELSE
STDLIBCPP=-lstdc++
.ENDIF
diff --git a/sot/inc/sot/factory.hxx b/sot/inc/sot/factory.hxx
index 08dd21a88aa5..7b7feb0e9ebe 100644
--- a/sot/inc/sot/factory.hxx
+++ b/sot/inc/sot/factory.hxx
@@ -73,7 +73,6 @@ public:
void PutSuperClass( const SotFactory * );
virtual void * CreateInstance( SotObject ** ppObj = NULL ) const;
void * CastAndAddRef( SotObject * ) const;
- void * AggCastAndAddRef( SotObject * ) const;
BOOL Is( const SotFactory * pSuperClass ) const;
const SotFactory * GetSuper( USHORT nPos ) const
diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx
index db2ac3b30ffc..563c90d89a54 100644
--- a/sot/inc/sot/object.hxx
+++ b/sot/inc/sot/object.hxx
@@ -381,22 +381,17 @@ SotFactory * ClassName::pFactory = NULL; \
#pragma warning(disable: 4250)
#endif
-class SvAggregateMemberList;
struct IUnknown;
class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
{
friend class SotFactory;
friend class SvObject;
- SvAggregateMemberList * pAggList; // fuer Aggregation, erstes ist das MainObj
USHORT nStrongLockCount;
USHORT nOwnerLockCount;
BOOL bOwner:1,
bSVObject:1, // Ist Proxy, dann TRUE wenn andere Seite SV ist
bInClose:1; // TRUE, im DoClose
- void * DownAggCast( const SotFactory * pFact );
- void RemoveInterface( ULONG );
- void RemoveInterface( SotObject * );
#if defined (GCC) && (defined (C281) || defined (C290) || defined (C291))
public:
#else
@@ -414,25 +409,10 @@ public:
virtual IUnknown * GetInterface( const SvGlobalName & );
BOOL Owner() const { return bOwner; }
- BOOL IsSvObject() const;
-
- // Methoden fuer die Aggregation (siehe OLE2-Spec)
- BOOL ShouldDelete();
- virtual void QueryDelete();
- SvAggregateMemberList & GetAggList();
- void AddInterface( SotObject * );
- void AddInterface( SotFactory * );
- virtual SotObjectRef CreateAggObj( const SotFactory * );
- void * AggCast( const SotFactory * pFact );
- void * CastAndAddRef( const SotFactory * pFact );
- SotObject * GetMainObj() const;
-
- // !!! Read the Manual !!!
- virtual USHORT FuzzyLock( BOOL bLock, BOOL bIntern, BOOL bClose );
- void Lock( BOOL bLock )
- {
- FuzzyLock( bLock, TRUE, TRUE );
- }
+
+ void* CastAndAddRef( const SotFactory * pFact );
+
+ USHORT Lock( BOOL bLock ); // affects nStrongLockCount
USHORT GetOwnerLockCount() const { return nOwnerLockCount; }
USHORT GetStrongLockCount() const { return nStrongLockCount; }
@@ -450,18 +430,6 @@ private:
//==================class SotObjectRef======================================
SV_IMPL_REF(SotObject)
-inline SotObjectRef::SotObjectRef( SotObject * pObjP, SvCastEnum )
-{
- if( pObjP )
- {
- pObj = (SotObject *)pObjP->AggCast( SotObject::ClassFactory() );
- if( pObj )
- pObj->AddRef();
- }
- else
- pObj = NULL;
-}
-
//==================class SotObject*List====================================
SV_DECL_REF_LIST(SotObject,SotObject*)
SV_IMPL_REF_LIST(SotObject,SotObject*)
diff --git a/sot/inc/sot/sotref.hxx b/sot/inc/sot/sotref.hxx
index ae03032e286e..a6728627ef2c 100644
--- a/sot/inc/sot/sotref.hxx
+++ b/sot/inc/sot/sotref.hxx
@@ -33,14 +33,12 @@
#endif
//========================================================================
-enum SvCastEnum { SV_AGGREGATION_CAST };
#ifndef SVT_DECL_SOTOBJECT_DEFINED
#define SVT_DECL_SOTOBJECT_DEFINED
class SotObject;
class SotObjectRef
{
PRV_SV_DECL_REF(SotObject)
- inline SotObjectRef( SotObject * pObjP, SvCastEnum );
};
#endif
@@ -52,7 +50,6 @@ class ClassName##Ref \
PRV_SV_DECL_REF(ClassName) \
inline ClassName##Ref( const SotObjectRef & ); \
inline ClassName##Ref( SotObject * pObjP ); \
- inline ClassName##Ref( SotObject * pObjP, SvCastEnum ); \
};
#define SO2_IMPL_REF(ClassName) \
@@ -64,12 +61,9 @@ inline ClassName##Ref::ClassName##Ref( const SotObjectRef & r ) \
inline ClassName##Ref::ClassName##Ref( SotObject * pObjP ) \
{ \
pObj = (ClassName *)ClassName::ClassFactory()->CastAndAddRef( pObjP );\
-} \
-inline ClassName##Ref::ClassName##Ref( SotObject * pObjP, SvCastEnum ) \
-{ \
- pObj = (ClassName *)ClassName::ClassFactory()->AggCastAndAddRef( pObjP );\
}
+
#define SO2_DECL_IMPL_REF(ClassName) \
SO2_DECL_REF(ClassName) \
SO2_IMPL_REF(ClassName)
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index ca753265b082..3c034a980578 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -344,45 +344,6 @@ void * SotFactory::CastAndAddRef
return pObj ? pObj->CastAndAddRef( this ) : NULL;
}
-//=========================================================================
-void * SotFactory::AggCastAndAddRef
-(
- SotObject * pObj /* Das Objekt von dem der Typ gepr"uft wird. */
-) const
-/* [Beschreibung]
-
- Ist eine Optimierung, damit die Ref-Klassen k"urzer implementiert
- werden k"onnen. pObj wird auf den Typ der Factory gecastet.
- In c++ (wenn es immer erlaubt w"are) w"urde der void * wie im
- Beispiel gebildet.
- Factory der Klasse SvPersist.
- void * p = (void *)(SvPersist *)pObj;
- Hinzu kommt noch, dass ein Objekt aus meheren c++ Objekten
- zusammengesetzt sein kann. Diese Methode sucht nach einem
- passenden Objekt.
-
- [R"uckgabewert]
-
- void *, NULL, pObj war NULL oder das Objekt war nicht vom Typ
- der Factory.
- Ansonsten wird pObj zuerst auf den Typ der Factory
- gecastet und dann auf void *.
-
- [Querverweise]
-
- <SvObject::AggCast>
-*/
-{
- void * pRet = NULL;
- if( pObj )
- {
- pRet = pObj->AggCast( this );
- if( pRet )
- pObj->AddRef();
- }
- return pRet;
-}
-
/*************************************************************************
|* SotFactory::Is()
|*
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 9af1b441b37a..70792a325d31 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -35,10 +35,6 @@
#include <sot/factory.hxx>
#include <sot/agg.hxx>
-/************** class SvAggregateMemberList *****************************/
-/************************************************************************/
-PRV_SV_IMPL_OWNER_LIST(SvAggregateMemberList,SvAggregate);
-
/************** class SotObject ******************************************/
class SotObjectFactory : public SotFactory
{
@@ -84,8 +80,7 @@ void SotObject::TestMemberInvariant( BOOL /*bPrint*/ )
|* Beschreibung
*************************************************************************/
SotObject::SotObject()
- : pAggList ( NULL )
- , nStrongLockCount( 0 )
+ : nStrongLockCount( 0 )
, nOwnerLockCount( 0 )
, bOwner ( TRUE )
, bSVObject ( FALSE )
@@ -119,246 +114,11 @@ IUnknown * SotObject::GetInterface( const SvGlobalName & )
}
/*************************************************************************
-|* SotObject::IsSvClass()
-|*
-|* Beschreibung
-*************************************************************************/
-BOOL SotObject::IsSvObject() const
-{
- return Owner() || bSVObject;
-}
-
-/*************************************************************************
-|* SotObject::QueryDelete()
-|*
-|* Beschreibung: Bei allen aggregierten Objekte muss der RefCount auf
-|* 0 gehen, damit das Gesammt-Objekt zerstoert wird. Das
-|* zerst´┐Żren von Teilen ist verboten. Da der Aggregator
-|* (oder Cast-Verwalter) den Zaehler der aggregierten
-|* Objekte um 1 erhoeht, muss dies bei der Berechnung
-|* des 0-RefCounts beruecksichtigt werden.
-*************************************************************************/
-BOOL SotObject::ShouldDelete()
-{
- if( !pAggList )
- return TRUE;
-
- SvAggregate & rMO = pAggList->GetObject( 0 );
- if( rMO.bMainObj )
- {
- AddRef();
- pAggList->GetObject( 0 ).pObj->ReleaseRef();
- return FALSE;
- }
-
- ULONG i;
- for( i = 1; i < pAggList->Count(); i++ )
- {
- SvAggregate & rAgg = pAggList->GetObject( i );
- // Groesser 1, wegen AddRef() bei AddInterface
- if( !rAgg.bFactory && rAgg.pObj->GetRefCount() > 1 )
- {
- // den eigenen hochzaehelen
- AddRef();
- // einen Aggregierten runterzaehlen
- rAgg.pObj->ReleaseRef();
- return FALSE;
- }
- }
- AddNextRef(); // rekursion stoppen
- for( i = pAggList->Count() -1; i > 0; i-- )
- {
- // Referenzen aufloesen
- DBG_ASSERT( !pAggList->GetObject( i ).bMainObj, "main object reference is opened" );
- RemoveInterface( i );
- }
- delete pAggList;
- pAggList = NULL;
- // und zerstoeren, dies ist unabhaengig vom RefCount
- return TRUE;
-}
-
-/*************************************************************************
-|* SotObject::QueryDelete()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::QueryDelete()
-{
- if( ShouldDelete() )
- SvRefBase::QueryDelete();
-}
-
-
-
-/*************************************************************************
-|* SotObject::GetAggList()
-|*
-|* Beschreibung
-*************************************************************************/
-SvAggregateMemberList & SotObject::GetAggList()
-{
- if( !pAggList )
- {
- pAggList = new SvAggregateMemberList( 2, 1 );
- pAggList->Append( SvAggregate() );
- }
- return *pAggList;
-}
-
-
-/*************************************************************************
-|* SotObject::RemoveInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::RemoveInterface( ULONG nPos )
-{
- SvAggregate & rAgg = pAggList->GetObject( nPos );
- if( !rAgg.bFactory )
- {
- DBG_ASSERT( rAgg.pObj->pAggList, "no aggregation list" );
- DBG_ASSERT( rAgg.pObj->pAggList->GetObject( 0 ).pObj == this,
- "not owner of aggregated object" );
- // sich selbst als Cast-Verwalter austragen
- rAgg.pObj->pAggList->GetObject( 0 ) = SvAggregate();
- // Referenz aufloesen
- rAgg.pObj->ReleaseRef();
- // Aus der eigenen List austragen
- pAggList->Remove( nPos );
- }
-}
-
-/*************************************************************************
-|* SotObject::RemoveInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::RemoveInterface( SotObject * pObjP )
-{
- DBG_ASSERT( pObjP, "null pointer" );
- DBG_ASSERT( pAggList, "no aggregation list" );
- ULONG i;
- for( i = 0; i < pAggList->Count(); i++ )
- {
- SvAggregate & rAgg = pAggList->GetObject( i );
- if( !rAgg.bFactory && pObjP == rAgg.pObj )
- RemoveInterface( i );
- }
- DBG_ASSERT( i < pAggList->Count(), "object not found" );
-}
-
-/*************************************************************************
-|* SotObject::AddInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::AddInterface( SotObject * pObjP )
-{
- pObjP->AddRef(); // Objekt festhalten
- GetAggList();
- pAggList->Append( SvAggregate( pObjP, FALSE ) );
-
- // sich selbst als Typecast-Verwalter eintragen
- SvAggregateMemberList & rAList = pObjP->GetAggList();
- DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" );
- rAList[ 0 ] = SvAggregate( this, TRUE );
-}
-
-/*************************************************************************
-|* SotObject::AddInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::AddInterface( SotFactory * pFactP )
-{
- GetAggList();
- pAggList->Append( SvAggregate( pFactP ) );
-}
-
-/*************************************************************************
-|* SotObject::CreateAggObj()
-|*
-|* Beschreibung
-*************************************************************************/
-SotObjectRef SotObject::CreateAggObj( const SotFactory * )
-{
- return SotObjectRef();
-}
-
-
-/*************************************************************************
-|* SotObject::DownAggCast()
-|*
-|* Beschreibung
-*************************************************************************/
-void * SotObject::DownAggCast( const SotFactory * pFact )
-{
- void * pCast = NULL;
- // geht den Pfad nur Richtung aggregierte Objekte
- if( pAggList )
- {
- for( ULONG i = 1; !pCast || i < pAggList->Count(); i++ )
- {
- SvAggregate & rAgg = pAggList->GetObject( i );
- if( rAgg.bFactory )
- {
- if( rAgg.pFact->Is( pFact ) )
- {
- // On-Demand erzeugen, wenn Typ gebraucht
- SotObjectRef aObj( CreateAggObj( rAgg.pFact ) );
- rAgg.bFactory = FALSE;
- rAgg.pObj = aObj;
- rAgg.pObj->AddRef();
-
- // sich selbst als Typecast-Verwalter eintragen
- SvAggregateMemberList & rAList = rAgg.pObj->GetAggList();
- DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" );
- rAList[ 0 ] = SvAggregate( this, TRUE );
- }
- }
- if( !rAgg.bFactory )
- {
- // muss der (void *) auf Klasse pFact sein
- pCast = rAgg.pObj->Cast( pFact );
- if( !pCast )
- pCast = rAgg.pObj->DownAggCast( pFact );
- if( pCast )
- break;
- }
- }
- }
- return pCast;
-}
-
-/*************************************************************************
-|* SotObject::AggCast()
-|*
-|* Beschreibung
-*************************************************************************/
-void * SotObject::AggCast( const SotFactory * pFact )
-{
- void * pCast = NULL;
- if( pAggList )
- {
- SvAggregate & rAgg = pAggList->GetObject( 0 );
- if( rAgg.bMainObj )
- return rAgg.pObj->AggCast( pFact );
- pCast = Cast( pFact );
- if( !pCast )
- pCast = DownAggCast( pFact );
- }
- else
- pCast = Cast( pFact );
- return pCast;
-}
-
-/*************************************************************************
|* SotObject::CastAndAddRef()
|*
|* Beschreibung
*************************************************************************/
-void * SotObject::CastAndAddRef( const SotFactory * pFact )
+void* SotObject::CastAndAddRef( const SotFactory * pFact )
{
void * pCast = Cast( pFact );
if( pCast )
@@ -366,49 +126,8 @@ void * SotObject::CastAndAddRef( const SotFactory * pFact )
return pCast;
}
-/*************************************************************************
-|* SotObject::GetMainObj()
-|*
-|* Beschreibung
-*************************************************************************/
-SotObject * SotObject::GetMainObj() const
-{
- if( pAggList )
- {
- if( pAggList->GetObject( 0 ).bMainObj )
- return pAggList->GetObject( 0 ).pObj->GetMainObj();
- }
- return (SotObject *)this;
-}
-
//=========================================================================
-USHORT SotObject::FuzzyLock
-(
- BOOL bLock, /* TRUE, lock. FALSE, unlock. */
- BOOL /*bIntern*/, /* TRUE, es handelt sich um einen internen Lock.
- FALSE, der Lock kam von aussen (Ole2, Ipc2) */
- BOOL bClose /* TRUE, Close aufrufen wenn letzte Lock */
-)
-/* [Beschreibung]
-
- Erlaubte Parameterkombinationen:
- ( TRUE, TRUE, * ) -> interner Lock.
- ( FALSE, TRUE, TRUE ) -> interner Unlock mit Close,
- wenn LockCount() == 0
- ( TRUE, FALSE, * ) -> externer Lock.
- ( FALSE, FALSE, TRUE ) -> externer Unlock mit Close,
- wenn LockCount() == 0
- ( FALSE, FALSE, FALSE ) -> externer Unlock
-
- F"ur !Owner() wird der Aufruf an das externe Objekt weitergeleitet.
- F"ur diese muss das <IOleItemContainer>-Interface zur Vef"ugung stehen.
- bIntern und bClose werden dann ignoriert.
- Wenn der LockCount auf 0 wechselt, wird <SotObject::DoClose>
- gerufen, wenn kein OwnerLock besteht.
-
- [Anmerkung]
-
-*/
+USHORT SotObject::Lock( BOOL bLock )
{
SotObjectRef xHoldAlive( this );
USHORT nRet;
@@ -423,8 +142,9 @@ USHORT SotObject::FuzzyLock
ReleaseRef();
}
- if( !nRet && bClose && !nOwnerLockCount )
+ if( !nRet && !nOwnerLockCount )
DoClose();
+
return nRet;
}
diff --git a/svl/Library_fsstorage.mk b/svl/Library_fsstorage.mk
index f109e0620d5e..93ca50a2d9f4 100644
--- a/svl/Library_fsstorage.mk
+++ b/svl/Library_fsstorage.mk
@@ -67,6 +67,20 @@ $(eval $(call gb_Library_add_exception_objects,fsstorage,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fsstorage,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fsstorage,\
kernel32 \
msvcrt \
@@ -75,4 +89,5 @@ $(eval $(call gb_Library_add_linked_libs,fsstorage,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_passwordcontainer.mk b/svl/Library_passwordcontainer.mk
index d0b35552e18a..a0fbe88be93d 100644
--- a/svl/Library_passwordcontainer.mk
+++ b/svl/Library_passwordcontainer.mk
@@ -63,6 +63,20 @@ $(eval $(call gb_Library_add_exception_objects,passwordcontainer,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
kernel32 \
msvcrt \
@@ -71,4 +85,5 @@ $(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 7faf5caa7f65..5181983b8bc1 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -169,6 +169,22 @@ $(eval $(call gb_Library_add_exception_objects,svl,\
svl/source/svdde/ddewrap \
))
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,svl,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ gdi32 \
+ msvcrt \
+ shell32 \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,svl,\
advapi32 \
kernel32 \
@@ -178,6 +194,7 @@ $(eval $(call gb_Library_add_linked_libs,svl,\
user32 \
uwinapi \
))
+endif
else
$(eval $(call gb_Library_add_exception_objects,svl,\
svl/unx/source/svdde/ddedummy \
diff --git a/svl/prj/build.lst b/svl/prj/build.lst
index b48df3a6824a..09acc768cb13 100644
--- a/svl/prj/build.lst
+++ b/svl/prj/build.lst
@@ -1,3 +1,4 @@
sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL
sl svl usr1 - all svl_mkout NULL
sl svl\prj nmake - all svl_prj NULL
+sl svl\qa\complex\passwordcontainer nmake - all svl_qa_complex_passwordcontainer NULL
diff --git a/svl/qa/complex/passwordcontainer/makefile.mk b/svl/qa/complex/passwordcontainer/makefile.mk
new file mode 100644
index 000000000000..625404682761
--- /dev/null
+++ b/svl/qa/complex/passwordcontainer/makefile.mk
@@ -0,0 +1,134 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../../..
+PRJNAME = svl
+TARGET = qa_complex_passwordcontainer
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/passwordcontainer
+
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+ PasswordContainerUnitTest.java
+
+
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) \
+ PasswordContainerTest.java\
+ Test01.java\
+ Test02.java\
+ Test03.java\
+ TestHelper.java\
+ MasterPasswdHandler.java
+
+
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
+
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
+
+
+#
+#
+#
+#
+# PRJ = ..$/..$/..
+# TARGET = PasswordContainerUnitTest
+# PRJNAME=svl
+# PACKAGE = complex$/passwordcontainer
+#
+# # --- Settings -----------------------------------------------------
+# .INCLUDE: settings.mk
+#
+#
+# #----- compile .java files -----------------------------------------
+#
+# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+#
+# JAVAFILES =\
+# PasswordContainerUnitTest.java\
+# PasswordContainerTest.java\
+# TestHelper.java\
+# Test01.java\
+# Test02.java\
+# Test03.java\
+# MasterPasswdHandler.java
+#
+# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+#
+# #----- make a jar from compiled files ------------------------------
+#
+# MAXLINELENGTH = 100000
+#
+# JARCLASSDIRS = $(PACKAGE)
+# JARTARGET = $(TARGET).jar
+# JARCOMPRESS = TRUE
+#
+# # --- Parameters for the test --------------------------------------
+#
+# # start an office if the parameter is set for the makefile
+# .IF "$(OFFICE)" == ""
+# CT_APPEXECCOMMAND =
+# .ELSE
+# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+# .ENDIF
+#
+# # test base is java complex
+# CT_TESTBASE = -TestBase java_complex
+#
+# # test looks something like the.full.package.TestName
+# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+#
+# # start the runner application
+# CT_APP = org.openoffice.Runner
+#
+# # --- Targets ------------------------------------------------------
+#
+# .INCLUDE: target.mk
+#
+# RUN: run
+#
+# run:
+# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
+#
+#
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index ab0895dea07f..c41bc9d6b29e 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
svtools/source/dialogs/prnsetup.src \
svtools/source/dialogs/so3res.src \
svtools/source/dialogs/wizardmachine.src \
+ svtools/source/filter.vcl/filter/exportdialog.src \
svtools/source/java/javaerror.src \
svtools/source/misc/ehdl.src \
svtools/source/misc/helpagent.src \
@@ -67,6 +68,7 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
svtools/source/misc/langtab.src \
svtools/source/misc/undo.src \
svtools/source/plugapp/testtool.src \
+ svtools/source/toolpanel/toolpanel.src \
))
diff --git a/svtools/Executable_bmp.mk b/svtools/Executable_bmp.mk
index 24019ced63d2..67b21600e523 100644
--- a/svtools/Executable_bmp.mk
+++ b/svtools/Executable_bmp.mk
@@ -53,6 +53,20 @@ $(eval $(call gb_Executable_add_exception_objects,bmp,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Executable_add_linked_libs,bmp,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,bmp,\
kernel32 \
msvcrt \
@@ -61,6 +75,7 @@ $(eval $(call gb_Executable_add_linked_libs,bmp,\
uwinapi \
))
endif
+endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_linked_libs,bmp,\
diff --git a/svtools/Executable_bmpsum.mk b/svtools/Executable_bmpsum.mk
index 3d04c3b5a25a..6b2c0466f0ec 100644
--- a/svtools/Executable_bmpsum.mk
+++ b/svtools/Executable_bmpsum.mk
@@ -49,6 +49,20 @@ $(eval $(call gb_Executable_add_exception_objects,bmpsum,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
kernel32 \
msvcrt \
@@ -57,6 +71,7 @@ $(eval $(call gb_Executable_add_linked_libs,bmpsum,\
uwinapi \
))
endif
+endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk
index 99bde19e1055..d6b96970eacc 100644
--- a/svtools/Executable_g2g.mk
+++ b/svtools/Executable_g2g.mk
@@ -50,6 +50,20 @@ $(eval $(call gb_Executable_add_exception_objects,g2g,\
svtools/bmpmaker/g2g \
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Executable_add_linked_libs,g2g,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,g2g,\
kernel32 \
msvcrt \
@@ -58,6 +72,7 @@ $(eval $(call gb_Executable_add_linked_libs,g2g,\
uwinapi \
))
endif
+endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_linked_libs,g2g,\
pthread \
diff --git a/svtools/Library_hatchwindowfactory.mk b/svtools/Library_hatchwindowfactory.mk
index 150b71396284..3e96d22588c8 100644
--- a/svtools/Library_hatchwindowfactory.mk
+++ b/svtools/Library_hatchwindowfactory.mk
@@ -64,6 +64,20 @@ $(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
kernel32 \
msvcrt \
@@ -73,4 +87,5 @@ $(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_productregistration.mk b/svtools/Library_productregistration.mk
index 8b0c27d4469a..5df44f631097 100644
--- a/svtools/Library_productregistration.mk
+++ b/svtools/Library_productregistration.mk
@@ -66,6 +66,20 @@ $(eval $(call gb_Library_add_linked_libs,productregistration,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,productregistration,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,productregistration,\
kernel32 \
msvcrt \
@@ -74,4 +88,5 @@ $(eval $(call gb_Library_add_linked_libs,productregistration,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 80226851dd6a..fb0fae66ca12 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -299,6 +299,25 @@ $(eval $(call gb_Library_add_linked_libs,svt,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,svt,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ gdi32 \
+ kernel32 \
+ msvcrt \
+ ole32 \
+ oleaut32 \
+ user32 \
+ uuid \
+))
+else
$(eval $(call gb_Library_add_linked_libs,svt,\
advapi32 \
gdi32 \
@@ -312,4 +331,5 @@ $(eval $(call gb_Library_add_linked_libs,svt,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst
index 465c3a688ada..3f9e02b26ca3 100644
--- a/svtools/prj/build.lst
+++ b/svtools/prj/build.lst
@@ -1,3 +1,3 @@
st svtools : l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL
st svtools\prj nmake - all st_prj NULL
-
+st svtools\qa\unoapi nmake - all st_qa_unoapi NULL
diff --git a/svtools/qa/unoapi/makefile.mk b/svtools/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..e3afb77e637a
--- /dev/null
+++ b/svtools/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = svtools
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/svtools/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx
index 87585f5b2587..6ea9f05d78a1 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -523,7 +523,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
c = getChar(); // '/' entfernen
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
- sal_Unicode cPeek = peekChar();
+ sal_Unicode cPeek = c;
while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE )
{
getChar();
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index 1b84206d6696..b26f7bbf091b 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -33,6 +33,8 @@
#include "ipwin.hxx"
#include <toolkit/helper/convert.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -50,6 +52,8 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer >
const awt::Rectangle& aBounds,
const awt::Size& aSize )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
Window* pParent = NULL;
VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent );
@@ -117,7 +121,7 @@ uno::Any SAL_CALL VCLXHatchWindow::queryInterface( const uno::Type & rType )
throw( uno::RuntimeException )
{
// Attention:
- // Don't use mutex or guard in this method!!! Is a method of XInterface.
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
uno::Any aReturn( ::cppu::queryInterface( rType,
static_cast< embed::XHatchWindow* >( this ) ) );
diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx
index 0eec027167c2..1222013372f7 100644
--- a/svtools/source/hatchwindow/hatchwindowfactory.cxx
+++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx
@@ -31,6 +31,7 @@
#include "hatchwindowfactory.hxx"
#include "hatchwindow.hxx"
#include "cppuhelper/factory.hxx"
+#include <vcl/svapp.hxx>
#include "documentcloser.hxx"
@@ -69,6 +70,7 @@ uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchW
if ( !xParent.is() )
throw lang::IllegalArgumentException(); // TODO
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
VCLXHatchWindow* pResult = new VCLXHatchWindow();
pResult->initializeWindow( xParent, aBounds, aHandlerSize );
return uno::Reference< embed::XHatchWindow >( static_cast< embed::XHatchWindow* >( pResult ) );
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 3aa0016c225e..a96067f95186 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -343,6 +343,7 @@ void EmbeddedObjectRef::Assign( const NS_UNO::Reference < NS_EMBED::XEmbeddedObj
mpImp->xListener = EmbedEventListener_Impl::Create( this );
//#i103460#
+ if ( IsChart() )
{
::com::sun::star::uno::Reference < ::com::sun::star::chart2::XDefaultSizeTransmitter > xSizeTransmitter( xObj, uno::UNO_QUERY );
DBG_ASSERT( xSizeTransmitter.is(), "Object does not support XDefaultSizeTransmitter -> will cause #i103460#!" );
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 90bc4899209b..6c58cb530330 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -948,8 +948,16 @@ namespace svt { namespace table
//In the case that column headers are defined but data hasn't yet been set,
//only column headers will be shown
if(m_pModel->hasColumnHeaders())
+ {
if(m_nColHeaderHeightPixel>1)
+ {
m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel());
+ if(m_bResizingGrid)
+ //update column widths to fit in grid
+ impl_ni_updateColumnWidths();
+ m_bResizingGrid = true;
+ }
+ }
if(m_nColumnCount != 0)
impl_ni_updateScrollbars();
}
@@ -2011,8 +2019,11 @@ namespace svt { namespace table
PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn);
impl_ni_getAccVisibleColWidths();
int newColWidth = m_aColumnWidthsPixel[m_nCurColumn];
+ //make resize area for the separator wider
+ int nLeft = m_aVisibleColumnWidthsPixel[resizingColumn]-4;
//subtract 1 from m_aAccColumnWidthPixel because right border should be part of the current cell
- if(m_aVisibleColumnWidthsPixel[resizingColumn]-1 == rPoint.X() && pColumn->isResizable())
+ int nRight = m_aVisibleColumnWidthsPixel[resizingColumn]-1;
+ if( rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable())
aNewPointer = Pointer( POINTER_HSPLIT );
//MouseButton was pressed but not yet released, mouse is moving
if(m_bResizing)
@@ -2040,7 +2051,10 @@ namespace svt { namespace table
m_bResizingGrid = false;
m_nResizingColumn = m_nCurColumn;
PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn);
- if(m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1 == rPoint.X() && pColumn->isResizable())
+ //make resize area for the separator wider
+ int nLeft = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-4;
+ int nRight = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1;
+ if(rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable())
{
m_pDataWindow->CaptureMouse();
m_bResizing = true;
diff --git a/svx/inc/svx/unoshtxt.hxx b/svx/inc/svx/unoshtxt.hxx
index c06d3955b442..07e6ef79f7ca 100644
--- a/svx/inc/svx/unoshtxt.hxx
+++ b/svx/inc/svx/unoshtxt.hxx
@@ -90,6 +90,8 @@ public:
void ChangeModel( SdrModel* pNewModel );
+ void UpdateOutliner();
+
private:
SVX_DLLPRIVATE SvxTextEditSource( SvxTextEditSourceImpl* pImpl );
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 154999333296..b8b4055ef5de 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -481,6 +481,7 @@ namespace svxform
if ( m_bDisposed )
return;
+ // SfxObjectShellRef is good here since the model controls the lifetime of the object
SfxObjectShellRef xObjectShell = m_rFormModel.GetObjectShell();
if( !xObjectShell.Is() )
return;
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index e63325f710e9..ed0d57b96f97 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -130,6 +130,8 @@ private:
{
Reference< XMultiComponentFactory > xMFac(
xCtx->getServiceManager(), UNO_QUERY );
+
+ // SfxObjectShellRef is good here since the model controls the lifetime of the shell
SfxObjectShellRef xObjSh = pModel->GetObjectShell();
Reference< XMultiServiceFactory > xDocFac;
if ( xObjSh.Is() )
@@ -150,6 +152,7 @@ private:
{
try
{
+ // SfxObjectShellRef is good here since the model controls the lifetime of the shell
SfxObjectShellRef xObjSh = pModel->GetObjectShell();
if ( xObjSh.Is() && m_vbaListener.is() )
{
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 7b9185ca7d3b..f10e3bf33fc3 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1430,8 +1430,6 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint
FASTBOOL bContourFrame=IsContourTextFrame();
- ImpSetupDrawOutlinerForPaint( bContourFrame, rOutl, aTextRect, aAnchorRect, rPaintRect, aFitXKorreg );
-
if( GetModel() )
{
MapMode aMapMode(GetModel()->GetScaleUnit(), Point(0,0),
@@ -1439,6 +1437,8 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint
GetModel()->GetScaleFraction());
rOutl.SetRefMapMode(aMapMode);
}
+
+ ImpSetupDrawOutlinerForPaint( bContourFrame, rOutl, aTextRect, aAnchorRect, rPaintRect, aFitXKorreg );
}
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 04770faf694b..f82283417be6 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -122,7 +122,6 @@ private:
SvxDrawOutlinerViewForwarder* CreateViewForwarder();
void SetupOutliner();
- void UpdateOutliner();
sal_Bool HasView() const { return mpView ? sal_True : sal_False; }
sal_Bool IsEditMode() const
@@ -168,6 +167,8 @@ public:
virtual void ObjectInDestruction(const SdrObject& rObject);
void ChangeModel( SdrModel* pNewModel );
+
+ void UpdateOutliner();
};
//------------------------------------------------------------------------
@@ -1147,3 +1148,8 @@ void SvxTextEditSource::ChangeModel( SdrModel* pNewModel )
{
mpImpl->ChangeModel( pNewModel );
}
+
+void SvxTextEditSource::UpdateOutliner()
+{
+ mpImpl->UpdateOutliner();
+}
diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk
index ee33da85561f..34a52e4786c7 100644
--- a/sw/Library_msword.mk
+++ b/sw/Library_msword.mk
@@ -114,6 +114,21 @@ $(eval $(call gb_Library_add_exception_objects,msword,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,msword,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,msword,\
advapi32 \
kernel32 \
@@ -123,4 +138,5 @@ $(eval $(call gb_Library_add_linked_libs,msword,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index cc1df51d2dba..e8e127d3ab0f 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -737,6 +737,21 @@ $(eval $(call gb_Library_add_linked_libs,sw,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,sw,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,sw,\
advapi32 \
kernel32 \
@@ -746,6 +761,7 @@ $(eval $(call gb_Library_add_linked_libs,sw,\
uwinapi \
))
endif
+endif
$(eval $(call gb_SdiTarget_SdiTarget,sw/sdi/swslots,sw/sdi/swriter))
diff --git a/sw/Library_swd.mk b/sw/Library_swd.mk
index 17511d3bf4ed..39440092c574 100644
--- a/sw/Library_swd.mk
+++ b/sw/Library_swd.mk
@@ -70,10 +70,23 @@ $(eval $(call gb_Library_add_exception_objects,swd,\
sw/source/ui/uno/swdetect \
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,swd,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,swd,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 12227c9a0ae8..927aaab1fd98 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -167,6 +167,21 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,swui,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,swui,\
advapi32 \
kernel32 \
@@ -176,4 +191,5 @@ $(eval $(call gb_Library_add_linked_libs,swui,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk
index 44bbfa8a0c6f..645d383dd8f9 100644
--- a/sw/Library_vbaswobj.mk
+++ b/sw/Library_vbaswobj.mk
@@ -126,6 +126,21 @@ $(eval $(call gb_Library_set_ldflags,vbaswobj,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,vbaswobj,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,vbaswobj,\
advapi32 \
kernel32 \
@@ -135,4 +150,5 @@ $(eval $(call gb_Library_add_linked_libs,vbaswobj,\
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 736fbb70a3b5..4aad1fb56cd1 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -74,6 +74,7 @@ class SwList;
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
#include <vos/ref.hxx>
#include <svx/svdtypes.hxx>
+#include <sfx2/objsh.hxx>
#include <svl/style.hxx>
#include <editeng/numitem.hxx>
#include "comphelper/implementationreference.hxx"
@@ -94,8 +95,6 @@ class SwList;
#include <boost/scoped_ptr.hpp>
-class SfxObjectShell;
-class SfxObjectShellRef;
class SvxForbiddenCharactersTable;
class SwExtTextInput;
class DateTime;
@@ -358,9 +357,8 @@ class SW_DLLPUBLIC SwDoc :
SvxMacroTableDtor *pMacroTable; // Tabelle der dokumentglobalen Macros
SwDocShell *pDocShell; // Ptr auf die SfxDocShell vom Doc
- SfxObjectShellRef* pDocShRef; // fuers Kopieren von OLE-Nodes (wenn keine
- // DocShell gesetzt ist, muss dieser
- // Ref-Pointer gesetzt sein!!!!)
+ SfxObjectShellLock xTmpDocShell; // A temporary shell that is used to copy OLE-Nodes
+
sfx2::LinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE)
SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von
@@ -1834,10 +1832,10 @@ public:
const SwDocShell* GetDocShell() const { return pDocShell; }
void SetDocShell( SwDocShell* pDSh );
- // falls beim Kopieren von OLE-Nodes eine DocShell angelegt werden muss,
- // dann MUSS der Ref-Pointer besetzt sein!!!!
- SfxObjectShellRef* GetRefForDocShell() { return pDocShRef; }
- void SetRefForDocShell( SfxObjectShellRef* p ) { pDocShRef = p; }
+ // in case during copying of embedded object a new shell is created,
+ // it should be set here and cleaned later
+ void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; }
+ SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; }
// fuer die TextBausteine - diese habe nur ein SvPersist zur
// Verfuegung
diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx
index 39a9664c4123..9e15051232a4 100644
--- a/sw/inc/unomailmerge.hxx
+++ b/sw/inc/unomailmerge.hxx
@@ -41,7 +41,7 @@
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <com/sun/star/text/XMailMergeBroadcaster.hpp>
#include <svl/itemprop.hxx>
-#include <sfx2/objsh.hxx> // SfxObjectShellRef
+#include <sfx2/objsh.hxx>
#include <functional>
diff --git a/sw/prj/build.lst b/sw/prj/build.lst
index 71a6b39a261d..f36b0075b70a 100644
--- a/sw/prj/build.lst
+++ b/sw/prj/build.lst
@@ -1,2 +1,5 @@
sw sw : filter l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter LIBXSLT:libxslt NULL
sw sw\prj nmake - all sw_prj NULL
+sw sw\qa\complex\accessibility nmake - all sw_qa_complex_accessibility NULL
+sw sw\qa\complex\checkColor nmake - all sw_qa_complex_checkColor NULL
+sw sw\qa\unoapi nmake - all sw_qa_unoapi NULL
diff --git a/sw/qa/complex/accessibility/makefile.mk b/sw/qa/complex/accessibility/makefile.mk
new file mode 100644
index 000000000000..06e7c6a70408
--- /dev/null
+++ b/sw/qa/complex/accessibility/makefile.mk
@@ -0,0 +1,50 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../../..
+PRJNAME = sw
+TARGET = qa_complex_accessibility
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/accessibility
+JAVATESTFILES = AccessibleRelationSet.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sw/qa/complex/checkColor/makefile.mk b/sw/qa/complex/checkColor/makefile.mk
new file mode 100644
index 000000000000..e5b368083ada
--- /dev/null
+++ b/sw/qa/complex/checkColor/makefile.mk
@@ -0,0 +1,50 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../../..
+PRJNAME = sw
+TARGET = qa_complex_checkColor
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/checkColor
+JAVATESTFILES = CheckChangeColor.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sw/qa/unoapi/makefile.mk b/sw/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..f5102c2c9c84
--- /dev/null
+++ b/sw/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = sw
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/sw/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 30a385442fc0..91c67cc96fb3 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -254,7 +254,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
String sFileName;
if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() )
{
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
if( xDocSh->DoInitNew( 0 ) )
{
SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc();
@@ -605,7 +605,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
String sFileName;
if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() )
{
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
if( xDocSh->DoInitNew( 0 ) )
{
SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc();
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 484b5119d9e5..e0d3437959c7 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -254,7 +254,6 @@ SwDoc::SwDoc() :
pFtnIdxs( new SwFtnIdxs ),
pDocStat( new SwDocStat ),
pDocShell( 0 ),
- pDocShRef( 0 ),
pLinkMgr( new sfx2::LinkManager( 0 ) ),
pACEWord( 0 ),
pURLStateChgd( 0 ),
@@ -1149,15 +1148,23 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
// COMPATIBILITY FLAGS END
//
pRet->ReplaceStyles( * const_cast< SwDoc*>( this ));
- SfxObjectShellRef aDocShellRef = const_cast< SwDocShell* >( GetDocShell() );
- pRet->SetRefForDocShell( boost::addressof(aDocShellRef) );
- SfxObjectShellRef xRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD );
+
+ // we have to use pointer here, since the callee has to decide whether SfxObjectShellLock or SfxObjectShellRef should be used
+ // sometimes the object will be returned with refcount set to 0 ( if no DoInitNew is done )
+ SfxObjectShell* pRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD );
if( bCallInitNew )
- xRetShell->DoInitNew();
+ {
+ // it could happen that DoInitNew creates model, that increases the refcount of the object
+ pRetShell->DoInitNew();
+ }
+
//copy content
pRet->Paste( *this );
- pRet->SetRefForDocShell( 0 );
- return xRetShell;
+
+ // remove the temporary shell if it is there as it was done before
+ pRet->SetTmpDocShell( (SfxObjectShell*)NULL );
+
+ return pRetShell;
}
/*-- 08.05.2009 10:52:40---------------------------------------------------
copy document content - code from SwFEShell::Paste( SwDoc* , BOOL )
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 588ef88f7740..5f21e32df796 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -4376,7 +4376,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
}
SwDoc* pCpyDoc = (SwDoc*)pSrcTblNd->GetDoc();
- SfxObjectShellRef* pRefForDocSh = 0;
BOOL bDelCpyDoc = pCpyDoc == this;
if( bDelCpyDoc )
@@ -4384,13 +4383,10 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
// kopiere die Tabelle erstmal in ein temp. Doc
pCpyDoc = new SwDoc;
pCpyDoc->acquire();
- pRefForDocSh = new SfxObjectShellRef();
- pCpyDoc->SetRefForDocShell( pRefForDocSh );
SwPosition aPos( SwNodeIndex( pCpyDoc->GetNodes().GetEndOfContent() ));
if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, TRUE, TRUE ))
{
- delete pRefForDocSh;
if( pCpyDoc->release() == 0 )
delete pCpyDoc;
@@ -4403,8 +4399,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
}
aPos.nNode -= 1; // auf den EndNode der Tabelle
pSrcTblNd = aPos.nNode.GetNode().FindTableNode();
-
- pCpyDoc->SetRefForDocShell( NULL );
}
const SwStartNode* pSttNd = rInsPos.nNode.GetNode().FindTableBoxStartNode();
@@ -4443,7 +4437,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
if( bDelCpyDoc )
{
- delete pRefForDocSh;
if( pCpyDoc->release() == 0 )
delete pCpyDoc;
}
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 2d54cb88f2e6..a0c16bd9d1e5 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -1319,9 +1319,10 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
// Der Return-Wert gibt an, was mit der Shell zu geschehen hat:
// 0 - Fehler, konnte DocShell nicht finden
// 1 - DocShell ist ein existieren Document
-// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden
+// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden ( will be assigned to xLockRef additionaly )
int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
+ SfxObjectShellLock& xLockRef,
const String& rFileName,
const String& rPasswd,
String& rFilter,
@@ -1407,7 +1408,9 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
// ohne Filter geht gar nichts
pMed->SetFilter( pSfxFlt );
- xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL );
+ // if the new shell is created, SfxObjectShellLock should be used to let it be closed later for sure
+ xLockRef = new SwDocShell( SFX_CREATE_MODE_INTERNAL );
+ xDocSh = (SfxObjectShell*)xLockRef;
if( xDocSh->DoLoad( pMed ) )
return 2;
}
@@ -1504,6 +1507,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
RedlineMode_t eOldRedlineMode = nsRedlineMode_t::REDLINE_NONE;
SfxObjectShellRef xDocSh;
+ SfxObjectShellLock xLockRef;
int nRet;
if( !sFileName.Len() )
{
@@ -1512,7 +1516,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
}
else
{
- nRet = lcl_FindDocShell( xDocSh, sFileName,
+ nRet = lcl_FindDocShell( xDocSh, xLockRef, sFileName,
rSection.GetLinkFilePassword(),
sFilter, 0, pDoc->GetDocShell() );
if( nRet )
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e55c8598cf90..1be00582a586 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -76,10 +76,18 @@ sal_Int16 lcl_SubTypeToAPI(USHORT nSubType)
sal_Int16 nRet = 0;
switch(nSubType)
{
- case nsSwGetSetExpType::GSE_EXPR : nRet = SetVariableType::VAR /*0*/; break;
- case nsSwGetSetExpType::GSE_SEQ : nRet = SetVariableType::SEQUENCE /*1*/; break;
- case nsSwGetSetExpType::GSE_FORMULA : nRet = SetVariableType::FORMULA /*2*/; break;
- case nsSwGetSetExpType::GSE_STRING : nRet = SetVariableType::STRING /*3*/; break;
+ case nsSwGetSetExpType::GSE_EXPR:
+ nRet = SetVariableType::VAR; // 0
+ break;
+ case nsSwGetSetExpType::GSE_SEQ:
+ nRet = SetVariableType::SEQUENCE; // 1
+ break;
+ case nsSwGetSetExpType::GSE_FORMULA:
+ nRet = SetVariableType::FORMULA; // 2
+ break;
+ case nsSwGetSetExpType::GSE_STRING:
+ nRet = SetVariableType::STRING; // 3
+ break;
}
return nRet;
}
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 1cd0fdd02830..db341c9991ba 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -437,16 +437,14 @@ Size SwOLENode::GetTwipSize() const
SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
{
// Falls bereits eine SvPersist-Instanz existiert, nehmen wir diese
- SfxObjectShell* p = pDoc->GetPersist();
- if( !p )
+ SfxObjectShell* pPersistShell = pDoc->GetPersist();
+ if( !pPersistShell )
{
- // TODO/LATER: reicht hier nicht ein EmbeddedObjectContainer? Was passiert mit
- // diesem Dokument?
- ASSERT( pDoc->GetRefForDocShell(),
- "wo ist die Ref-Klasse fuer die DocShell?")
- p = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
- *pDoc->GetRefForDocShell() = p;
- p->DoInitNew( NULL );
+ // TODO/LATER: is EmbeddedObjectContainer not enough?
+ // the created document will be closed by pDoc ( should use SfxObjectShellLock )
+ pPersistShell = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
+ pDoc->SetTmpDocShell( pPersistShell );
+ pPersistShell->DoInitNew( NULL );
}
// Wir hauen das Ding auf SvPersist-Ebene rein
@@ -454,7 +452,7 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
::rtl::OUString aNewName/*( Sw3Io::UniqueName( p->GetStorage(), "Obj" ) )*/;
SfxObjectShell* pSrc = GetDoc()->GetPersist();
- p->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject(
+ pPersistShell->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject(
pSrc->GetEmbeddedObjectContainer(),
pSrc->GetEmbeddedObjectContainer().GetEmbeddedObject( aOLEObj.aName ),
aNewName );
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 92a33da130fe..9b60693c6755 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -935,6 +935,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
if( !pMed )
return;
+ // this sourcecode is not responsible for the lifetime of the shell, SfxObjectShellLock should not be used
SfxObjectShellRef aRef( pDocSh );
pDocSh->RegisterTransfer( *pMed );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 83e0289e6082..df6bcb377fb5 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -443,8 +443,8 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
}
// es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
-// if( aDocShellRef.Is() )
-// SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
+//REMOVE // if( aDocShellRef.Is() )
+//REMOVE // SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
// und fuellen es mit dem selektierten Bereich
pFESh->Copy( pPrtDoc );
@@ -503,10 +503,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
ViewShell *pShell;
SwDoc *pOutDevDoc;
- //!! muss warum auch immer hier in diesem scope existieren !!
- //!! (h?ngt mit OLE Objekten im Dokument zusammen.)
- SfxObjectShellRef aDocShellRef;
-
// Print/PDF export for (multi-)selection has already generated a
// temporary document with the selected text.
// (see XRenderable implementation in unotxdoc.cxx)
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 963c5c847500..b0b69501979e 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -530,7 +530,7 @@ SwDoc* Reader::GetTemplateDoc()
{
SwDocShell *pDocSh =
new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
- SfxObjectShellRef xDocSh = pDocSh;
+ SfxObjectShellLock xDocSh = pDocSh;
if( pDocSh->DoInitNew( 0 ) )
{
pTemplate = pDocSh->GetDoc();
@@ -805,15 +805,12 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
SwPaM * pPam;
SwDoc *pDoc = 0;
- SfxObjectShellRef* pRefForDocSh = 0;
if ( pShell && !bWriteAll && pShell->IsTableMode() )
{
bWriteAll = TRUE;
pDoc = new SwDoc;
pDoc->acquire();
- pRefForDocSh = new SfxObjectShellRef();
- pDoc->SetRefForDocShell( pRefForDocSh );
// kopiere Teile aus einer Tabelle: lege eine Tabelle mit der Breite
// von der Originalen an und kopiere die selectierten Boxen.
@@ -971,7 +968,6 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if ( pDoc )
{
- delete pRefForDocSh;
if ( !pDoc->release() )
delete pDoc;
bWriteAll = FALSE;
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 7d8bc56272b7..9ae2cf4ce442 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -219,7 +219,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
if ( 0 != (nStrings = static_cast< USHORT >(aStrings.size())))
{
- SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
+ SfxObjectShellLock xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
if (xDocSh->DoInitNew(0))
{
SwDoc *pD = ((SwDocShell*)(&xDocSh))->GetDoc();
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index ce06c22cfc88..ee2e686a8400 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -189,7 +189,7 @@ static USHORT nTitleNo = 0;
pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
// Neues Dokument erzeugen (kein Show!)
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
pNewView = (SwView*) pFrame->GetViewShell();
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 653208aaf250..0002928c0eb6 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -968,7 +968,7 @@ void NewXForms( SfxRequest& rReq )
// copied & excerpted from SwModule::InsertLab(..)
// create new document
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) );
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) );
xDocSh->DoInitNew( 0 );
// initialize XForms
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 41f055f86050..1bbdfc71eeb4 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -209,7 +209,7 @@ static sal_uInt16 nBCTitleNo = 0;
aLabCfg.Commit();
// Neues Dokument erzeugen.
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD));
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
// Drucker
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c839b5c03f52..7f48cdf40230 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -468,7 +468,9 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
// will set the wrong class id.
SvGlobalName aClassName;
String aAppName, aLongUserName, aUserName;
- SfxObjectShellRef xDocSh =
+
+ // The document is closed explicitly, but using SfxObjectShellLock is still more correct here
+ SfxObjectShellLock xDocSh =
new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL );
// the global document can not be a template
xDocSh->SetupStorage( xStor, SotStorage::GetVersion( xStor ), sal_False );
@@ -701,25 +703,6 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bIsGlblDocSaveLinksSave);
}
- if( bRet && nMyType != nSaveType )
- {
- SvGlobalName aClassName;
- String aAppName, aLongUserName, aUserName;
- SfxObjectShellRef xDocSh;
- switch( nSaveType )
- {
- case 0:
- xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL );
- break;
- case 1:
- xDocSh = new SwWebDocShell( SFX_CREATE_MODE_INTERNAL );
- break;
- case 2:
- xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL );
- break;
- }
- }
-
return bRet;
}
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 5bbc29aab2ee..df49dc4b1e68 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1013,7 +1013,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
BYTE nLevel = pDlg->GetLevel();
BYTE nPara = pDlg->GetPara();
SwDoc* pSmryDoc = new SwDoc();
- SfxObjectShellRef xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD));
+ SfxObjectShellLock xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
BOOL bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 90eeb6ee1982..94d7c8c2f057 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -938,7 +938,11 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
// in case of creating a single resulting file this has to be created here
SwWrtShell* pTargetShell = 0;
- SfxObjectShellRef xTargetDocShell;
+
+ // the shell will be explicitly closed at the end of the method, but it is
+ // still more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xTargetDocShell;
+
SwView* pTargetView = 0;
std::auto_ptr< utl::TempFile > aTempFile;
String sModifiedStartingPageDesc;
@@ -1062,8 +1066,9 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
for (USHORT i = 0; i < 10; i++)
Application::Reschedule();
- // Neues Dokument erzeugen und speichern
- SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ // Create and save new document
+ // The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE );
pWorkMed->SetFilter( pSfxFlt );
@@ -1503,7 +1508,8 @@ ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
if(!xSource.is())
{
uno::Reference<XChild> xChild(xConnection, UNO_QUERY);
- xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY);
+ if ( xChild.is() )
+ xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY);
}
if(xSource.is() && xConnection.is() && xColumn.is() && pNFmtr)
{
@@ -2543,6 +2549,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if(xResSet.is())
aDescriptor[daCursor] <<= xResSet;
+ // SfxObjectShellRef is ok, since there should be no control over the document lifetime here
SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame()->GetObjectShell();
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xDocShell));
{
@@ -2573,7 +2580,9 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
}
else
{
- SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ // the shell will be explicitly closed, but it is more safe to use SfxObjectShellLock here
+ // especially for the case that the loading has failed
+ SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, TRUE );
pWorkMed->SetFilter( pSfxFlt );
if( xWorkDocSh->DoLoad(pWorkMed) )
@@ -2916,7 +2925,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
// copy the source document
- SfxObjectShellRef xWorkDocSh;
+ // the copy will be closed later, but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xWorkDocSh;
if(nDocNo == 1 )
{
uno::Reference< util::XCloneable > xClone( rSourceView.GetDocShell()->GetModel(), uno::UNO_QUERY);
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index ee2803e73aad..943e21adee34 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -853,7 +853,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
aSaveMonitor.aPrintInfo.SetText(sStat);
//now extract a document from the target document
- SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
// pTempFrame->GetFrame().Appear();
@@ -1271,7 +1272,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
SwDocMergeInfo& rInfo = rConfigItem.GetDocumentMergeInfo(nDoc);
//now extract a document from the target document
- SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
// pTempFrame->GetFrame().Appear();
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 8220c7ee2c8d..2efe65c50079 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -454,14 +454,14 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
pClpDocFac = new SwDocFac;
SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
- pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
pWrtShell->Copy( pTmpDoc );
// es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+ aDocShellRef = pTmpDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
- pTmpDoc->SetRefForDocShell( 0 );
+ pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
if( nSelectionType & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() )
{
@@ -869,7 +869,6 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
- pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
pWrtShell->Copy( pTmpDoc );
@@ -892,9 +891,10 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
}
// es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+ aDocShellRef = pTmpDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
- pTmpDoc->SetRefForDocShell( 0 );
+ pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
if( pWrtShell->IsObjSelected() )
eBufferType = TRNSFR_DRAWING;
@@ -1052,15 +1052,15 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
SwPaM aPam( *pCNd );
- pCDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pCDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 );
// es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+ aDocShellRef = pCDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pCDoc );
- pCDoc->SetRefForDocShell( 0 );
+ pCDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
eBufferType = TRNSFR_DOCUMENT;
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index 041b55d9c6db..452637a3e7f8 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -65,7 +65,7 @@ namespace nsTransferBufferType
class SwTransferable : public TransferableHelper
{
friend class SwView_Impl;
- SfxObjectShellRef aDocShellRef;
+ SfxObjectShellLock aDocShellRef;
TransferableDataHelper aOleData;
TransferableObjectDescriptor aObjDesc;
::sfx2::SvBaseLinkRef refDdeLink;
diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx
index 9c22b44ad868..509610500a3f 100644
--- a/sw/source/ui/inc/uivwimp.hxx
+++ b/sw/source/ui/inc/uivwimp.hxx
@@ -111,8 +111,7 @@ class SwView_Impl
// temporary document for printing text of selection / multi selection
// in PDF export.
- SfxObjectShellRef xTmpSelDocSh;
- SfxObjectShellRef aEmbeddedObjRef;
+ SfxObjectShellLock xTmpSelDocSh;
SwView* pView;
SwScannerEventListener* pScanEvtLstnr;
@@ -148,9 +147,7 @@ public:
void AddClipboardListener();
- SfxObjectShellRef & GetTmpSelectionDoc() { return xTmpSelDocSh; }
-
- SfxObjectShellRef& GetEmbeddedObjRef() { return *boost::addressof(aEmbeddedObjRef); }
+ SfxObjectShellLock& GetTmpSelectionDoc() { return xTmpSelDocSh; }
void AddTransferable(SwTransferable& rTransferable);
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 4990df84f43b..1c8ad77e2054 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -156,7 +156,7 @@ public:
void Invalidate();
// temporary document used for PDF export of selections/multi-selections
- SfxObjectShellRef BuildTmpSelectionDoc();
+ SfxObjectShellLock BuildTmpSelectionDoc();
};
/* -----------------17.09.98 12:52-------------------
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 0c92d7fdeb65..a462cd1deb6d 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -32,7 +32,7 @@
#include <svtools/htmlcfg.hxx>
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
-#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell)
+#include <sfx2/objsh.hxx>
#include <editeng/svxenum.hxx>
#include <svx/zoomitem.hxx>
#include <editeng/editstat.hxx>
@@ -641,8 +641,8 @@ public:
void NotifyDBChanged();
- SfxObjectShellRef & GetTmpSelectionDoc();
- SfxObjectShellRef & GetOrCreateTmpSelectionDoc();
+ SfxObjectShellLock & GetTmpSelectionDoc();
+ SfxObjectShellLock & GetOrCreateTmpSelectionDoc();
void AddTransferable(SwTransferable& rTransferable);
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 5c440d55883e..c1b93b56b96d 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1897,16 +1897,16 @@ void SwView::NotifyDBChanged()
/* -----------------------------28.10.02 13:25--------------------------------
---------------------------------------------------------------------------*/
-SfxObjectShellRef & SwView::GetTmpSelectionDoc()
+SfxObjectShellLock & SwView::GetTmpSelectionDoc()
{
return GetViewImpl()->GetTmpSelectionDoc();
}
/* -----------------------------31.10.02 13:25--------------------------------
---------------------------------------------------------------------------*/
-SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc()
+SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc()
{
- SfxObjectShellRef &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc();
+ SfxObjectShellLock &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc();
if (!rxTmpDoc.Is())
{
SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl();
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index eeab95b5bccd..7c4ee3924a4b 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -2142,14 +2142,15 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
else
{
SfxObjectShellRef xDocSh;
+ SfxObjectShellLock xLockRef;
-extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
+extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLockRef,
const String& rFileName, const String& rPasswd,
String& rFilter, INT16 nVersion,
SwDocShell* pDestSh );
String sFltNm;
- int nRet = lcl_FindDocShell( xDocSh, pMedium->GetName(), aEmptyStr,
+ int nRet = lcl_FindDocShell( xDocSh, xLockRef, pMedium->GetName(), aEmptyStr,
sFltNm, nVersion, pDocSh );
if( nRet )
{
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 06b9e62b4a94..256d5737f7f5 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -201,6 +201,7 @@ static BOOL LoadFromURL_impl(
}
else
{
+ // SfxObjectShellRef is ok here, since the document will be explicitly closed
SfxObjectShellRef xTmpDocSh = pTmpDocShell;
CloseModelAndDocSh( xTmpModel, xTmpDocSh );
}
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index b0b95657600c..2dea6feb88c9 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2591,7 +2591,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
const TypeId aSwViewTypeId = TYPE(SwView);
if (rpView && rpView->IsA(aSwViewTypeId))
{
- SfxObjectShellRef xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc());
+ SfxObjectShellLock xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc());
if (xDocSh.Is())
{
pDoc = ((SwDocShell*)&xDocSh)->GetDoc();
@@ -3170,8 +3170,12 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- //create a new document - hidden - copy the storage and return it
- SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false);
+
+ // create a new document - hidden - copy the storage and return it
+ // SfxObjectShellRef is used here, since the model should control object lifetime after creation
+ // and thus SfxObjectShellLock is not allowed here
+ // the model holds reference to the shell, so the shell will not destructed at the end of method
+ SfxObjectShellRef pShell = pDocShell->GetDoc()->CreateCopy(false);
uno::Reference< frame::XModel > xNewModel = pShell->GetModel();
uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( );
uno::Sequence< beans::PropertyValue > aTempMediaDescriptor;
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index c03935464abf..5f533bde3f22 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -903,12 +903,12 @@ void SAL_CALL SwXTextView::setRubyList(
/*-- 29.12.02 15:45:29---------------------------------------------------
-----------------------------------------------------------------------*/
-SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc()
+SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
{
SwWrtShell& rOldSh = m_pView->GetWrtShell();
SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
SwDocShell* pDocSh;
- SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
SwDoc *const pTempDoc( pDocSh->GetDoc() );
// #i103634#, #i112425#: do not expand numbering and fields on PDF export
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 919ebbe079ba..50da84bbcdab 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
#if STLPORT_VERSION>=321
#include <math.h> // prevent conflict between exception and std::exception
@@ -604,6 +605,31 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
if (pFlyFrmFmt)
*pFlyFrmFmt = pFmt;
+ if ( SotExchange::IsChart( aCLSID ) )
+ {
+ uno::Reference< embed::XEmbeddedObject > xEmbeddedObj( xRef.GetObject(), uno::UNO_QUERY );
+ if ( xEmbeddedObj.is() )
+ {
+ bool bDisableDataTableDialog = false;
+ svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj );
+ uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
+ if ( xProps.is() &&
+ ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) &&
+ bDisableDataTableDialog )
+ {
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ),
+ uno::makeAny( sal_False ) );
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ),
+ uno::makeAny( sal_False ) );
+ uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
+ if ( xModifiable.is() )
+ {
+ xModifiable->setModified( sal_True );
+ }
+ }
+ }
+ }
+
EndAllAction();
GetView().AutoCaption(OLE_CAP, &aCLSID);
diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc
index 20b468c9605c..466328026d9b 100644
--- a/testautomation/writer/required/includes/w_007_.inc
+++ b/testautomation/writer/required/includes/w_007_.inc
@@ -910,6 +910,7 @@ testcase tToolsUpdate
Call wTypeKeys ("Dieser Text ist zur Aktualisierung")
printlog " Insert / Indexes"
InsertIndexes
+ sleep 1
Kontext "Active"
if ( Active.Exists( 2 ) ) then
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 70cec6b74abf..8b25bc3b4e9a 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -346,37 +346,6 @@ static sal_Bool performRecursiveCallTest( const Reference < XBridgeTest > & xLBT
return sal_True;
}
-static sal_Bool performQueryForUnknownType( const Reference< XBridgeTest > & xLBT )
-{
- sal_Bool bRet = sal_True;
- // use this when you want to test querying for unknown types
- // currently (not supported by the java remote bridge )
- {
- // test queryInterface for an unknown type
- typelib_TypeDescriptionReference *pTypeRef = 0;
- OUString aName( RTL_CONSTASCII_USTRINGPARAM( "foo.MyInterface" ) );
- typelib_typedescriptionreference_new(
- &pTypeRef, typelib_TypeClass_INTERFACE, aName.pData);
- try
- {
- Any a = xLBT->queryInterface( Type( pTypeRef ) );
- bRet = check( a == Any( ), "got an foo.MyInterface, but didn't expect to get one" );
- }
- catch( com::sun::star::uno::RuntimeException & )
- {
- fprintf(
- stderr,
- "tried to query for an interface reference of an unknown type "
- "but got a runtime exception. This should work for native bridges "
- "but isn't implemented for Java remote bridge\n"
- "Note: All subsequent tests may fail now as the remote bridge is broken\n"
- "QueryForUnknownType" );
- }
- typelib_typedescriptionreference_release( pTypeRef );
- }
- return bRet;
-}
-
class MyClass : public osl::DebugBase<MyClass>, public OWeakObject
{
public:
@@ -411,549 +380,545 @@ static sal_Bool performTest(
const Reference<XBridgeTest > & xLBT,
bool noCurrentContext )
{
- check( xLBT.is(), "### no test interface!" );
+ check(xLBT.is(), "### no test interface!");
bool bRet = true;
- if (xLBT.is())
- {
- // this data is never ever granted access to by calls other than equals(), assign()!
+ if (xLBT.is()) {
+ // this data is never ever granted access to by calls other than
+ // equals(), assign()!
TestData aData; // test against this data
-
- Reference<XInterface > xI( new MyClass );
-
- assign( (TestElement &)aData,
- sal_True, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
- SAL_CONST_INT64(0x123456789abcdef0),
- SAL_CONST_UINT64(0xfedcba9876543210),
- (float)17.0815, 3.1415926359, TestEnum_LOLA,
- OUSTR(STRING_TEST_CONSTANT), xI,
- Any( &xI, ::getCppuType( (const Reference<XInterface > *)0 ) ) );
-
- bRet = check( aData.Any == xI, "### unexpected any!" ) && bRet;
- bRet = check( !(aData.Any != xI), "### unexpected any!" ) && bRet;
-
- aData.Sequence.realloc( 2 );
- aData.Sequence[ 0 ] = *(const TestElement *)&aData;
- // aData.Sequence[ 1 ] is empty
-
- // aData complete
- //================================================================================
-
- // this is a manually copy of aData for first setting...
+ Reference< XInterface > xI(new MyClass);
+ assign(
+ (TestElement &) aData, true, '@', 17, 0x1234, 0xFEDC, 0x12345678,
+ 0xFEDCBA98, SAL_CONST_INT64(0x123456789ABCDEF0),
+ SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
+ TestEnum_LOLA, OUSTR(STRING_TEST_CONSTANT), xI,
+ Any(&xI, getCppuType((Reference< XInterface > const *) 0)));
+ bRet &= check(aData.Any == xI, "### unexpected any!");
+ bRet &= check(!(aData.Any != xI), "### unexpected any!");
+ aData.Sequence.realloc(2);
+ aData.Sequence[0] = *(TestElement const *) &aData;
+ // aData.Sequence[1] is empty
+ // aSetData is a manually copy of aData for first setting:
TestData aSetData;
-
- assign( (TestElement &)aSetData,
- aData.Bool, aData.Char, aData.Byte, aData.Short, aData.UShort,
- aData.Long, aData.ULong, aData.Hyper, aData.UHyper, aData.Float, aData.Double,
- aData.Enum, aData.String, xI,
- Any( &xI, ::getCppuType( (const Reference<XInterface > *)0 ) ) );
-
- aSetData.Sequence.realloc( 2 );
- aSetData.Sequence[ 0 ] = *(const TestElement *)&aSetData;
- // aSetData.Sequence[ 1 ] is empty
-
+ assign(
+ (TestElement &) aSetData, aData.Bool, aData.Char, aData.Byte,
+ aData.Short, aData.UShort, aData.Long, aData.ULong, aData.Hyper,
+ aData.UHyper, aData.Float, aData.Double, aData.Enum, aData.String,
+ xI, Any(&xI, getCppuType((Reference< XInterface > const *) 0)));
+ aSetData.Sequence.realloc(2);
+ aSetData.Sequence[0] = *(TestElement const *) &aSetData;
+ // aSetData.Sequence[1] is empty
xLBT->setValues(
- aSetData.Bool, aSetData.Char, aSetData.Byte, aSetData.Short, aSetData.UShort,
- aSetData.Long, aSetData.ULong, aSetData.Hyper, aSetData.UHyper, aSetData.Float, aSetData.Double,
- aSetData.Enum, aSetData.String, aSetData.Interface, aSetData.Any, aSetData.Sequence, aSetData );
-
+ aSetData.Bool, aSetData.Char, aSetData.Byte, aSetData.Short,
+ aSetData.UShort, aSetData.Long, aSetData.ULong, aSetData.Hyper,
+ aSetData.UHyper, aSetData.Float, aSetData.Double, aSetData.Enum,
+ aSetData.String, aSetData.Interface, aSetData.Any,
+ aSetData.Sequence, aSetData);
{
- TestData aRet, aRet2;
- xLBT->getValues(
- aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
- aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, aRet.Double,
- aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
-
- bRet = check( equals( aData, aRet ) && equals( aData, aRet2 ) , "getValues test") && bRet;
-
- // set last retrieved values
- TestData aSV2ret = xLBT->setValues2(
- aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
- aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, aRet.Double,
- aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
- // check inout sequence order
- // => inout sequence parameter was switched by test objects
- TestElement temp = aRet.Sequence[ 0 ];
- aRet.Sequence[ 0 ] = aRet.Sequence[ 1 ];
- aRet.Sequence[ 1 ] = temp;
-
- bRet = check(
- equals( aData, aSV2ret ) && equals( aData, aRet2 ),
- "getValues2 test") && bRet;
+ TestData aRet;
+ TestData aRet2;
+ xLBT->getValues(
+ aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
+ aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float,
+ aRet.Double, aRet.Enum, aRet.String, aRet.Interface, aRet.Any,
+ aRet.Sequence, aRet2);
+ bRet &= check(
+ equals(aData, aRet) && equals(aData, aRet2), "getValues test");
+ // Set last retrieved values:
+ TestData aSV2ret(
+ xLBT->setValues2(
+ aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
+ aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float,
+ aRet.Double, aRet.Enum, aRet.String, aRet.Interface,
+ aRet.Any, aRet.Sequence, aRet2));
+ // Check inout sequence order (=> inout sequence parameter was
+ // switched by test objects):
+ TestElement temp(aRet.Sequence[0]);
+ aRet.Sequence[0] = aRet.Sequence[1];
+ aRet.Sequence[1] = temp;
+ bRet &= check(
+ equals(aData, aSV2ret) && equals(aData, aRet2),
+ "getValues2 test");
}
{
- TestData aRet, aRet2;
- TestData aGVret = xLBT->getValues(
- aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
- aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, aRet.Double,
- aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
-
- bRet = check( equals( aData, aRet ) && equals( aData, aRet2 ) && equals( aData, aGVret ), "getValues test" ) && bRet;
-
- // set last retrieved values
- xLBT->setBool( aRet.Bool );
- xLBT->setChar( aRet.Char );
- xLBT->setByte( aRet.Byte );
- xLBT->setShort( aRet.Short );
- xLBT->setUShort( aRet.UShort );
- xLBT->setLong( aRet.Long );
- xLBT->setULong( aRet.ULong );
- xLBT->setHyper( aRet.Hyper );
- xLBT->setUHyper( aRet.UHyper );
- xLBT->setFloat( aRet.Float );
- xLBT->setDouble( aRet.Double );
- xLBT->setEnum( aRet.Enum );
- xLBT->setString( aRet.String );
- xLBT->setInterface( aRet.Interface );
- xLBT->setAny( aRet.Any );
- xLBT->setSequence( aRet.Sequence );
- xLBT->setStruct( aRet2 );
+ TestData aRet;
+ TestData aRet2;
+ TestData aGVret(
+ xLBT->getValues(
+ aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
+ aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float,
+ aRet.Double, aRet.Enum, aRet.String, aRet.Interface,
+ aRet.Any, aRet.Sequence, aRet2));
+ bRet &= check(
+ (equals(aData, aRet) && equals(aData, aRet2) &&
+ equals(aData, aGVret)),
+ "getValues test");
+ // Set last retrieved values:
+ xLBT->setBool(aRet.Bool);
+ xLBT->setChar(aRet.Char);
+ xLBT->setByte(aRet.Byte);
+ xLBT->setShort(aRet.Short);
+ xLBT->setUShort(aRet.UShort);
+ xLBT->setLong(aRet.Long);
+ xLBT->setULong(aRet.ULong);
+ xLBT->setHyper(aRet.Hyper);
+ xLBT->setUHyper(aRet.UHyper);
+ xLBT->setFloat(aRet.Float);
+ xLBT->setDouble(aRet.Double);
+ xLBT->setEnum(aRet.Enum);
+ xLBT->setString(aRet.String);
+ xLBT->setInterface(aRet.Interface);
+ xLBT->setAny(aRet.Any);
+ xLBT->setSequence(aRet.Sequence);
+ xLBT->setStruct(aRet2);
}
{
- TestData aRet, aRet2;
- aRet.Hyper = xLBT->getHyper();
- aRet.UHyper = xLBT->getUHyper();
- aRet.Float = xLBT->getFloat();
- aRet.Double = xLBT->getDouble();
- aRet.Byte = xLBT->getByte();
- aRet.Char = xLBT->getChar();
- aRet.Bool = xLBT->getBool();
- aRet.Short = xLBT->getShort();
- aRet.UShort = xLBT->getUShort();
- aRet.Long = xLBT->getLong();
- aRet.ULong = xLBT->getULong();
- aRet.Enum = xLBT->getEnum();
- aRet.String = xLBT->getString();
- aRet.Interface = xLBT->getInterface();
- aRet.Any = xLBT->getAny();
- aRet.Sequence = xLBT->getSequence();
- aRet2 = xLBT->getStruct();
-
- bRet = check( equals( aData, aRet ) && equals( aData, aRet2 ) , "struct comparison test") && bRet;
-
- {
- SmallStruct aIn(1, 2);
- SmallStruct aOut = xLBT->echoSmallStruct(aIn);
- bRet = check( memcmp(&aIn, &aOut, sizeof(SmallStruct)) == 0, "small struct test" ) && bRet;
- }
- {
- MediumStruct aIn(1, 2, 3, 4);
- MediumStruct aOut = xLBT->echoMediumStruct(aIn);
- bRet = check( memcmp(&aIn, &aOut, sizeof(MediumStruct)) == 0, "medium struct test" ) && bRet;
- }
- {
- BigStruct aIn(1, 2, 3, 4, 5, 6, 7, 8);
- BigStruct aOut = xLBT->echoBigStruct(aIn);
- bRet = check( memcmp(&aIn, &aOut, sizeof(BigStruct)) == 0, "big struct test" ) && bRet;
- }
- {
- AllFloats aIn(1.1f, 2.2f, 3.3f, 4.4f);
- AllFloats aOut = xLBT->echoAllFloats(aIn);
- bRet = check( memcmp(&aIn, &aOut, sizeof(AllFloats)) == 0, "all floats struct test" ) && bRet;
- }
- {
- sal_Int32 i2 = xLBT->testPPCAlignment( 0, 0, 0, 0, 0xbeaf );
- bRet = check( i2 == 0xbeaf, "ppc-style alignment test" ) && bRet;
- }
-
- // Test extended attributes that raise exceptions:
- try {
- xLBT->getRaiseAttr1();
- bRet &= check(false, "getRaiseAttr1 did not throw");
- } catch (RuntimeException &) {
- } catch (...) {
- bRet &= check(false, "getRaiseAttr1 threw wrong type");
- }
- try {
- xLBT->setRaiseAttr1(0);
- bRet &= check(false, "setRaiseAttr1 did not throw");
- } catch (IllegalArgumentException &) {
- } catch (...) {
- bRet &= check(false, "setRaiseAttr1 threw wrong type");
- }
- try {
- xLBT->getRaiseAttr2();
- bRet &= check(false, "getRaiseAttr2 did not throw");
- } catch (IllegalArgumentException &) {
- } catch (...) {
- bRet &= check(false, "getRaiseAttr2 threw wrong type");
- }
-
- // Test instantiated polymorphic struct types:
- {
- bRet &= check(
- xLBT->transportPolyBoolean(TestPolyStruct< sal_Bool >(true)).member,
- "transportPolyBoolean");
- TestPolyStruct< sal_Int64 > tps1(12345);
- xLBT->transportPolyHyper(tps1);
- bRet &= check(tps1.member == 12345, "transportPolyHyper");
- Sequence< Any > seq(2);
- seq[0] <<= static_cast< sal_uInt32 >(33);
- seq[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ABC"));
- TestPolyStruct< Sequence< Any > > tps2(seq);
- TestPolyStruct< Sequence< Any > > tps3;
- xLBT->transportPolySequence(tps2, tps3);
- bRet &= check(
- tps3.member.getLength() == 2, "transportPolySequence, length");
- sal_uInt32 v0 = sal_uInt32();
- tps3.member[0] >>= v0;
- bRet &= check(v0 == 33, "transportPolySequence, element 0");
- rtl::OUString v1;
- tps3.member[1] >>= v1;
- bRet &= check(
- v1.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ABC")),
- "transportPolySequence, element 1");
- bRet &= check(xLBT->getNullPolyLong().member == 0, "getNullPolyLong");
- bRet &= check(
- xLBT->getNullPolyString().member.getLength() == 0,
- "getNullPolyString");
- bRet &= check(
- xLBT->getNullPolyType().member == Type(), "getNullPolyType");
- Any nullAny(xLBT->getNullPolyAny().member);
- bRet &= check(
- (((nullAny.getValueTypeName()
- == rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface")))
- && !static_cast< Reference< XInterface > const * >(
- nullAny.getValue())->is())
- || nullAny == Any()),
- "getNullPolyAny");
- bRet &= check(
- xLBT->getNullPolySequence().member.getLength() == 0,
- "getNullPolySequence");
- bRet &= check(
- xLBT->getNullPolyEnum().member == TestEnum_TEST, "getNullPolyEnum");
- bRet &= check(
- xLBT->getNullPolyBadEnum().member == TestBadEnum_M,
- "getNullPolyBadEnum");
- bRet &= check(
- xLBT->getNullPolyStruct().member.member == 0, "getNullPolyStruct");
- bRet &= check(
- !xLBT->getNullPolyInterface().member.is(), "getNullPolyInterface");
- }
-
- // any test
- bRet = check( performAnyTest( xLBT , aData ) , "any test" ) && bRet;
-
- // sequence of call test
- bRet = check( performSequenceOfCallTest( xLBT ) , "sequence of call test" ) && bRet;
-
- // recursive call test
- bRet = check( performRecursiveCallTest( xLBT ) , "recursive test" ) && bRet;
-
- bRet = (equals( aData, aRet ) && equals( aData, aRet2 )) && bRet ;
-
- // multiple inheritance test
- bRet &= checkEmpty(
- testtools::bridgetest::testMulti(xLBT->getMulti()), "remote multi");
- bRet &= checkEmpty(
- xLBT->testMulti(new testtools::bridgetest::Multi), "local multi");
+ TestData aRet;
+ aRet.Hyper = xLBT->getHyper();
+ aRet.UHyper = xLBT->getUHyper();
+ aRet.Float = xLBT->getFloat();
+ aRet.Double = xLBT->getDouble();
+ aRet.Byte = xLBT->getByte();
+ aRet.Char = xLBT->getChar();
+ aRet.Bool = xLBT->getBool();
+ aRet.Short = xLBT->getShort();
+ aRet.UShort = xLBT->getUShort();
+ aRet.Long = xLBT->getLong();
+ aRet.ULong = xLBT->getULong();
+ aRet.Enum = xLBT->getEnum();
+ aRet.String = xLBT->getString();
+ aRet.Interface = xLBT->getInterface();
+ aRet.Any = xLBT->getAny();
+ aRet.Sequence = xLBT->getSequence();
+ TestData aRet2(xLBT->getStruct());
+ bRet &= check(
+ equals(aData, aRet) && equals(aData, aRet2),
+ "struct comparison test");
+ {
+ SmallStruct aIn(1, 2);
+ SmallStruct aOut(xLBT->echoSmallStruct(aIn));
+ bRet &= check(
+ memcmp(&aIn, &aOut, sizeof(SmallStruct)) == 0,
+ "small struct test");
+ }
+ {
+ MediumStruct aIn(1, 2, 3, 4);
+ MediumStruct aOut(xLBT->echoMediumStruct(aIn));
+ bRet &= check(
+ memcmp(&aIn, &aOut, sizeof(MediumStruct)) == 0,
+ "medium struct test");
+ }
+ {
+ BigStruct aIn(1, 2, 3, 4, 5, 6, 7, 8);
+ BigStruct aOut(xLBT->echoBigStruct(aIn));
+ bRet &= check(
+ memcmp(&aIn, &aOut, sizeof(BigStruct)) == 0,
+ "big struct test");
+ }
+ {
+ AllFloats aIn(1.1f, 2.2f, 3.3f, 4.4f);
+ AllFloats aOut(xLBT->echoAllFloats(aIn));
+ bRet &= check(
+ memcmp(&aIn, &aOut, sizeof(AllFloats)) == 0,
+ "all floats struct test");
+ }
+ {
+ sal_Int32 i2 = xLBT->testPPCAlignment(0, 0, 0, 0, 0xBEAF);
+ bRet &= check(i2 == 0xBEAF, "ppc-style alignment test");
+ }
+ // Test extended attributes that raise exceptions:
+ try {
+ xLBT->getRaiseAttr1();
+ bRet &= check(false, "getRaiseAttr1 did not throw");
+ } catch (RuntimeException &) {
+ } catch (...) {
+ bRet &= check(false, "getRaiseAttr1 threw wrong type");
+ }
+ try {
+ xLBT->setRaiseAttr1(0);
+ bRet &= check(false, "setRaiseAttr1 did not throw");
+ } catch (IllegalArgumentException &) {
+ } catch (...) {
+ bRet &= check(false, "setRaiseAttr1 threw wrong type");
+ }
+ try {
+ xLBT->getRaiseAttr2();
+ bRet &= check(false, "getRaiseAttr2 did not throw");
+ } catch (IllegalArgumentException &) {
+ } catch (...) {
+ bRet &= check(false, "getRaiseAttr2 threw wrong type");
+ }
+ // Test instantiated polymorphic struct types:
+ {
+ bRet &= check(
+ (xLBT->transportPolyBoolean(
+ TestPolyStruct< sal_Bool >(true)).
+ member),
+ "transportPolyBoolean");
+ TestPolyStruct< sal_Int64 > tps1(12345);
+ xLBT->transportPolyHyper(tps1);
+ bRet &= check(tps1.member == 12345, "transportPolyHyper");
+ Sequence< Any > seq(2);
+ seq[0] <<= static_cast< sal_uInt32 >(33);
+ seq[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ABC"));
+ TestPolyStruct< Sequence< Any > > tps2(seq);
+ TestPolyStruct< Sequence< Any > > tps3;
+ xLBT->transportPolySequence(tps2, tps3);
+ bRet &= check(
+ tps3.member.getLength() == 2,
+ "transportPolySequence, length");
+ sal_uInt32 v0 = sal_uInt32();
+ tps3.member[0] >>= v0;
+ bRet &= check(v0 == 33, "transportPolySequence, element 0");
+ rtl::OUString v1;
+ tps3.member[1] >>= v1;
+ bRet &= check(
+ v1.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ABC")),
+ "transportPolySequence, element 1");
+ bRet &= check(
+ xLBT->getNullPolyLong().member == 0, "getNullPolyLong");
+ bRet &= check(
+ xLBT->getNullPolyString().member.getLength() == 0,
+ "getNullPolyString");
+ bRet &= check(
+ xLBT->getNullPolyType().member == Type(),
+ "getNullPolyType");
+ Any nullAny(xLBT->getNullPolyAny().member);
+ bRet &= check(
+ (((nullAny.getValueTypeName() ==
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uno.XInterface"))) &&
+ !static_cast< Reference< XInterface > const * >(
+ nullAny.getValue())->is())
+ || nullAny == Any()),
+ "getNullPolyAny");
+ bRet &= check(
+ xLBT->getNullPolySequence().member.getLength() == 0,
+ "getNullPolySequence");
+ bRet &= check(
+ xLBT->getNullPolyEnum().member == TestEnum_TEST,
+ "getNullPolyEnum");
+ bRet &= check(
+ xLBT->getNullPolyBadEnum().member == TestBadEnum_M,
+ "getNullPolyBadEnum");
+ bRet &= check(
+ xLBT->getNullPolyStruct().member.member == 0,
+ "getNullPolyStruct");
+ bRet &= check(
+ !xLBT->getNullPolyInterface().member.is(),
+ "getNullPolyInterface");
+ }
+ // Any test:
+ bRet &= check(performAnyTest(xLBT , aData), "any test");
+ // Sequence of call test:
+ bRet &= check(
+ performSequenceOfCallTest(xLBT), "sequence of call test");
+ // Recursive call test:
+ bRet &= check(performRecursiveCallTest(xLBT), "recursive test");
+ bRet &= check(
+ equals(aData, aRet) && equals(aData, aRet2),
+ "recursive test results");
+ // Multiple inheritance test:
+ bRet &= checkEmpty(
+ testtools::bridgetest::testMulti(xLBT->getMulti()),
+ "remote multi");
+ bRet &= checkEmpty(
+ xLBT->testMulti(new testtools::bridgetest::Multi),
+ "local multi");
}
-
}
{
- Reference<XBridgeTest2> xBT2(xLBT, UNO_QUERY);
- if ( ! xBT2.is())
- return bRet;
-
- // perform sequence tests (XBridgeTest2)
- // create the sequence which are compared with the results
- sal_Bool _arBool[] = {sal_True, sal_False, sal_True};
- sal_Unicode _arChar[] = {0x0065, 0x0066, 0x0067};
- sal_Int8 _arByte[] = { 1, 2, -1 };
- sal_Int16 _arShort[] = { -0x8000, 1, 0x7fff };
- sal_uInt16 _arUShort[] = {0 , 1, 0xffff};
- sal_Int32 _arLong[] = {0x80000000, 1, 0x7fffffff};
- sal_uInt32 _arULong[] = {0, 1, 0xffffffff};
- sal_Int64 _arHyper[] = {
- SAL_CONST_INT64(0x8000000000000000), 1,
- SAL_CONST_INT64(0x7fffffffffffffff)};
- sal_uInt64 _arUHyper[] = {0, 1, SAL_CONST_UINT64(0xffffffffffffffff)};
- float _arFloat[] = {1.1f, 2.2f, 3.3f};
- double _arDouble[] = {1.11, 2.22, 3.33};
- OUString _arString[] = {
- OUString(RTL_CONSTASCII_USTRINGPARAM("String 1")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("String 2")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("String 3"))
- };
-
- sal_Bool _aBool = sal_True;
- sal_Int32 _aInt = 0xbabebabe;
- float _aFloat = 3.14f;
- Any _any1(&_aBool, getCppuBooleanType());
- Any _any2(&_aInt, getCppuType((sal_Int32*) 0));
- Any _any3(&_aFloat, getCppuType((float*) 0));
- Any _arAny[] = { _any1, _any2, _any3};
-
- Reference<XInterface> _arObj[3];
- _arObj[0] = new OWeakObject();
- _arObj[1] = new OWeakObject();
- _arObj[2] = new OWeakObject();
-
- TestEnum _arEnum[] = {TestEnum_ONE, TestEnum_TWO, TestEnum_CHECK};
-
- TestElement _arStruct[3];
- assign( _arStruct[0], sal_True, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
- SAL_CONST_INT64(0x123456789abcdef0),
- SAL_CONST_UINT64(0xfedcba9876543210),
- 17.0815f, 3.1415926359,
+ Reference< XBridgeTest2 > xBT2(xLBT, UNO_QUERY);
+ if (!xBT2.is()) {
+ return bRet;
+ }
+ // Perform sequence tests (XBridgeTest2); create the sequence which is
+ // compared with the results:
+ sal_Bool _arBool[] = { true, false, true };
+ sal_Unicode _arChar[] = { 0x0065, 0x0066, 0x0067 };
+ sal_Int8 _arByte[] = { 1, 2, -1 };
+ sal_Int16 _arShort[] = { -0x8000, 1, 0x7FFF };
+ sal_uInt16 _arUShort[] = { 0 , 1, 0xFFFF };
+ sal_Int32 _arLong[] = { 0x80000000, 1, 0x7FFFFFFF };
+ sal_uInt32 _arULong[] = { 0, 1, 0xFFFFFFFF };
+ sal_Int64 _arHyper[] = {
+ SAL_CONST_INT64(0x8000000000000000), 1,
+ SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF) };
+ sal_uInt64 _arUHyper[] = { 0, 1, SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF) };
+ float _arFloat[] = { 1.1f, 2.2f, 3.3f };
+ double _arDouble[] = { 1.11, 2.22, 3.33 };
+ OUString _arString[] = {
+ OUString(RTL_CONSTASCII_USTRINGPARAM("String 1")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("String 2")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("String 3")) };
+ sal_Bool _aBool = true;
+ sal_Int32 _aInt = 0xBABEBABE;
+ float _aFloat = 3.14f;
+ Any _any1(&_aBool, getCppuBooleanType());
+ Any _any2(&_aInt, getCppuType((sal_Int32 *) 0));
+ Any _any3(&_aFloat, getCppuType((float *) 0));
+ Any _arAny[] = { _any1, _any2, _any3 };
+ Reference< XInterface > _arObj[3];
+ _arObj[0] = new OWeakObject();
+ _arObj[1] = new OWeakObject();
+ _arObj[2] = new OWeakObject();
+ TestEnum _arEnum[] = { TestEnum_ONE, TestEnum_TWO, TestEnum_CHECK };
+ TestElement _arStruct[3];
+ assign(
+ _arStruct[0], true, '@', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
+ SAL_CONST_INT64(0x123456789ABCDEF0),
+ SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
TestEnum_LOLA, OUSTR(STRING_TEST_CONSTANT), _arObj[0],
- Any( &_arObj[0], ::getCppuType( (const Reference<XInterface > *)0 ) ) );
- assign( _arStruct[1], sal_True, 'A', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
- SAL_CONST_INT64(0x123456789abcdef0),
- SAL_CONST_UINT64(0xfedcba9876543210),
- 17.0815f, 3.1415926359,
+ Any(&_arObj[0], getCppuType((Reference< XInterface > const *) 0)));
+ assign(
+ _arStruct[1], true, 'A', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
+ SAL_CONST_INT64(0x123456789ABCDEF0),
+ SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
TestEnum_TWO, OUSTR(STRING_TEST_CONSTANT), _arObj[1],
- Any( &_arObj[1], ::getCppuType( (const Reference<XInterface > *)0 ) ) );
- assign( _arStruct[2], sal_True, 'B', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
- SAL_CONST_INT64(0x123456789abcdef0),
- SAL_CONST_UINT64(0xfedcba9876543210),
- 17.0815f, 3.1415926359,
+ Any(&_arObj[1], getCppuType((Reference< XInterface > const *) 0)));
+ assign(
+ _arStruct[2], true, 'B', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
+ SAL_CONST_INT64(0x123456789ABCDEF0),
+ SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
TestEnum_CHECK, OUSTR(STRING_TEST_CONSTANT), _arObj[2],
- Any( &_arObj[2], ::getCppuType( (const Reference<XInterface > *)0 ) ) );
-
- {
- Sequence<sal_Bool> arBool(_arBool, 3);
- Sequence<sal_Unicode> arChar( _arChar, 3);
- Sequence<sal_Int8> arByte(_arByte, 3);
- Sequence<sal_Int16> arShort(_arShort, 3);
- Sequence<sal_uInt16> arUShort(_arUShort, 3);
- Sequence<sal_Int32> arLong(_arLong, 3);
- Sequence<sal_uInt32> arULong(_arULong, 3);
- Sequence<sal_Int64> arHyper(_arHyper, 3);
- Sequence<sal_uInt64> arUHyper(_arUHyper, 3);
- Sequence<float> arFloat(_arFloat, 3);
- Sequence<double> arDouble(_arDouble, 3);
- Sequence<OUString> arString(_arString, 3);
- Sequence<Any> arAny(_arAny, 3);
- Sequence<Reference<XInterface> > arObject(_arObj, 3);
- Sequence<TestEnum> arEnum(_arEnum, 3);
- Sequence<TestElement> arStruct(_arStruct, 3);
- Sequence<Sequence<sal_Int32> > _arSeqLong2[3];
- for (int j = 0; j < 3; j++)
- {
- Sequence<sal_Int32> _arSeqLong[3];
- for (int i = 0; i < 3; i++)
- {
- _arSeqLong[i] = Sequence<sal_Int32>(_arLong, 3);
- }
-
- _arSeqLong2[j] = Sequence< Sequence<sal_Int32> > (_arSeqLong, 3);
- }
-
- Sequence<Sequence<Sequence<sal_Int32> > > arLong3( _arSeqLong2, 3);
- Sequence<Sequence<sal_Int32> > seqSeqRet = xBT2->setDim2(arLong3[0]);
- bRet = check( seqSeqRet == arLong3[0], "sequence test") && bRet;
- Sequence<Sequence<Sequence<sal_Int32> > > seqSeqRet2 = xBT2->setDim3(arLong3);
- bRet = check( seqSeqRet2 == arLong3, "sequence test") && bRet;
- Sequence<Any> seqAnyRet = xBT2->setSequenceAny(arAny);
- bRet = check( seqAnyRet == arAny, "sequence test") && bRet;
- Sequence<sal_Bool> seqBoolRet = xBT2->setSequenceBool(arBool);
- bRet = check( seqBoolRet == arBool, "sequence test") && bRet;
- Sequence<sal_Int8> seqByteRet = xBT2->setSequenceByte(arByte);
- bRet = check( seqByteRet == arByte, "sequence test") && bRet;
- Sequence<sal_Unicode> seqCharRet = xBT2->setSequenceChar(arChar);
- bRet = check( seqCharRet == arChar, "sequence test") && bRet;
- Sequence<sal_Int16> seqShortRet = xBT2->setSequenceShort(arShort);
- bRet = check( seqShortRet == arShort, "sequence test") && bRet;
- Sequence<sal_Int32> seqLongRet = xBT2->setSequenceLong(arLong);
- bRet = check( seqLongRet == arLong, "sequence test") && bRet;
- Sequence<sal_Int64> seqHyperRet = xBT2->setSequenceHyper(arHyper);
- bRet = check( seqHyperRet == arHyper, "sequence test") && bRet;
- Sequence<float> seqFloatRet = xBT2->setSequenceFloat(arFloat);
- bRet = check( seqFloatRet == arFloat, "sequence test") && bRet;
- Sequence<double> seqDoubleRet = xBT2->setSequenceDouble(arDouble);
- bRet = check( seqDoubleRet == arDouble, "sequence test") && bRet;
- Sequence<TestEnum> seqEnumRet = xBT2->setSequenceEnum(arEnum);
- bRet = check( seqEnumRet == arEnum, "sequence test") && bRet;
- Sequence<sal_uInt16> seqUShortRet = xBT2->setSequenceUShort(arUShort);
- bRet = check( seqUShortRet == arUShort, "sequence test") && bRet;
- Sequence<sal_uInt32> seqULongRet = xBT2->setSequenceULong(arULong);
- bRet = check( seqULongRet == arULong, "sequence test") && bRet;
- Sequence<sal_uInt64> seqUHyperRet = xBT2->setSequenceUHyper(arUHyper);
- bRet = check( seqUHyperRet == arUHyper, "sequence test") && bRet;
- Sequence<Reference<XInterface> > seqObjectRet = xBT2->setSequenceXInterface(arObject);
- bRet = check( seqObjectRet == arObject, "sequence test") && bRet;
- Sequence<OUString> seqStringRet = xBT2->setSequenceString(arString);
- bRet = check( seqStringRet == arString, "sequence test") && bRet;
- Sequence<TestElement> seqStructRet = xBT2->setSequenceStruct(arStruct);
- bRet = check( seqStructRet == arStruct, "sequence test") && bRet;
-
- Sequence<sal_Bool> arBoolTemp = cloneSequence(arBool);
- Sequence<sal_Unicode> arCharTemp = cloneSequence(arChar);
- Sequence<sal_Int8> arByteTemp = cloneSequence(arByte);
- Sequence<sal_Int16> arShortTemp = cloneSequence(arShort);
- Sequence<sal_uInt16> arUShortTemp = cloneSequence(arUShort);
- Sequence<sal_Int32> arLongTemp = cloneSequence(arLong);
- Sequence<sal_uInt32> arULongTemp = cloneSequence(arULong);
- Sequence<sal_Int64> arHyperTemp = cloneSequence(arHyper);
- Sequence<sal_uInt64> arUHyperTemp = cloneSequence(arUHyper);
- Sequence<float> arFloatTemp = cloneSequence(arFloat);
- Sequence<double> arDoubleTemp = cloneSequence(arDouble);
- Sequence<TestEnum> arEnumTemp = cloneSequence(arEnum);
- Sequence<OUString> arStringTemp = cloneSequence(arString);
- Reference<XInterface> _xint;
- Sequence<Reference<XInterface> > arObjectTemp = cloneSequence(arObject);
- Sequence<Any> arAnyTemp = cloneSequence(arAny);
- Sequence<Sequence<sal_Int32> > arLong2Temp(arLong3[0]);
- Sequence<Sequence<Sequence<sal_Int32> > > arLong3Temp(arLong3);
-
- xBT2->setSequencesInOut(arBoolTemp, arCharTemp, arByteTemp, arShortTemp,
- arUShortTemp, arLongTemp,arULongTemp, arHyperTemp,
- arUHyperTemp, arFloatTemp, arDoubleTemp,
- arEnumTemp, arStringTemp, arObjectTemp, arAnyTemp,
- arLong2Temp, arLong3Temp);
- bRet = check(
- arBoolTemp == arBool &&
- arCharTemp == arChar &&
- arByteTemp == arByte &&
- arShortTemp == arShort &&
- arUShortTemp == arUShort &&
- arLongTemp == arLong &&
- arULongTemp == arULong &&
- arHyperTemp == arHyper &&
- arUHyperTemp == arUHyper &&
- arFloatTemp == arFloat &&
- arDoubleTemp == arDouble &&
- arEnumTemp == arEnum &&
- arStringTemp == arString &&
- arObjectTemp == arObject &&
- arAnyTemp == arAny &&
- arLong2Temp == arLong3[0] &&
- arLong3Temp == arLong3, "sequence test") && bRet;
-
- Sequence<sal_Bool> arBoolOut;
- Sequence<sal_Unicode> arCharOut;
- Sequence<sal_Int8> arByteOut;
- Sequence<sal_Int16> arShortOut;
- Sequence<sal_uInt16> arUShortOut;
- Sequence<sal_Int32> arLongOut;
- Sequence<sal_uInt32> arULongOut;
- Sequence<sal_Int64> arHyperOut;
- Sequence<sal_uInt64> arUHyperOut;
- Sequence<float> arFloatOut;
- Sequence<double> arDoubleOut;
- Sequence<TestEnum> arEnumOut;
- Sequence<OUString> arStringOut;
- Sequence<Reference<XInterface> > arObjectOut;
- Sequence<Any> arAnyOut;
- Sequence<Sequence<sal_Int32> > arLong2Out;
- Sequence<Sequence<Sequence<sal_Int32> > > arLong3Out;
- xBT2->setSequencesOut(arBoolOut, arCharOut, arByteOut, arShortOut,
- arUShortOut, arLongOut,arULongOut, arHyperOut,
- arUHyperOut, arFloatOut, arDoubleOut,
- arEnumOut, arStringOut, arObjectOut, arAnyOut,
- arLong2Out, arLong3Out);
- bRet = check(
- arBoolOut == arBool &&
- arCharOut == arChar &&
- arByteOut == arByte &&
- arShortOut == arShort &&
- arUShortOut == arUShort &&
- arLongOut == arLong &&
- arULongOut == arULong &&
- arHyperOut == arHyper &&
- arUHyperOut == arUHyper &&
- arFloatOut == arFloat &&
- arDoubleOut == arDouble &&
- arEnumOut == arEnum &&
- arStringOut == arString &&
- arObjectOut == arObject &&
- arAnyOut == arAny &&
- arLong2Out == arLong3[0] &&
- arLong3Out == arLong3, "sequence test") && bRet;
- }
- {
- //test with empty sequences
- Sequence<Sequence<sal_Int32> > arLong2;
- Sequence<Sequence<sal_Int32> > seqSeqRet = xBT2->setDim2(arLong2);
- bRet = check( seqSeqRet == arLong2, "sequence test") && bRet;
- Sequence<Sequence<Sequence<sal_Int32> > > arLong3;
- Sequence<Sequence<Sequence<sal_Int32> > > seqSeqRet2 = xBT2->setDim3(
- arLong3);
- bRet = check( seqSeqRet2 == arLong3, "sequence test") && bRet;
- Sequence<Any> arAny;
- Sequence<Any> seqAnyRet = xBT2->setSequenceAny(arAny);
- bRet = check( seqAnyRet == arAny, "sequence test") && bRet;
- Sequence<sal_Bool> arBool;
- Sequence<sal_Bool> seqBoolRet = xBT2->setSequenceBool(arBool);
- bRet = check( seqBoolRet == arBool, "sequence test") && bRet;
- Sequence<sal_Int8> arByte;
- Sequence<sal_Int8> seqByteRet = xBT2->setSequenceByte(arByte);
- bRet = check( seqByteRet == arByte, "sequence test") && bRet;
- Sequence<sal_Unicode> arChar;
- Sequence<sal_Unicode> seqCharRet = xBT2->setSequenceChar(arChar);
- bRet = check( seqCharRet == arChar, "sequence test") && bRet;
- Sequence<sal_Int16> arShort;
- Sequence<sal_Int16> seqShortRet = xBT2->setSequenceShort(arShort);
- bRet = check( seqShortRet == arShort, "sequence test") && bRet;
- Sequence<sal_Int32> arLong;
- Sequence<sal_Int32> seqLongRet = xBT2->setSequenceLong(arLong);
- bRet = check( seqLongRet == arLong, "sequence test") && bRet;
- Sequence<sal_Int64> arHyper;
- Sequence<sal_Int64> seqHyperRet = xBT2->setSequenceHyper(arHyper);
- bRet = check( seqHyperRet == arHyper, "sequence test") && bRet;
- Sequence<float> arFloat;
- Sequence<float> seqFloatRet = xBT2->setSequenceFloat(arFloat);
- bRet = check( seqFloatRet == arFloat, "sequence test") && bRet;
- Sequence<double> arDouble;
- Sequence<double> seqDoubleRet = xBT2->setSequenceDouble(arDouble);
- bRet = check( seqDoubleRet == arDouble, "sequence test") && bRet;
- Sequence<TestEnum> arEnum;
- Sequence<TestEnum> seqEnumRet = xBT2->setSequenceEnum(arEnum);
- bRet = check( seqEnumRet == arEnum, "sequence test") && bRet;
- Sequence<sal_uInt16> arUShort;
- Sequence<sal_uInt16> seqUShortRet = xBT2->setSequenceUShort(arUShort);
- bRet = check( seqUShortRet == arUShort, "sequence test") && bRet;
- Sequence<sal_uInt32> arULong;
- Sequence<sal_uInt32> seqULongRet = xBT2->setSequenceULong(arULong);
- bRet = check( seqULongRet == arULong, "sequence test") && bRet;
- Sequence<sal_uInt64> arUHyper;
- Sequence<sal_uInt64> seqUHyperRet = xBT2->setSequenceUHyper(arUHyper);
- bRet = check( seqUHyperRet == arUHyper, "sequence test") && bRet;
- Sequence<Reference<XInterface> > arObject;
- Sequence<Reference<XInterface> > seqObjectRet =
- xBT2->setSequenceXInterface(arObject);
- bRet = check( seqObjectRet == arObject, "sequence test") && bRet;
- Sequence<OUString> arString;
- Sequence<OUString> seqStringRet = xBT2->setSequenceString(arString);
- bRet = check( seqStringRet == arString, "sequence test") && bRet;
- Sequence<TestElement> arStruct;
- Sequence<TestElement> seqStructRet = xBT2->setSequenceStruct(arStruct);
- bRet = check( seqStructRet == arStruct, "sequence test") && bRet;
- }
- // Issue #i60341# shows that the most interesting case is were Java calls
- // the constructors; however, since this client is currently not available
- // in Java, while the server is, the logic is reversed here:
- try {
- xBT2->testConstructorsService(xContext);
- } catch (BadConstructorArguments &) {
- bRet = false;
- }
- if (!noCurrentContext) {
- if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
- xBT2->getCurrentContextChecker(), 0, 1))
+ Any(&_arObj[2], getCppuType((Reference< XInterface > const *) 0)));
{
- bRet = false;
+ Sequence<sal_Bool> arBool(_arBool, 3);
+ Sequence<sal_Unicode> arChar( _arChar, 3);
+ Sequence<sal_Int8> arByte(_arByte, 3);
+ Sequence<sal_Int16> arShort(_arShort, 3);
+ Sequence<sal_uInt16> arUShort(_arUShort, 3);
+ Sequence<sal_Int32> arLong(_arLong, 3);
+ Sequence<sal_uInt32> arULong(_arULong, 3);
+ Sequence<sal_Int64> arHyper(_arHyper, 3);
+ Sequence<sal_uInt64> arUHyper(_arUHyper, 3);
+ Sequence<float> arFloat(_arFloat, 3);
+ Sequence<double> arDouble(_arDouble, 3);
+ Sequence<OUString> arString(_arString, 3);
+ Sequence<Any> arAny(_arAny, 3);
+ Sequence<Reference<XInterface> > arObject(_arObj, 3);
+ Sequence<TestEnum> arEnum(_arEnum, 3);
+ Sequence<TestElement> arStruct(_arStruct, 3);
+ Sequence<Sequence<sal_Int32> > _arSeqLong2[3];
+ for (int j = 0; j != 3; ++j) {
+ Sequence< sal_Int32 > _arSeqLong[3];
+ for (int i = 0; i != 3; ++i) {
+ _arSeqLong[i] = Sequence< sal_Int32 >(_arLong, 3);
+ }
+ _arSeqLong2[j] = Sequence< Sequence< sal_Int32 > >(
+ _arSeqLong, 3);
+ }
+ Sequence< Sequence< Sequence< sal_Int32> > > arLong3(
+ _arSeqLong2, 3);
+ Sequence< Sequence< sal_Int32 > > seqSeqRet(
+ xBT2->setDim2(arLong3[0]));
+ bRet &= check(seqSeqRet == arLong3[0], "sequence test");
+ Sequence< Sequence< Sequence< sal_Int32 > > > seqSeqRet2(
+ xBT2->setDim3(arLong3));
+ bRet &= check(seqSeqRet2 == arLong3, "sequence test");
+ Sequence< Any > seqAnyRet(xBT2->setSequenceAny(arAny));
+ bRet &= check(seqAnyRet == arAny, "sequence test");
+ Sequence< sal_Bool > seqBoolRet(xBT2->setSequenceBool(arBool));
+ bRet &= check(seqBoolRet == arBool, "sequence test");
+ Sequence< sal_Int8 > seqByteRet(xBT2->setSequenceByte(arByte));
+ bRet &= check(seqByteRet == arByte, "sequence test");
+ Sequence< sal_Unicode > seqCharRet(xBT2->setSequenceChar(arChar));
+ bRet &= check(seqCharRet == arChar, "sequence test");
+ Sequence< sal_Int16 > seqShortRet(xBT2->setSequenceShort(arShort));
+ bRet &= check(seqShortRet == arShort, "sequence test");
+ Sequence< sal_Int32 > seqLongRet(xBT2->setSequenceLong(arLong));
+ bRet &= check(seqLongRet == arLong, "sequence test");
+ Sequence< sal_Int64 > seqHyperRet(xBT2->setSequenceHyper(arHyper));
+ bRet &= check(seqHyperRet == arHyper, "sequence test");
+ Sequence< float > seqFloatRet(xBT2->setSequenceFloat(arFloat));
+ bRet &= check(seqFloatRet == arFloat, "sequence test");
+ Sequence< double > seqDoubleRet(xBT2->setSequenceDouble(arDouble));
+ bRet &= check(seqDoubleRet == arDouble, "sequence test");
+ Sequence< TestEnum > seqEnumRet(xBT2->setSequenceEnum(arEnum));
+ bRet &= check(seqEnumRet == arEnum, "sequence test");
+ Sequence< sal_uInt16 > seqUShortRet(
+ xBT2->setSequenceUShort(arUShort));
+ bRet &= check(seqUShortRet == arUShort, "sequence test");
+ Sequence< sal_uInt32 > seqULongRet(xBT2->setSequenceULong(arULong));
+ bRet &= check(seqULongRet == arULong, "sequence test");
+ Sequence< sal_uInt64 > seqUHyperRet(
+ xBT2->setSequenceUHyper(arUHyper));
+ bRet &= check(seqUHyperRet == arUHyper, "sequence test");
+ Sequence< Reference< XInterface > > seqObjectRet(
+ xBT2->setSequenceXInterface(arObject));
+ bRet &= check(seqObjectRet == arObject, "sequence test");
+ Sequence< OUString > seqStringRet(
+ xBT2->setSequenceString(arString));
+ bRet &= check(seqStringRet == arString, "sequence test");
+ Sequence< TestElement > seqStructRet(
+ xBT2->setSequenceStruct(arStruct));
+ bRet &= check(seqStructRet == arStruct, "sequence test");
+ Sequence< sal_Bool > arBoolTemp(cloneSequence(arBool));
+ Sequence< sal_Unicode > arCharTemp(cloneSequence(arChar));
+ Sequence< sal_Int8 > arByteTemp(cloneSequence(arByte));
+ Sequence< sal_Int16 > arShortTemp(cloneSequence(arShort));
+ Sequence< sal_uInt16 > arUShortTemp(cloneSequence(arUShort));
+ Sequence< sal_Int32 > arLongTemp(cloneSequence(arLong));
+ Sequence< sal_uInt32 > arULongTemp(cloneSequence(arULong));
+ Sequence< sal_Int64 > arHyperTemp(cloneSequence(arHyper));
+ Sequence< sal_uInt64 > arUHyperTemp(cloneSequence(arUHyper));
+ Sequence< float > arFloatTemp(cloneSequence(arFloat));
+ Sequence< double > arDoubleTemp(cloneSequence(arDouble));
+ Sequence< TestEnum > arEnumTemp(cloneSequence(arEnum));
+ Sequence< OUString > arStringTemp(cloneSequence(arString));
+ Sequence< Reference< XInterface > > arObjectTemp(
+ cloneSequence(arObject));
+ Sequence< Any > arAnyTemp(cloneSequence(arAny));
+ Sequence< Sequence< sal_Int32 > > arLong2Temp(arLong3[0]);
+ Sequence< Sequence< Sequence< sal_Int32 > > > arLong3Temp(arLong3);
+ xBT2->setSequencesInOut(
+ arBoolTemp, arCharTemp, arByteTemp, arShortTemp, arUShortTemp,
+ arLongTemp,arULongTemp, arHyperTemp, arUHyperTemp, arFloatTemp,
+ arDoubleTemp, arEnumTemp, arStringTemp, arObjectTemp, arAnyTemp,
+ arLong2Temp, arLong3Temp);
+ bRet &= check(
+ (arBoolTemp == arBool && arCharTemp == arChar &&
+ arByteTemp == arByte && arShortTemp == arShort &&
+ arUShortTemp == arUShort && arLongTemp == arLong &&
+ arULongTemp == arULong && arHyperTemp == arHyper &&
+ arUHyperTemp == arUHyper && arFloatTemp == arFloat &&
+ arDoubleTemp == arDouble && arEnumTemp == arEnum &&
+ arStringTemp == arString && arObjectTemp == arObject &&
+ arAnyTemp == arAny && arLong2Temp == arLong3[0] &&
+ arLong3Temp == arLong3),
+ "sequence test");
+ Sequence< sal_Bool > arBoolOut;
+ Sequence< sal_Unicode > arCharOut;
+ Sequence< sal_Int8 > arByteOut;
+ Sequence< sal_Int16 > arShortOut;
+ Sequence< sal_uInt16 > arUShortOut;
+ Sequence< sal_Int32 > arLongOut;
+ Sequence< sal_uInt32 > arULongOut;
+ Sequence< sal_Int64 > arHyperOut;
+ Sequence< sal_uInt64 > arUHyperOut;
+ Sequence< float > arFloatOut;
+ Sequence< double > arDoubleOut;
+ Sequence< TestEnum > arEnumOut;
+ Sequence< OUString > arStringOut;
+ Sequence< Reference< XInterface > > arObjectOut;
+ Sequence< Any > arAnyOut;
+ Sequence< Sequence< sal_Int32 > > arLong2Out;
+ Sequence< Sequence< Sequence< sal_Int32 > > > arLong3Out;
+ xBT2->setSequencesOut(
+ arBoolOut, arCharOut, arByteOut, arShortOut, arUShortOut,
+ arLongOut,arULongOut, arHyperOut, arUHyperOut, arFloatOut,
+ arDoubleOut, arEnumOut, arStringOut, arObjectOut, arAnyOut,
+ arLong2Out, arLong3Out);
+ bRet &= check(
+ (arBoolOut == arBool && arCharOut == arChar &&
+ arByteOut == arByte && arShortOut == arShort &&
+ arUShortOut == arUShort && arLongOut == arLong &&
+ arULongOut == arULong && arHyperOut == arHyper &&
+ arUHyperOut == arUHyper && arFloatOut == arFloat &&
+ arDoubleOut == arDouble && arEnumOut == arEnum &&
+ arStringOut == arString && arObjectOut == arObject &&
+ arAnyOut == arAny && arLong2Out == arLong3[0] &&
+ arLong3Out == arLong3),
+ "sequence test");
}
- if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
- xBT2->getCurrentContextChecker(), 0, 2))
{
- bRet = false;
+ // Test with empty sequences:
+ Sequence< Sequence< sal_Int32 > > arLong2;
+ Sequence< Sequence< sal_Int32 > > seqSeqRet(xBT2->setDim2(arLong2));
+ bRet &= check(seqSeqRet == arLong2, "sequence test");
+ Sequence< Sequence< Sequence< sal_Int32 > > > arLong3;
+ Sequence< Sequence< Sequence< sal_Int32 > > > seqSeqRet2(
+ xBT2->setDim3(arLong3));
+ bRet &= check(seqSeqRet2 == arLong3, "sequence test");
+ Sequence< Any > arAny;
+ Sequence< Any > seqAnyRet(xBT2->setSequenceAny(arAny));
+ bRet &= check(seqAnyRet == arAny, "sequence test");
+ Sequence< sal_Bool > arBool;
+ Sequence< sal_Bool > seqBoolRet(xBT2->setSequenceBool(arBool));
+ bRet &= check(seqBoolRet == arBool, "sequence test");
+ Sequence< sal_Int8 > arByte;
+ Sequence< sal_Int8 > seqByteRet(xBT2->setSequenceByte(arByte));
+ bRet &= check(seqByteRet == arByte, "sequence test");
+ Sequence< sal_Unicode > arChar;
+ Sequence< sal_Unicode > seqCharRet(xBT2->setSequenceChar(arChar));
+ bRet &= check(seqCharRet == arChar, "sequence test");
+ Sequence< sal_Int16 > arShort;
+ Sequence< sal_Int16 > seqShortRet(xBT2->setSequenceShort(arShort));
+ bRet &= check(seqShortRet == arShort, "sequence test");
+ Sequence< sal_Int32 > arLong;
+ Sequence< sal_Int32 > seqLongRet(xBT2->setSequenceLong(arLong));
+ bRet &= check(seqLongRet == arLong, "sequence test");
+ Sequence< sal_Int64 > arHyper;
+ Sequence< sal_Int64 > seqHyperRet(xBT2->setSequenceHyper(arHyper));
+ bRet &= check(seqHyperRet == arHyper, "sequence test");
+ Sequence< float > arFloat;
+ Sequence< float > seqFloatRet(xBT2->setSequenceFloat(arFloat));
+ bRet &= check(seqFloatRet == arFloat, "sequence test");
+ Sequence< double > arDouble;
+ Sequence< double > seqDoubleRet(xBT2->setSequenceDouble(arDouble));
+ bRet &= check(seqDoubleRet == arDouble, "sequence test");
+ Sequence< TestEnum > arEnum;
+ Sequence< TestEnum > seqEnumRet(xBT2->setSequenceEnum(arEnum));
+ bRet &= check(seqEnumRet == arEnum, "sequence test");
+ Sequence< sal_uInt16 > arUShort;
+ Sequence< sal_uInt16 > seqUShortRet(
+ xBT2->setSequenceUShort(arUShort));
+ bRet &= check(seqUShortRet == arUShort, "sequence test");
+ Sequence< sal_uInt32 > arULong;
+ Sequence< sal_uInt32 > seqULongRet(xBT2->setSequenceULong(arULong));
+ bRet &= check(seqULongRet == arULong, "sequence test");
+ Sequence< sal_uInt64 > arUHyper;
+ Sequence< sal_uInt64 > seqUHyperRet(
+ xBT2->setSequenceUHyper(arUHyper));
+ bRet &= check(seqUHyperRet == arUHyper, "sequence test");
+ Sequence< Reference< XInterface > > arObject;
+ Sequence< Reference< XInterface > > seqObjectRet(
+ xBT2->setSequenceXInterface(arObject));
+ bRet &= check(seqObjectRet == arObject, "sequence test");
+ Sequence< OUString > arString;
+ Sequence< OUString > seqStringRet(
+ xBT2->setSequenceString(arString));
+ bRet &= check(seqStringRet == arString, "sequence test");
+ Sequence< TestElement > arStruct;
+ Sequence< TestElement > seqStructRet(
+ xBT2->setSequenceStruct(arStruct));
+ bRet &= check(seqStructRet == arStruct, "sequence test");
}
- if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
- xBT2->getCurrentContextChecker(), 1, 2))
- {
+ // Issue #i60341# shows that the most interesting case is were Java
+ // calls the constructors; however, since this client is currently not
+ // available in Java, while the server is, the logic is reversed here:
+ try {
+ xBT2->testConstructorsService(xContext);
+ } catch (BadConstructorArguments &) {
bRet = false;
}
- if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
- xBT2->getCurrentContextChecker(), 1, 3))
- {
- bRet = false;
+ if (!noCurrentContext) {
+ if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
+ xBT2->getCurrentContextChecker(), 0, 1))
+ {
+ bRet = false;
+ }
+ if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
+ xBT2->getCurrentContextChecker(), 0, 2))
+ {
+ bRet = false;
+ }
+ if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
+ xBT2->getCurrentContextChecker(), 1, 2))
+ {
+ bRet = false;
+ }
+ if (!(new testtools::bridgetest::CurrentContextChecker)->perform(
+ xBT2->getCurrentContextChecker(), 1, 3))
+ {
+ bRet = false;
+ }
}
}
- }
return bRet;
}
+
static sal_Bool raiseOnewayException( const Reference < XBridgeTest > & xLBT )
{
sal_Bool bReturn = sal_True;
@@ -1247,7 +1212,6 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
bRet = check( raiseException( xLBT ) , "exception test" )&& bRet;
bRet = check( raiseOnewayException( xLBT ),
"oneway exception test" ) && bRet;
- bRet = performQueryForUnknownType( xLBT ) && bRet;
if (! bRet)
{
throw RuntimeException(
diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index 4c8d690aab06..d4d06cb39a3f 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -159,7 +159,7 @@ public:
{}
virtual ~Test_Impl()
{
- OSL_TRACE( "> scalar Test_Impl dtor <\n" );
+ OSL_TRACE( "> scalar Test_Impl dtor <" );
}
void SAL_CALL acquire() throw ()
diff --git a/testtools/source/bridgetest/currentcontextchecker.cxx b/testtools/source/bridgetest/currentcontextchecker.cxx
index 3da2d74e9d2b..e7e4ec858b7b 100644
--- a/testtools/source/bridgetest/currentcontextchecker.cxx
+++ b/testtools/source/bridgetest/currentcontextchecker.cxx
@@ -50,8 +50,8 @@ namespace {
namespace css = ::com::sun::star;
-static char const key[] = "testtools.bridgetest.Key";
-static char const value[] = "good";
+static char const KEY[] = "testtools.bridgetest.Key";
+static char const VALUE[] = "good";
class CurrentContext:
public ::osl::DebugBase< CurrentContext >,
@@ -77,8 +77,8 @@ CurrentContext::~CurrentContext() {}
css::uno::Any CurrentContext::getValueByName(::rtl::OUString const & Name)
throw (css::uno::RuntimeException)
{
- return Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(key))
- ? css::uno::makeAny(::rtl::OUString::createFromAscii(value))
+ return Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(KEY))
+ ? css::uno::makeAny(::rtl::OUString::createFromAscii(VALUE))
: css::uno::Any();
}
@@ -115,13 +115,13 @@ bool testtools::bridgetest::CurrentContextChecker::performCheck(
return false;
}
css::uno::Any a(
- context->getValueByName(::rtl::OUString::createFromAscii(key)));
+ context->getValueByName(::rtl::OUString::createFromAscii(KEY)));
if (a.getValueType() != ::cppu::UnoType< ::rtl::OUString >::get()) {
return false;
}
::rtl::OUString s;
OSL_VERIFY(a >>= s);
- return s.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(value));
+ return s.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(VALUE));
} else {
return other->perform(
this, setSteps >= 0 ? setSteps - 1 : -1, checkSteps - 1);
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index 9d94c76314f1..ab51c1e282bb 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -166,10 +166,23 @@ $(eval $(call gb_Library_add_linked_libs,tk,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,tk,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,tk,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst
index 7b6fd72c3ab0..b851421c6f8e 100644
--- a/toolkit/prj/build.lst
+++ b/toolkit/prj/build.lst
@@ -1,2 +1,3 @@
ti toolkit : LIBXSLT:libxslt vcl NULL
ti toolkit\prj nmake - all ti_prj NULL
+ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL
diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl
index 8df098a98c63..273b4b72dbe2 100644
--- a/toolkit/qa/unoapi/knownissues.xcl
+++ b/toolkit/qa/unoapi/knownissues.xcl
@@ -178,7 +178,6 @@ toolkit.UnoControlDialogModel::com::sun::star::lang::XComponent
toolkit.UnoControlFileControlModel::com::sun::star::lang::XComponent
toolkit.UnoControlGroupBox::com::sun::star::lang::XComponent
toolkit.UnoControlContainer::com::sun::star::lang::XComponent
-toolkit.MutableTreeDataModel::com::sun::star::lang::XComponent
toolkit.UnoControlFixedText::com::sun::star::lang::XComponent
toolkit.UnoControlListBox::com::sun::star::lang::XComponent
toolkit.UnoControlCheckBoxModel::com::sun::star::lang::XComponent
diff --git a/toolkit/qa/unoapi/makefile.mk b/toolkit/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..9517601c3917
--- /dev/null
+++ b/toolkit/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = toolkit
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/toolkit/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/tools/Executable_mkunroll.mk b/tools/Executable_mkunroll.mk
index 6a88e48f232a..5f9753a2a88f 100644
--- a/tools/Executable_mkunroll.mk
+++ b/tools/Executable_mkunroll.mk
@@ -58,6 +58,20 @@ $(eval $(call gb_Executable_add_exception_objects,mkunroll,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
kernel32 \
msvcrt \
@@ -66,6 +80,7 @@ $(eval $(call gb_Executable_add_linked_libs,mkunroll,\
uwinapi \
))
endif
+endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
diff --git a/tools/Executable_rscdep.mk b/tools/Executable_rscdep.mk
index d6f2c25a1763..85551407d335 100644
--- a/tools/Executable_rscdep.mk
+++ b/tools/Executable_rscdep.mk
@@ -55,8 +55,30 @@ $(eval $(call gb_Executable_add_exception_objects,rscdep,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+ifeq ($(HAVE_GETOPT),YES)
+$(eval $(call gb_Executable_set_cxxflags,rscdep,\
+ $$(CXXFLAGS) \
+ -DHAVE_GETOPT \
+))
+endif
+$(eval $(call gb_Executable_add_linked_libs,rscdep,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,rscdep,\
gnu_getopt \
+))
+$(eval $(call gb_Executable_add_linked_libs,rscdep,\
kernel32 \
msvcrt \
oldnames \
@@ -64,6 +86,7 @@ $(eval $(call gb_Executable_add_linked_libs,rscdep,\
uwinapi \
))
endif
+endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_linked_libs,rscdep,\
diff --git a/tools/Executable_so_checksum.mk b/tools/Executable_so_checksum.mk
index 071f0c5bb7b0..1c0faf30b015 100644
--- a/tools/Executable_so_checksum.mk
+++ b/tools/Executable_so_checksum.mk
@@ -51,6 +51,20 @@ $(eval $(call gb_Executable_add_exception_objects,so_checksum,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
kernel32 \
msvcrt \
@@ -59,6 +73,7 @@ $(eval $(call gb_Executable_add_linked_libs,so_checksum,\
uwinapi \
))
endif
+endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
diff --git a/tools/Executable_sspretty.mk b/tools/Executable_sspretty.mk
index 0c83b7137eea..637acf2afd0e 100644
--- a/tools/Executable_sspretty.mk
+++ b/tools/Executable_sspretty.mk
@@ -56,6 +56,20 @@ $(eval $(call gb_Executable_add_exception_objects,sspretty,\
))
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Executable_add_linked_libs,sspretty,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,sspretty,\
kernel32 \
msvcrt \
@@ -64,6 +78,7 @@ $(eval $(call gb_Executable_add_linked_libs,sspretty,\
uwinapi \
))
endif
+endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_linked_libs,sspretty,\
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
index dde1f8f5dd92..fe91657e42f4 100644
--- a/tools/Library_tl.mk
+++ b/tools/Library_tl.mk
@@ -160,6 +160,25 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/win/source/dll/toolsdll \
))
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,tl,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ mpr \
+ msvcrt \
+ ole32 \
+ shell32 \
+ user32 \
+ uuid \
+))
+else
$(eval $(call gb_Library_add_linked_libs,tl,\
advapi32 \
kernel32 \
@@ -173,6 +192,7 @@ $(eval $(call gb_Library_add_linked_libs,tl,\
uwinapi \
))
endif
+endif
# tools/source/string/debugprint -DDEBUG -DEXCEPTIONS_OFF -DOSL_DEBUG_LEVEL=2 -DSHAREDLIB -DTOOLS_DLLIMPLEMENTATION -D_DLL_ -O0 -fno-exceptions -fpic -fvisibility=hidden -g
# -DOPTIMIZE
# no -DTOOLS_DLLIMPLEMENTATION on toolsdll
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index f21855d20aed..9f4c39b397e1 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1538,7 +1538,16 @@ ErrCode UcbLockBytes::Flush() const
Reference <XOutputStream > xOutputStream = getOutputStream_Impl();
if ( !xOutputStream.is() )
return ERRCODE_IO_CANTWRITE;
- xOutputStream->flush();
+
+ try
+ {
+ xOutputStream->flush();
+ }
+ catch( Exception )
+ {
+ return ERRCODE_IO_CANTWRITE;
+ }
+
return ERRCODE_NONE;
}
diff --git a/vcl/aqua/source/dtrans/service_entry.cxx b/vcl/aqua/source/dtrans/service_entry.cxx
index 16308951bcfe..222b5cf40e04 100644
--- a/vcl/aqua/source/dtrans/service_entry.cxx
+++ b/vcl/aqua/source/dtrans/service_entry.cxx
@@ -34,6 +34,7 @@
#include "DropTarget.hxx"
#include "aqua_clipboard.hxx"
#include "osl/diagnose.h"
+#include "vcl/svapp.hxx"
using namespace ::osl;
using namespace ::rtl;
@@ -45,6 +46,9 @@ using namespace ::com::sun::star::datatransfer::clipboard;
Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& i_rArguments )
{
+ if ( Application::IsHeadlessModeEnabled() )
+ return SalInstance::CreateClipboard( i_rArguments );
+
SalData* pSalData = GetSalData();
if( ! pSalData->mxClipboard.is() )
pSalData->mxClipboard = Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY);
@@ -54,11 +58,17 @@ Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >&
Reference<XInterface> AquaSalInstance::CreateDragSource()
{
+ if ( Application::IsHeadlessModeEnabled() )
+ return SalInstance::CreateDragSource();
+
return Reference<XInterface>(static_cast< XInitialization* >(new DragSource()), UNO_QUERY);
}
Reference<XInterface> AquaSalInstance::CreateDropTarget()
{
- return Reference<XInterface>(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY);
+ if ( Application::IsHeadlessModeEnabled() )
+ return SalInstance::CreateDropTarget();
+
+ return Reference<XInterface>(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY);
}
diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index eb09a44f5edd..f633dbbdcdce 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -33,6 +33,7 @@
#include "salgdi.h"
#include "saldata.hxx"
#include "salframe.h"
+#include <vcl/svapp.hxx>
#include "vcl/sysdata.hxx"
@@ -197,9 +198,27 @@ BOOL AquaSalVirtualDevice::SetSize( long nDX, long nDY )
pSalFrame = *GetSalData()->maFrames.begin();
if( pSalFrame )
{
- NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pSalFrame->getWindow()];
- if( pNSContext )
- xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]);
+ // #i91990#
+ NSWindow* pWindow = pSalFrame->getWindow();
+ if ( pWindow )
+ {
+ NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pWindow];
+ if( pNSContext )
+ xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]);
+ }
+ else
+ {
+ // fall back to a bitmap context
+ mnBitmapDepth = 32;
+ const CGColorSpaceRef aCGColorSpace = GetSalData()->mxRGBSpace;
+ const CGBitmapInfo aCGBmpInfo = kCGImageAlphaNoneSkipFirst;
+ const int nBytesPerRow = (mnBitmapDepth * nDX) / 8;
+
+ void* pRawData = rtl_allocateMemory( nBytesPerRow * nDY );
+ mxBitmapContext = ::CGBitmapContextCreate( pRawData, nDX, nDY,
+ 8, nBytesPerRow, aCGColorSpace, aCGBmpInfo );
+ xCGContext = mxBitmapContext;
+ }
}
}
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 4530778c5775..17e034bd6e3d 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -191,8 +191,17 @@ void AquaSalFrame::initWindowAndView()
mnStyleMask |= NSTitledWindowMask;
}
+ // #i91990# support GUI-less (daemon) execution
+ @try
+ {
mpWindow = [[SalFrameWindow alloc] initWithSalFrame: this];
mpView = [[SalFrameView alloc] initWithSalFrame: this];
+ }
+ @catch ( id exception )
+ {
+ return;
+ }
+
if( (mnStyle & SAL_FRAME_STYLE_TOOLTIP) )
[mpWindow setIgnoresMouseEvents: YES];
else
@@ -291,6 +300,9 @@ BOOL AquaSalFrame::PostEvent( void *pData )
// -----------------------------------------------------------------------
void AquaSalFrame::SetTitle(const XubString& rTitle)
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -405,6 +417,9 @@ void AquaSalFrame::SendPaintEvent( const Rectangle* pRect )
void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -563,6 +578,8 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
+ if ( mpWindow )
+ {
// set normal state
NSRect aStateRect = [mpWindow frame];
aStateRect = [NSWindow contentRectForFrameRect: aStateRect styleMask: mnStyleMask];
@@ -599,6 +616,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
if( [mpWindow isZoomed] )
[mpWindow zoom: NSApp];
}
+ }
// get new geometry
UpdateFrameGeometry();
@@ -619,7 +637,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
if( nEvent )
CallCallback( nEvent, NULL );
- if( mbShown )
+ if( mbShown && mpWindow )
{
// trigger filling our backbuffer
SendPaintEvent();
@@ -633,6 +651,9 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
{
+ if ( !mpWindow )
+ return FALSE;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -670,6 +691,9 @@ BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -704,6 +728,9 @@ void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -814,6 +841,9 @@ public:
void AquaSalFrame::StartPresentation( BOOL bStart )
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -841,6 +871,9 @@ void AquaSalFrame::SetAlwaysOnTop( BOOL bOnTop )
void AquaSalFrame::ToTop(USHORT nFlags)
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -900,6 +933,9 @@ NSCursor* AquaSalFrame::getCurrentCursor() const
void AquaSalFrame::SetPointer( PointerStyle ePointerStyle )
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -1198,6 +1234,9 @@ void AquaSalFrame::getResolution( long& o_rDPIX, long& o_rDPIY )
// doesn't make the anything cleaner for now
void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -1312,6 +1351,9 @@ void AquaSalFrame::Beep( SoundType eSoundType )
void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHORT nFlags)
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -1399,6 +1441,9 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
void AquaSalFrame::GetWorkArea( Rectangle& rRect )
{
+ if ( !mpWindow )
+ return;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -1537,11 +1582,15 @@ void AquaSalFrame::SetMenu( SalMenu* pSalMenu )
void AquaSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
{
+ if ( mpWindow )
+ {
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
if( (mnExtStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) != (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) )
[mpWindow setDocumentEdited: (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) ? YES : NO];
+ }
+
mnExtStyle = nStyle;
}
@@ -1572,6 +1621,11 @@ void AquaSalFrame::SetParent( SalFrame* pNewParent )
void AquaSalFrame::UpdateFrameGeometry()
{
+ if ( !mpWindow )
+ {
+ return;
+ }
+
// keep in mind that view and window coordinates are lower left
// whereas vcl's are upper left
@@ -1644,6 +1698,11 @@ void AquaSalFrame::CaptureMouse( BOOL bCapture )
void AquaSalFrame::ResetClipRegion()
{
+ if ( !mpWindow )
+ {
+ return;
+ }
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -1662,6 +1721,11 @@ void AquaSalFrame::ResetClipRegion()
void AquaSalFrame::BeginSetClipRegion( ULONG nRects )
{
+ if ( !mpWindow )
+ {
+ return;
+ }
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
@@ -1696,6 +1760,11 @@ void AquaSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight
void AquaSalFrame::EndSetClipRegion()
{
+ if ( !mpWindow )
+ {
+ return;
+ }
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx
index bac9d50dc5da..d180f2647135 100644
--- a/vcl/source/app/sound.cxx
+++ b/vcl/source/app/sound.cxx
@@ -38,6 +38,7 @@
#include <vcl/salframe.hxx>
#include <tools/debug.hxx>
#include <vcl/svdata.hxx>
+#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/sound.hxx>
@@ -45,6 +46,10 @@
void Sound::Beep( SoundType eType, Window* pWindow )
{
+ // #i91990#
+ if ( Application::IsHeadlessModeEnabled() )
+ return;
+
if( !pWindow )
{
Window* pDefWindow = ImplGetDefaultWindow();
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index 2e335b4175c4..ddd7a21c8fb4 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ -390,6 +390,20 @@ $(eval $(call gb_Library_add_linked_libs,xo,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,xo,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,xo,\
kernel32 \
msvcrt \
@@ -398,4 +412,5 @@ $(eval $(call gb_Library_add_linked_libs,xo,\
uwinapi \
))
endif
+endif
# vim: set noet ts=4 sw=4:
diff --git a/xmloff/Library_xof.mk b/xmloff/Library_xof.mk
index 6880eb1a1fd9..e809935d12ba 100644
--- a/xmloff/Library_xof.mk
+++ b/xmloff/Library_xof.mk
@@ -101,6 +101,20 @@ $(eval $(call gb_Library_add_linked_libs,xof,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,xof,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,xof,\
kernel32 \
msvcrt \
@@ -109,4 +123,5 @@ $(eval $(call gb_Library_add_linked_libs,xof,\
uwinapi \
))
endif
+endif
# vim: set noet ts=4 sw=4:
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 358cb023199c..3b28fb4839bd 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1598,6 +1598,21 @@ void SchXMLExportHelper_Impl::exportTable()
// table element
// -------------
mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, msTableName );
+
+ try
+ {
+ bool bProtected = false;
+ Reference< beans::XPropertySet > xProps( mrExport.GetModel(), uno::UNO_QUERY_THROW );
+ if ( ( xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bProtected ) &&
+ bProtected )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_PROTECTED, XML_TRUE );
+ }
+ }
+ catch ( uno::Exception& )
+ {
+ }
+
SvXMLElementExport aTable( mrExport, XML_NAMESPACE_TABLE, XML_TABLE, sal_True, sal_True );
bool bHasOwnData = false;
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index cc01a7d1c050..8f584bb5d6ac 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -375,12 +375,19 @@ void SchXMLTableContext::StartElement( const uno::Reference< xml::sax::XAttribut
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
-
- if( nPrefix == XML_NAMESPACE_TABLE &&
- IsXMLToken( aLocalName, XML_NAME ) )
+ if ( nPrefix == XML_NAMESPACE_TABLE )
{
- mrTable.aTableNameOfFile = xAttrList->getValueByIndex( i );
- break; // we only need this attribute
+ if ( IsXMLToken( aLocalName, XML_NAME ) )
+ {
+ mrTable.aTableNameOfFile = xAttrList->getValueByIndex( i );
+ }
+ else if ( IsXMLToken( aLocalName, XML_PROTECTED ) )
+ {
+ if ( IsXMLToken( xAttrList->getValueByIndex( i ), XML_TRUE ) )
+ {
+ mrTable.bProtected = true;
+ }
+ }
}
}
}
@@ -928,6 +935,19 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
xDataAccess->setComplexRowDescriptions( aComplexRowDescriptions );
if( rTable.bHasHeaderRow )
xDataAccess->setComplexColumnDescriptions( aComplexColumnDescriptions );
+
+ if ( rTable.bProtected )
+ {
+ try
+ {
+ Reference< beans::XPropertySet > xProps( xChartDoc, uno::UNO_QUERY_THROW );
+ xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ), uno::makeAny( sal_True ) );
+ xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ), uno::makeAny( sal_True ) );
+ }
+ catch ( uno::Exception& )
+ {
+ }
+ }
}
void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx
index 27c8850e2b81..599741dfe273 100644
--- a/xmloff/source/chart/transporttypes.hxx
+++ b/xmloff/source/chart/transporttypes.hxx
@@ -87,12 +87,15 @@ struct SchXMLTable
::std::vector< sal_Int32 > aHiddenColumns;
+ bool bProtected;
+
SchXMLTable() : nRowIndex( -1 ),
nColumnIndex( -1 ),
nMaxColumnIndex( -1 ),
nNumberOfColsEstimate( 0 ),
bHasHeaderRow( false ),
- bHasHeaderColumn( false )
+ bHasHeaderColumn( false ),
+ bProtected( false )
{}
};