summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx28
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx26
-rw-r--r--filter/source/graphicfilter/epbm/epbm.cxx30
-rw-r--r--filter/source/graphicfilter/epgm/epgm.cxx30
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx29
-rw-r--r--filter/source/graphicfilter/eppm/eppm.cxx31
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx26
-rw-r--r--filter/source/graphicfilter/eras/eras.cxx29
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx30
-rw-r--r--filter/source/graphicfilter/expm/expm.cxx29
-rw-r--r--filter/source/graphicfilter/idxf/idxf.cxx29
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx27
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx27
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx27
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx28
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx27
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx26
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx26
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx27
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx27
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx28
-rw-r--r--filter/source/msfilter/escherex.cxx9
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/msfilter/msvbahelper.cxx83
-rw-r--r--filter/source/msfilter/svxmsbas.cxx24
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx8
26 files changed, 79 insertions, 636 deletions
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 93f9f5ec0b15..349f0a8bd7ba 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -599,31 +599,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-// ------------------------------------------------------------------------
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 5ef86b9c1b98..8e8d03a22561 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -2620,29 +2620,3 @@ extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index fe8dc77fc704..8786f2983a56 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -240,33 +240,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-// ------------------------------------------------------------------------
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index 89fbc9929ab0..93da8ff48b7a 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -265,33 +265,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-// ------------------------------------------------------------------------
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 7e81077e3810..699c966ea109 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -2356,32 +2356,3 @@ extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-
-
-//=============================== fuer Windows ==============================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index bef9ce9d3077..d65a81ce98a1 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -272,34 +272,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-#ifndef GCC
-#endif
-
-// ------------------------------------------------------------------------
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 5e221b58c72e..4db7093e81a5 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2765,29 +2765,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index 845dbf6ff83a..cb9005fdf0eb 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -286,32 +286,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
return aRASWriter.WriteRAS( rGraphic, rStream, pFilterConfigItem );
}
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index 0e71141eb812..af3142806a12 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -616,33 +616,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
return TIFFWriter().WriteTIFF( rGraphic, rStream, pFilterConfigItem );
}
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx
index cd05331e5ade..083fb0f2f7b3 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -271,32 +271,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
return aXPMWriter.WriteXPM( rGraphic, rStream, pFilterConfigItem );
}
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/graphicfilter/idxf/idxf.cxx
index 149f4c2feb78..da8f830d32d5 100644
--- a/filter/source/graphicfilter/idxf/idxf.cxx
+++ b/filter/source/graphicfilter/idxf/idxf.cxx
@@ -51,32 +51,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return TRUE;
}
-
-//============================= fuer Windows ==================================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
-
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 097fc83e35fe..caadcd4f3cdd 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -742,30 +742,3 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
return ( bRetValue );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 6cab0cdc4e18..e0ffce9c6081 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2755,30 +2755,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 6b83fc1021c7..80c825c80791 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -536,30 +536,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aPBMReader.ReadPBM( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 0d44993c252d..0b0b56acc5e5 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -392,31 +392,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aPCDReader.ReadPCD( rStream, rGraphic, pConfigItem );
}
-//============================= fuer Windows ==================================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
-
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 02c552744299..ca77be58a02e 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -429,30 +429,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return nRetValue;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index d1af028149b7..91366b752de4 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1909,29 +1909,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport( SvStream& rIStm, Graphic & rGraph
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 70cd1ab13f29..5a52c17956ed 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -735,29 +735,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aPSDReader.ReadPSD( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 6255dc486537..c20a85354471 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -354,30 +354,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aRASReader.ReadRAS( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 5dcb5f82ccab..38b97a025b16 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -729,30 +729,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aTGAReader.ReadTGA( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 5ad400fc3149..f10b8a15f3ef 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1312,31 +1312,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return TRUE;
}
-//============================= fuer Windows ==================================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
-
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 2ad33b1e6195..82b0480a3d0c 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -94,9 +94,7 @@
#include <vcl/virdev.hxx>
#include <rtl/crc.h>
#include <vos/xception.hxx>
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
-#endif
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -2094,6 +2092,13 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape,
aEquation.nPara[ 0 ] = 1; // hoping that this will not break anything
rEquations.push_back( aEquation );
}
+ catch ( ... )
+ {
+ EnhancedCustomShapeEquation aEquation; // #i112309# EnhancedCustomShape::Parse error
+ aEquation.nOperation = 0; // not catched on linux platform
+ aEquation.nPara[ 0 ] = 1;
+ rEquations.push_back( aEquation );
+ }
rEquationOrder.push_back( rEquations.size() - 1 );
}
// now updating our old equation indices, they are marked with a bit in the hiword of nOperation
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 05411501218e..29874b933d85 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -128,9 +128,7 @@
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentbroker.hxx>
#include <vos/xception.hxx>
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
-#endif
#include "svx/EnhancedCustomShapeTypeNames.hxx"
#include "svx/EnhancedCustomShapeGeometry.hxx"
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
@@ -5373,8 +5371,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aSet.Put( SdrEdgeNode2VertDistItem( n2VertDist ) );
((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly );
+ pRet->SetMergedItemSet( aSet );
}
- pRet->SetMergedItemSet( aSet );
}
}
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 18ecc5ae6530..19e93dbb791a 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
#include <tools/urlobj.hxx>
#include <osl/file.hxx>
+#include <unotools/pathoptions.hxx>
using namespace ::com::sun::star;
@@ -108,7 +109,24 @@ SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath )
}
else
{
- if ( aURL.equals( xModel->getURL() ) )
+ // sometimes just the name of the document ( without the path
+ // is used
+ bool bDocNameNoPathMatch = false;
+ if ( aURL.getLength() && aURL.indexOf( '/' ) == -1 )
+ {
+ sal_Int32 lastSlashIndex = xModel->getURL().lastIndexOf( '/' );
+ if ( lastSlashIndex > -1 )
+ {
+ bDocNameNoPathMatch = xModel->getURL().copy( lastSlashIndex + 1 ).equals( aURL );
+ if ( !bDocNameNoPathMatch )
+ {
+ rtl::OUString aTmpName = rtl::OUString::createFromAscii("'") + xModel->getURL().copy( lastSlashIndex + 1 ) + rtl::OUString::createFromAscii("'");
+ bDocNameNoPathMatch = aTmpName.equals( aURL );
+ }
+ }
+ }
+
+ if ( aURL.equals( xModel->getURL() ) || bDocNameNoPathMatch )
{
pFoundShell = pShell;
break;
@@ -221,9 +239,19 @@ VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUStrin
String sDocUrlOrPath = sMacroUrl.copy( 0, nDocSepIndex );
sMacroUrl = sMacroUrl.copy( nDocSepIndex + 1 );
OSL_TRACE("doc search, current shell is 0x%x", pShell );
- SfxObjectShell* pFoundShell = findShellForUrl( sDocUrlOrPath );
+ SfxObjectShell* pFoundShell = NULL;
+ if( bSearchGlobalTemplates )
+ {
+ SvtPathOptions aPathOpt;
+ String aAddinPath = aPathOpt.GetAddinPath();
+ if( rtl::OUString( sDocUrlOrPath ).indexOf( aAddinPath ) == 0 )
+ pFoundShell = pShell;
+ }
+ if( pFoundShell == NULL )
+ pFoundShell = findShellForUrl( sDocUrlOrPath );
OSL_TRACE("doc search, after find, found shell is 0x%x", pFoundShell );
- aRes = resolveVBAMacro( pFoundShell, sMacroUrl );
+ aRes = resolveVBAMacro( pFoundShell, sMacroUrl, bSearchGlobalTemplates );
+ return aRes;
}
else
{
@@ -337,14 +365,14 @@ VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUStrin
break;
}
}
+ aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) );
}
- aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) );
return aRes;
}
// Treat the args as possible inouts ( convertion at bottom of method )
-sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& /*aRet*/, const uno::Any& aCaller )
+sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& aRet, const uno::Any& /*aCaller*/)
{
sal_Bool bRes = sal_False;
if ( !pShell )
@@ -355,42 +383,25 @@ sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Se
uno::Sequence< uno::Any > aOutArgs;
try
- {
- uno::Reference< script::provider::XScriptProvider > xScriptProvider;
- uno::Reference< script::provider::XScriptProviderSupplier > xSPS( pShell->GetModel(), uno::UNO_QUERY_THROW );
-
- xScriptProvider.set( xSPS->getScriptProvider(), uno::UNO_QUERY_THROW );
-
- uno::Reference< script::provider::XScript > xScript( xScriptProvider->getScript( sUrl ), uno::UNO_QUERY_THROW );
-
- if ( aCaller.hasValue() )
+ { ErrCode nErr( ERRCODE_BASIC_INTERNAL_ERROR );
+ if ( pShell )
{
- uno::Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY );
- if ( xProps.is() )
+ nErr = pShell->CallXScript( sUrl,
+ aArgs, aRet, aOutArgsIndex, aOutArgs, false );
+ sal_Int32 nLen = aOutArgs.getLength();
+ // convert any out params to seem like they were inouts
+ if ( nLen )
{
- uno::Sequence< uno::Any > aCallerHack(1);
- aCallerHack[ 0 ] = aCaller;
- xProps->setPropertyValue( rtl::OUString::createFromAscii( "Caller" ), uno::makeAny( aCallerHack ) );
+ for ( sal_Int32 index=0; index < nLen; ++index )
+ {
+ sal_Int32 nOutIndex = aOutArgsIndex[ index ];
+ aArgs[ nOutIndex ] = aOutArgs[ index ];
+ }
}
}
-
-
- xScript->invoke( aArgs, aOutArgsIndex, aOutArgs );
-
- sal_Int32 nLen = aOutArgs.getLength();
- // convert any out params to seem like they were inouts
- if ( nLen )
- {
- for ( sal_Int32 index=0; index < nLen; ++index )
- {
- sal_Int32 nOutIndex = aOutArgsIndex[ index ];
- aArgs[ nOutIndex ] = aOutArgs[ index ];
- }
- }
-
- bRes = sal_True;
+ bRes = ( nErr == ERRCODE_NONE );
}
- catch ( uno::Exception& e )
+ catch ( uno::Exception& )
{
bRes = sal_False;
}
diff --git a/filter/source/msfilter/svxmsbas.cxx b/filter/source/msfilter/svxmsbas.cxx
index 49fd4a7544f3..5214b2d022c3 100644
--- a/filter/source/msfilter/svxmsbas.cxx
+++ b/filter/source/msfilter/svxmsbas.cxx
@@ -52,8 +52,8 @@ using namespace com::sun::star::awt;
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
using namespace com::sun::star::container;
using namespace com::sun::star::script;
@@ -250,13 +250,21 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
{
SFX_APP()->EnterBasicCall();
Reference<XLibraryContainer> xLibContainer = rDocSh.GetBasicContainer();
- Reference<XVBACompat> xVBACompat( xLibContainer, UNO_QUERY );
-
- if ( xVBACompat.is() && !bAsComment )
- xVBACompat->setVBACompatModeOn( sal_True );
-
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
+ if( !bAsComment ) try
+ {
+ Reference< vba::XVBACompatibility > xVBACompat( xLibContainer, UNO_QUERY_THROW );
+ xVBACompat->setVBACompatibilityMode( sal_True );
+ /* Force creation of the VBAGlobals object, each application will
+ create the right one and store it at the Basic manager. */
+ Reference< XMultiServiceFactory > xFactory( rDocSh.GetModel(), UNO_QUERY_THROW );
+ xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
+ }
+ catch( Exception& )
+ {
+ }
+
UINT16 nStreamCount = aVBA.GetNoStreams();
Reference<XNameContainer> xLib;
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
@@ -270,7 +278,7 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
}
if( xLib.is() )
{
- Reference< script::XVBAModuleInfo > xVBAModuleInfo( xLib, UNO_QUERY );
+ Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, UNO_QUERY );
Reference< container::XNameAccess > xVBACodeNamedObjectAccess;
if ( !bAsComment )
{
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 5592c331713f..0a01310b3b40 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -101,6 +101,10 @@ static OUString encodeZipUri( const OUString& rURI )
static Reference< XInterface > addFolder( Reference< XInterface >& xRootFolder, Reference< XSingleServiceFactory >& xFactory, const OUString& rName ) throw( Exception )
{
+ if ( rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+ || rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+ throw lang::IllegalArgumentException();
+
Sequence< Any > aArgs(1);
aArgs[0] <<= (sal_Bool)sal_True;
@@ -362,6 +366,10 @@ bool XMLFilterJarHelper::copyFile( Reference< XHierarchicalNameAccess > xIfc, OU
{
OUString szPackagePath( encodeZipUri( rURL.copy( sVndSunStarPackage.getLength() ) ) );
+ if ( ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+ || ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+ throw lang::IllegalArgumentException();
+
if( xIfc->hasByHierarchicalName( szPackagePath ) )
{
Reference< XActiveDataSink > xFileEntry;