summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/prj/build.lst3
-rw-r--r--extensions/source/abpilot/abpresid.hrc4
-rw-r--r--extensions/source/abpilot/abpservices.cxx3
-rw-r--r--extensions/source/abpilot/abspilot.cxx2
-rw-r--r--extensions/source/abpilot/abspilot.src9
-rw-r--r--extensions/source/bibliography/bibload.cxx4
-rw-r--r--extensions/source/bibliography/datman.cxx5
-rw-r--r--extensions/source/bibliography/general.cxx4
-rw-r--r--extensions/source/config/ldap/componentdef.cxx4
-rw-r--r--extensions/source/dbpilots/dbpservices.cxx3
-rw-r--r--extensions/source/logging/filehandler.cxx2
-rw-r--r--extensions/source/nsplugin/source/npshell.cxx4
-rw-r--r--extensions/source/ole/makefile.mk4
-rw-r--r--extensions/source/ole/oleobjw.cxx22
-rw-r--r--extensions/source/ole/oleobjw.hxx2
-rw-r--r--extensions/source/ole/servreg.cxx4
-rw-r--r--extensions/source/oooimprovecore/makefile.mk3
-rw-r--r--extensions/source/oooimprovement/errormail.cxx6
-rw-r--r--extensions/source/oooimprovement/makefile.mk3
-rw-r--r--extensions/source/oooimprovement/oooimprovement_exports.cxx4
-rw-r--r--extensions/source/plugin/base/makefile.mk4
-rw-r--r--extensions/source/plugin/base/service.cxx4
-rw-r--r--extensions/source/plugin/base/xplugin.cxx2
-rw-r--r--extensions/source/plugin/inc/plugin/impl.hxx2
-rw-r--r--extensions/source/plugin/inc/plugin/unx/plugcon.hxx6
-rw-r--r--extensions/source/plugin/unx/makefile.mk7
-rw-r--r--extensions/source/plugin/unx/npwrap.cxx4
-rw-r--r--extensions/source/preload/services.cxx3
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx3
-rw-r--r--extensions/source/propctrlr/pcrservices.cxx3
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx4
-rw-r--r--extensions/source/resource/res_services.cxx4
-rw-r--r--extensions/source/scanner/makefile.mk2
-rw-r--r--extensions/source/scanner/scnserv.cxx4
-rw-r--r--extensions/source/scanner/twain.cxx52
-rw-r--r--extensions/source/scanner/twain.hxx6
-rw-r--r--extensions/source/svg/makefile.mk67
-rw-r--r--extensions/source/svg/svgaction.cxx1461
-rw-r--r--extensions/source/svg/svgaction.hxx167
-rw-r--r--extensions/source/svg/svgcom.hxx76
-rw-r--r--extensions/source/svg/svgprinter.cxx331
-rw-r--r--extensions/source/svg/svgprinter.hxx70
-rw-r--r--extensions/source/svg/svguno.cxx101
-rw-r--r--extensions/source/svg/svgwriter.cxx174
-rw-r--r--extensions/source/svg/svgwriter.hxx63
-rw-r--r--extensions/source/update/check/updatecheck.cxx2
-rw-r--r--extensions/source/update/check/updatecheckjob.cxx6
-rw-r--r--extensions/source/update/check/updatehdl.src2
-rw-r--r--extensions/source/update/feed/updatefeed.cxx6
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx6
-rw-r--r--extensions/source/xmlextract/xmxuno.cxx4
-rw-r--r--extensions/test/ole/cpnt/cpnt.cxx4
52 files changed, 63 insertions, 2682 deletions
diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst
index 377eca327ebf..9e31422bc577 100644
--- a/extensions/prj/build.lst
+++ b/extensions/prj/build.lst
@@ -17,9 +17,8 @@ ex extensions\source\plugin\unx nmake - u ex_plunx ex_inc
ex extensions\source\plugin\util nmake - all ex_plutil ex_plbase ex_plunx.u ex_plwin.w ex_plaqua.u ex_inc NULL
ex extensions\source\macosx\spotlight nmake - u ex_mxspotlight NULL
ex extensions\source\scanner nmake - all ex_scan ex_resrc ex_inc NULL
-ex extensions\source\svg nmake - all ex_svg ex_scan ex_inc NULL
ex extensions\source\bibliography nmake - all ex_bib ex_inc NULL
-ex extensions\source\xmlextract nmake - all ex_xmlextr ex_svg ex_inc NULL
+ex extensions\source\xmlextract nmake - all ex_xmlextr ex_inc NULL
ex extensions\source\propctrlr nmake - all ex_propctrlr ex_bib ex_inc NULL
ex extensions\source\dbpilots nmake - all ex_dbpilots ex_inc NULL
ex extensions\source\abpilot nmake - all ex_abpilot ex_inc NULL
diff --git a/extensions/source/abpilot/abpresid.hrc b/extensions/source/abpilot/abpresid.hrc
index e6a648a28423..00d7992b03fa 100644
--- a/extensions/source/abpilot/abpresid.hrc
+++ b/extensions/source/abpilot/abpresid.hrc
@@ -89,7 +89,9 @@
#define RID_QRY_NOTABLES ( RID_QUERYBOX_START + 0 )
// please adjust RID_QUERYBOX_END (below) when adding new query boxes
-#define RID_QUERYBOX_END RID_QRY_NOTABLES
+#define RID_QRY_NO_EVO_GW ( RID_QUERYBOX_START + 1 )
+
+#define RID_QUERYBOX_END RID_QRY_NO_EVO_GW
//========================================================================
// untyped resources
diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx
index f71e1f352c33..2c2d86591055 100644
--- a/extensions/source/abpilot/abpservices.cxx
+++ b/extensions/source/abpilot/abpservices.cxx
@@ -56,8 +56,7 @@ extern "C" void SAL_CALL abp_initializeModule()
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
-component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment ** /*ppEnv*/
)
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index 005c736f9f7e..44b7eebff431 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -280,7 +280,7 @@ namespace abp
if ( aTables.empty() )
{
- if ( RET_YES != QueryBox( this, ModuleRes( RID_QRY_NOTABLES ) ).Execute() )
+ if ( RET_YES != QueryBox( this, ModuleRes( ( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_QRY_NO_EVO_GW : RID_QRY_NOTABLES ) ) ).Execute() )
{
// cannot ask the user, or the user chose to use this data source, though there are no tables
bAllow = sal_False;
diff --git a/extensions/source/abpilot/abspilot.src b/extensions/source/abpilot/abspilot.src
index a612a2051075..289e466ea9e7 100644
--- a/extensions/source/abpilot/abspilot.src
+++ b/extensions/source/abpilot/abspilot.src
@@ -362,6 +362,15 @@ QueryBox RID_QRY_NOTABLES
};
//........................................................................
+QueryBox RID_QRY_NO_EVO_GW
+{
+ Buttons = WB_YES_NO;
+ DefButton = WB_DEF_NO;
+
+ Message [ en-US ] = "You don't seem to have any GroupWise account configured in Evolution.\nDo you want to set it up as an address data source, anyway?";
+};
+
+//........................................................................
String RID_STR_DEFAULT_NAME
{
Text [ en-US ] = "Addresses";
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index e0d419c40d80..fc367b104b47 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -216,13 +216,13 @@ Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames_Static(vo
extern "C"
{
- void SAL_CALL component_getImplementationEnvironment(
+ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- void * SAL_CALL component_getFactory(
+ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = 0;
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index b2698154fd03..265496506a90 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -118,14 +118,13 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL)
{
xDataSource = Reference< XDataSource > (Reference< XNamingService > (xNamingContext, UNO_QUERY)->getRegisteredObject(_rURL), UNO_QUERY);
}
- catch(Exception eEx)
+ catch(Exception &)
{
- (void) eEx; // make compiler happy
OSL_FAIL("Exception caught in ODatabaseContext::getRegisteredObject()");
}
}
// build the connection from the data source
- Reference< XConnection > xConn;
+ Reference< XConnection > xConn;
if (xDataSource.is())
{
// need user/pwd for this
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index f2931d7a68cb..fd3297f29b6e 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -849,7 +849,7 @@ sal_Bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent )
if( pWindow->HasChildPathFocus() )
{ // save focused control
DBG_ASSERT( nFocused == 0xFFFF, "+BibGeneralPage::HandleShortCutKey(): more than one with focus?!" );
- DBG_ASSERT( aMatchList.size() > 0, "+BibGeneralPage::HandleShortCutKey(): push_back and no content?!" );
+ DBG_ASSERT( !aMatchList.empty(), "+BibGeneralPage::HandleShortCutKey(): push_back and no content?!" );
nFocused = aMatchList.size() - 1;
}
}
@@ -859,7 +859,7 @@ sal_Bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent )
if( bHandled )
{
- DBG_ASSERT( aMatchList.size() > 0, "*BibGeneralPage::HandleShortCutKey(): be prepared to crash..." );
+ DBG_ASSERT( !aMatchList.empty(), "*BibGeneralPage::HandleShortCutKey(): be prepared to crash..." );
if( nFocused >= ( aMatchList.size() - 1 ) )
// >=... includes 0xFFFF
diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx
index 5feeda7bec1f..f658358ff104 100644
--- a/extensions/source/config/ldap/componentdef.cxx
+++ b/extensions/source/config/ldap/componentdef.cxx
@@ -56,14 +56,14 @@ static const cppu::ImplementationEntry kImplementations_entries[] =
} ;
//------------------------------------------------------------------------------
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **aEnvTypeName,
uno_Environment** /*aEnvironment*/) {
*aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
//------------------------------------------------------------------------------
-extern "C" void *component_getFactory(const sal_Char *aImplementationName,
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *aImplementationName,
void *aServiceManager,
void *aRegistryKey) {
return cppu::component_getFactoryHelper(aImplementationName,
diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx
index 0321df3984eb..b9e78cdadadb 100644
--- a/extensions/source/dbpilots/dbpservices.cxx
+++ b/extensions/source/dbpilots/dbpservices.cxx
@@ -60,8 +60,7 @@ extern "C" void SAL_CALL dbp_initializeModule()
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
-component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment ** /*ppEnv*/
)
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index 8aef979c00c1..c8262a50a4a3 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -191,7 +191,7 @@ namespace logging
// check whether the log file already exists
::osl::DirectoryItem aFileItem;
::osl::DirectoryItem::get( m_sFileURL, aFileItem );
- ::osl::FileStatus aStatus( FileStatusMask_Validate );
+ ::osl::FileStatus aStatus( osl_FileStatus_Mask_Validate );
if ( ::osl::FileBase::E_None == aFileItem.getFileStatus( aStatus ) )
::osl::File::remove( m_sFileURL );
diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index d009774aeb25..cfa614e6f368 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -29,10 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_extensions.hxx"
-#ifdef OS2
-#define UNIX
-#endif
-
#ifdef UNIX
#define XP_UNIX 1
diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk
index 58a2cc7f0453..a9ff68118c58 100644
--- a/extensions/source/ole/makefile.mk
+++ b/extensions/source/ole/makefile.mk
@@ -79,13 +79,11 @@ SHL1STDLIBS=\
$(OLEAUT32LIB)
.IF "$(COM)"=="MSC"
-.IF "$(WINDOWS_VISTA_PSDK)"!="" || "$(CCNUMVER)"<="001399999999"
.IF "$(USE_DEBUG_RUNTIME)" != ""
SHL1STDLIBS+= $(ATL_LIB)$/atlsd.lib
.ELSE
SHL1STDLIBS+= $(ATL_LIB)$/atls.lib
.ENDIF
-.ENDIF # "$(WINDOWS_VISTA_PSDK)"!="" || "$(CCNUMVER)"<="001399999999"
.ENDIF # "$(COM)"=="MSC"
SHL1LIBS=
@@ -106,13 +104,11 @@ SHL2STDLIBS=\
$(OLEAUT32LIB)
.IF "$(COM)"=="MSC"
-.IF "$(WINDOWS_VISTA_PSDK)"!="" || "$(CCNUMVER)"<="001399999999"
.IF "$(USE_DEBUG_RUNTIME)" != ""
SHL2STDLIBS+= $(ATL_LIB)$/atlsd.lib
.ELSE
SHL2STDLIBS+= $(ATL_LIB)$/atls.lib
.ENDIF
-.ENDIF # "$(WINDOWS_VISTA_PSDK)"!="" || "$(CCNUMVER)"<="001399999999"
.ENDIF # "$(COM)"=="MSC"
SHL2LIBS=
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 2b172854b041..83a8d6ba581e 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -1371,7 +1371,6 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const ::rtl::OUString& aNa
scoped_array<CComVariant> ptrRefArgs; // referenced arguments
CComVariant * arArgs = NULL;
CComVariant * arRefArgs = NULL;
- bool bVarargParam = false;
dispparams.cArgs = aParams.getLength();
@@ -1763,8 +1762,6 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
CComVariant * arArgs = NULL;
CComVariant * arRefArgs = NULL;
sal_Int32 revIndex = 0;
- bool bVarargParam = false;
-
//Set the array of DISPIDs for named args if it is a property put operation.
//If there are other named arguments another array is set later on.
@@ -1911,24 +1908,15 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
if ( i < nUnoArgs)
anyArg= Params.getConstArray()[i];
- //Test if the current parameter is a "vararg" parameter.
- if (bVarargParam || (aFuncDesc->cParamsOpt == -1 &&
- aFuncDesc->cParams == (i + 1)))
- { //This parameter is from the variable argument list. There is no
- //type info available, except that it must be a VARIANT
- bVarargParam = true;
- }
-
unsigned short paramFlags = PARAMFLAG_FOPT | PARAMFLAG_FIN;
VARTYPE varType = VT_VARIANT;
- if ( ! bVarargParam)
+ if (aFuncDesc->cParamsOpt != -1 || aFuncDesc->cParams != (i + 1))
{
- paramFlags =
- aFuncDesc->lprgelemdescParam[i].paramdesc.wParamFlags;
- varType = getElementTypeDesc(
- & aFuncDesc->lprgelemdescParam[i].tdesc);
+ paramFlags = aFuncDesc->lprgelemdescParam[i].paramdesc.wParamFlags;
+ varType = getElementTypeDesc(&aFuncDesc->lprgelemdescParam[i].tdesc);
}
- //Make sure that there is a UNO parameter for every
+
+ // Make sure that there is a UNO parameter for every
// expected parameter. If there is no UNO parameter where the
// called function expects one, then it must be optional. Otherwise
// its a UNO programming error.
diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx
index 1297e1160ab4..9282de1596ee 100644
--- a/extensions/source/ole/oleobjw.hxx
+++ b/extensions/source/ole/oleobjw.hxx
@@ -148,7 +148,7 @@ public:
virtual ::sal_Bool SAL_CALL hasMember( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
- Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
+ Any invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
const OUString& sFuncName,
const Sequence< Any >& Params,
Sequence< sal_Int16 >& OutParamIndex,
diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx
index d69d4dab6205..b3ad741f08e4 100644
--- a/extensions/source/ole/servreg.cxx
+++ b/extensions/source/ole/servreg.cxx
@@ -74,7 +74,7 @@ Reference<XInterface> SAL_CALL OleServer_CreateInstance( const Reference<XMultiS
}
} // end namespace
-extern "C" void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = 0;
@@ -121,7 +121,7 @@ extern "C" void * SAL_CALL component_getFactory(
}
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
diff --git a/extensions/source/oooimprovecore/makefile.mk b/extensions/source/oooimprovecore/makefile.mk
index f92804dbf261..66ab6cd1090c 100644
--- a/extensions/source/oooimprovecore/makefile.mk
+++ b/extensions/source/oooimprovecore/makefile.mk
@@ -48,9 +48,6 @@ LIB1FILES= \
$(SLB)$/$(TARGET).lib \
SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-.IF "$(GUI)"=="OS2"
-SHL1TARGET=oooimpc$(DLLPOSTFIX)
-.ENDIF
SHL1STDLIBS= \
$(COMPHELPERLIB) \
diff --git a/extensions/source/oooimprovement/errormail.cxx b/extensions/source/oooimprovement/errormail.cxx
index de7ef8db0e6f..d0f6a18e620b 100644
--- a/extensions/source/oooimprovement/errormail.cxx
+++ b/extensions/source/oooimprovement/errormail.cxx
@@ -35,7 +35,7 @@
#include <rtl/string.hxx>
#include <rtl/strbuf.hxx>
-#if defined(UNIX) || defined(OS2)
+#if defined(UNIX)
#include <sys/utsname.h>
#endif
#ifdef WIN32
@@ -81,14 +81,12 @@ namespace {
return "Win32";
#elif defined UNIX
return "Unix";
- #elif defined OS2
- return "OS/2";
#else
return "Unknown";
#endif
};
-#if defined(UNIX) || defined(OS2)
+#if defined(UNIX)
static const OString getLocale()
{
const char * locale = getenv( "LC_ALL" );
diff --git a/extensions/source/oooimprovement/makefile.mk b/extensions/source/oooimprovement/makefile.mk
index 16e3f12f126c..a24707ecd13e 100644
--- a/extensions/source/oooimprovement/makefile.mk
+++ b/extensions/source/oooimprovement/makefile.mk
@@ -66,9 +66,6 @@ SHL1STDLIBS= \
$(UNOTOOLSLIB) \
SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-.IF "$(GUI)"=="OS2"
-SHL1TARGET= oooimp$(DLLPOSTFIX)
-.ENDIF
SHL1LIBS= $(SLB)$/$(TARGET).lib
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/extensions/source/oooimprovement/oooimprovement_exports.cxx b/extensions/source/oooimprovement/oooimprovement_exports.cxx
index cba715bc192d..a5dd6ffa9fd5 100644
--- a/extensions/source/oooimprovement/oooimprovement_exports.cxx
+++ b/extensions/source/oooimprovement/oooimprovement_exports.cxx
@@ -63,10 +63,10 @@ namespace
extern "C"
{
- void SAL_CALL component_getImplementationEnvironment(const sal_Char** env_type_name, uno_Environment**)
+ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char** env_type_name, uno_Environment**)
{ *env_type_name = CPPU_CURRENT_LANGUAGE_BINDING_NAME; }
- void* SAL_CALL component_getFactory(const sal_Char* pImplName, void* pServiceManager, void*)
+ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplName, void* pServiceManager, void*)
{
if ( !pServiceManager || !pImplName ) return 0;
diff --git a/extensions/source/plugin/base/makefile.mk b/extensions/source/plugin/base/makefile.mk
index 35390c6e6322..3049d9e9c0f9 100644
--- a/extensions/source/plugin/base/makefile.mk
+++ b/extensions/source/plugin/base/makefile.mk
@@ -40,10 +40,6 @@ INCPRE+=-I$(SOLARINCDIR)$/mozilla$/nspr
CDEFS+=-DOJI
.ENDIF
-.IF "$(DISABLE_XAW)" != ""
-CDEFS+=-DDISABLE_XAW
-.ENDIF
-
.IF "$(WITH_MOZILLA)" != "NO"
.IF "$(GUIBASE)"=="aqua"
diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx
index 2005f92ace4f..83d89df5d83d 100644
--- a/extensions/source/plugin/base/service.cxx
+++ b/extensions/source/plugin/base/service.cxx
@@ -58,14 +58,14 @@
using namespace cppu;
extern "C" {
- void SAL_CALL component_getImplementationEnvironment(
+ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char** ppEnvTypeName,
uno_Environment** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- void* SAL_CALL component_getFactory(
+ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pXUnoSMgr,
void* /*pXUnoKey*/
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 5afcbbf45f07..09745a69d014 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -546,7 +546,7 @@ void XPlugin_Impl::loadPlugin()
sv[0],
sv[1]
);
-#elif (defined WNT || defined OS2)
+#elif defined WNT
PluginComm* pComm = new PluginComm_Impl( m_aDescription.Mimetype,
m_aDescription.PluginName,
(HWND)pEnvData->hWnd );
diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx
index 75c8cd55922e..6b1ce4a134f5 100644
--- a/extensions/source/plugin/inc/plugin/impl.hxx
+++ b/extensions/source/plugin/inc/plugin/impl.hxx
@@ -75,8 +75,6 @@
#ifdef WNT
#include <plugin/win/sysplug.hxx>
-#elif defined(OS2)
-#include "plugin/os2/sysplug.hxx"
#elif defined(QUARTZ)
#include "plugin/aqua/sysplug.hxx"
#elif defined(UNX)
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index cada23a0f448..b98ba85260d9 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -58,11 +58,7 @@ extern "C" {
#if defined USE_MOTIF
#include <Xm/DrawingA.h>
#else
-# if defined DISABLE_XAW
-# include <X11/Composite.h>
-# else
-# include <X11/Xaw/Label.h>
-# endif
+#include <X11/Composite.h>
#endif
#include <X11/Xatom.h>
#ifndef XP_UNIX
diff --git a/extensions/source/plugin/unx/makefile.mk b/extensions/source/plugin/unx/makefile.mk
index 7ed18c291a4c..9dcdf1ace314 100644
--- a/extensions/source/plugin/unx/makefile.mk
+++ b/extensions/source/plugin/unx/makefile.mk
@@ -50,10 +50,6 @@ CDEFS+=-DOJI
.IF "$(WITH_MOZILLA)" != "NO"
-.IF "$(DISABLE_XAW)" == "TRUE"
-CDEFS+=-DDISABLE_XAW
-.ENDIF
-
SLOFILES=\
$(SLO)$/nppapi.obj \
$(SLO)$/sysplug.obj \
@@ -74,9 +70,6 @@ APP1STDLIBS= $(SALLIB)
.IF "$(OS)"=="SOLARIS" || "$(OS)"=="SCO"
APP1STDLIBS+=-lXm -lXt $(X11LINK_DYNAMIC) -ldl
.ELSE
-.IF "$(DISABLE_XAW)" != "TRUE"
-APP1STDLIBS+=-lXaw
-.ENDIF
.IF "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)"=="OPENBSD" || "$(OS)"=="DRAGONFLY"
APP1STDLIBS+= -lXt -lXext -lX11
.ELIF "$(OS)"=="AIX"
diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx
index 32daa95d512e..78a56c2e3401 100644
--- a/extensions/source/plugin/unx/npwrap.cxx
+++ b/extensions/source/plugin/unx/npwrap.cxx
@@ -125,11 +125,7 @@ Widget createSubWidget( char* /*pPluginText*/, Widget shell, XLIB_Window aParent
xmDrawingAreaWidgetClass,
#else
"",
-# if defined DISABLE_XAW
compositeWidgetClass,
-# else
- labelWidgetClass,
-# endif
#endif
shell,
XtNwidth, 200,
diff --git a/extensions/source/preload/services.cxx b/extensions/source/preload/services.cxx
index 5550786b6493..9b4b62293667 100644
--- a/extensions/source/preload/services.cxx
+++ b/extensions/source/preload/services.cxx
@@ -56,8 +56,7 @@ extern "C" void SAL_CALL preload_initializeModule()
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
-component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment ** /*ppEnv*/
)
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index ca4baaca2afb..62314f1ac7e6 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -75,6 +75,7 @@
#include <svx/svxdlg.hxx>
#include <svx/svxids.hrc>
#include <tools/diagnose_ex.h>
+#include <vcl/msgbox.hxx>
#include <map>
#include <algorithm>
@@ -942,7 +943,7 @@ namespace pcr
// DF definite problem here
// OK & Cancel seem to be both returning 0
- if ( pDialog->Execute() != 0 )
+ if ( pDialog->Execute() == RET_CANCEL )
return InteractiveSelectionResult_Cancelled;
try
diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx
index d0737e6a6753..f8818fe5f042 100644
--- a/extensions/source/propctrlr/pcrservices.cxx
+++ b/extensions/source/propctrlr/pcrservices.cxx
@@ -92,8 +92,7 @@ extern "C" void SAL_CALL pcr_initializeModule()
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
-component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment ** /*ppEnv*/
)
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index c8217a734fae..75b61bda4195 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -693,9 +693,7 @@ namespace pcr
}
if ( !pColorTable )
- {
- pColorTable = XColorTable::GetStdColorTable();
- }
+ pColorTable = &XColorTable::GetStdColorTable();
DBG_ASSERT(pColorTable, "OColorControl::OColorControl: no color table!");
diff --git a/extensions/source/resource/res_services.cxx b/extensions/source/resource/res_services.cxx
index 6e88dafc8b9d..91315d0162f0 100644
--- a/extensions/source/resource/res_services.cxx
+++ b/extensions/source/resource/res_services.cxx
@@ -54,13 +54,13 @@ namespace res
extern "C" {
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, XMultiServiceFactory * /*pServiceManager*/, void * /*pRegistryKey*/ )
{
void * pRet = 0;
diff --git a/extensions/source/scanner/makefile.mk b/extensions/source/scanner/makefile.mk
index 32112ddc8919..60d1900f0b6b 100644
--- a/extensions/source/scanner/makefile.mk
+++ b/extensions/source/scanner/makefile.mk
@@ -46,7 +46,7 @@ SLOFILES+=\
$(SLO)$/scanwin.obj
.ENDIF
-.IF "$(GUI)"=="UNX" || "$(GUI)" =="OS2"
+.IF "$(GUI)"=="UNX"
SLOFILES+=\
$(SLO)$/sane.obj \
$(SLO)$/sanedlg.obj \
diff --git a/extensions/source/scanner/scnserv.cxx b/extensions/source/scanner/scnserv.cxx
index 6f18a8ed607e..4a43eddfe85e 100644
--- a/extensions/source/scanner/scnserv.cxx
+++ b/extensions/source/scanner/scnserv.cxx
@@ -41,7 +41,7 @@ using namespace com::sun::star::registry;
// - component_getImplementationEnvironment -
// ------------------------------------------
-extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** /*ppEnv*/ )
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
@@ -50,7 +50,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char*
// - component_getFactory -
// ------------------------
-extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
{
REF( ::com::sun::star::lang::XSingleServiceFactory ) xFactory;
void* pRet = 0;
diff --git a/extensions/source/scanner/twain.cxx b/extensions/source/scanner/twain.cxx
index a1a9efc6c7f0..f60a3b18e825 100644
--- a/extensions/source/scanner/twain.cxx
+++ b/extensions/source/scanner/twain.cxx
@@ -35,9 +35,6 @@
#if defined( WNT )
#include <windows.h>
#endif
-#ifdef OS2
-#include <svpm.h>
-#endif // OS2
#include <osl/module.hxx>
#include <tools/stream.hxx>
#include <vcl/svapp.hxx>
@@ -56,9 +53,6 @@
#if defined WNT
#define TWAIN_LIBNAME "TWAIN_32.DLL"
#define TWAIN_FUNCNAME "DSM_Entry"
-#elif defined OS2
-#define TWAIN_LIBNAME "twain"
-#define TWAIN_FUNCNAME "DSM_ENTRY"
#endif
// -----------
@@ -71,18 +65,6 @@ static ImpTwain* pImpTwainInstance = NULL;
// - Procs -
// ---------
-#ifdef OS2
-
- #define PTWAINMSG QMSG*
-
- MRESULT EXPENTRY TwainWndProc( HWND hWnd, ULONG nMsg, MPARAM nParam1, MPARAM nParam2 )
- {
- return (MRESULT) TRUE;
- }
-
-
-#else // OS2
-
#define PTWAINMSG MSG*
// -------------------------------------------------------------------------
@@ -113,8 +95,6 @@ static ImpTwain* pImpTwainInstance = NULL;
}
}
-#endif // OS2
-
// ------------
// - ImpTwain -
// ------------
@@ -142,14 +122,6 @@ ImpTwain::ImpTwain( const Link& rNotifyLink ) :
strcpy( aAppIdent.ProductFamily,"Office");
strcpy( aAppIdent.ProductName, "Office");
-#ifdef OS2
-
- hAB = Sysdepen::GethAB();
- ImplFallback( TWAIN_EVENT_QUIT );
- // hTwainWnd = WinCreateWindow( HWND_DESKTOP, WC_FRAME, "dummy", 0, 0, 0, 0, 0, HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0 );
-
-#else
-
HWND hParentWnd = HWND_DESKTOP;
WNDCLASS aWc = { 0, &TwainWndProc, 0, sizeof( WNDCLASS ), GetModuleHandle( NULL ),
NULL, NULL, NULL, NULL, "TwainClass" };
@@ -157,8 +129,6 @@ ImpTwain::ImpTwain( const Link& rNotifyLink ) :
RegisterClass( &aWc );
hTwainWnd = CreateWindowEx( WS_EX_TOPMOST, aWc.lpszClassName, "TWAIN", 0, 0, 0, 0, 0, hParentWnd, NULL, aWc.hInstance, 0 );
hTwainHook = SetWindowsHookEx( WH_GETMESSAGE, &TwainMsgProc, NULL, GetCurrentThreadId() );
-
-#endif
}
// -----------------------------------------------------------------------------
@@ -269,11 +239,6 @@ void ImpTwain::ImplOpenSource()
if( ( PFUNC( &aAppIdent, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETDEFAULT, &aSrcIdent ) == TWRC_SUCCESS ) &&
( PFUNC( &aAppIdent, NULL, DG_CONTROL, DAT_IDENTITY, MSG_OPENDS, &aSrcIdent ) == TWRC_SUCCESS ) )
{
-#ifdef OS2
-
- // negotiate capabilities
-
-#else
TW_CAPABILITY aCap = { CAP_XFERCOUNT, TWON_ONEVALUE, GlobalAlloc( GHND, sizeof( TW_ONEVALUE ) ) };
TW_ONEVALUE* pVal = (TW_ONEVALUE*) GlobalLock( aCap.hContainer );
@@ -282,7 +247,6 @@ void ImpTwain::ImplOpenSource()
GlobalUnlock( aCap.hContainer );
PFUNC( &aAppIdent, &aSrcIdent, DG_CONTROL, DAT_CAPABILITY, MSG_SET, &aCap );
GlobalFree( aCap.hContainer );
-#endif
nCurState = 4;
}
@@ -387,11 +351,6 @@ void ImpTwain::ImplXfer()
case( TWRC_XFERDONE ):
{
-#ifdef OS2
-
- // get OS/2-Bitmap
-
-#else // OS2
const ULONG nSize = GlobalSize( (HGLOBAL) hDIB );
char* pBuf = (char*) GlobalLock( (HGLOBAL) hDIB );
@@ -404,7 +363,6 @@ void ImpTwain::ImplXfer()
}
GlobalFree( (HGLOBAL) hDIB );
-#endif // OS2
// set resolution of bitmap if neccessary
if ( ( nXRes != -1 ) && ( nYRes != - 1 ) && ( nWidth != - 1 ) && ( nHeight != - 1 ) )
@@ -506,14 +464,6 @@ IMPL_LINK( ImpTwain, ImplFallbackHdl, void*, pData )
IMPL_LINK( ImpTwain, ImplDestroyHdl, void*, p )
{
-#ifdef OS2
-
- if( hWndTwain )
- WinDestroyWindow( hWndTwain );
-
- // unset hook
-
-#else
if( hTwainWnd )
DestroyWindow( hTwainWnd );
@@ -521,8 +471,6 @@ IMPL_LINK( ImpTwain, ImplDestroyHdl, void*, p )
if( hTwainHook )
UnhookWindowsHookEx( hTwainHook );
-#endif
-
delete this;
pImpTwainInstance = NULL;
diff --git a/extensions/source/scanner/twain.hxx b/extensions/source/scanner/twain.hxx
index 95d6c5871bd9..84596b2bf5de 100644
--- a/extensions/source/scanner/twain.hxx
+++ b/extensions/source/scanner/twain.hxx
@@ -75,14 +75,8 @@ public:
sal_Bool ImplHandleMsg( void* pMsg );
-#ifdef OS2
- HAB hAB;
- HWND hTwainWnd;
- long hTwainHook;
-#else
HWND hTwainWnd;
HHOOK hTwainHook;
-#endif
public:
diff --git a/extensions/source/svg/makefile.mk b/extensions/source/svg/makefile.mk
deleted file mode 100644
index c46aede54920..000000000000
--- a/extensions/source/svg/makefile.mk
+++ /dev/null
@@ -1,67 +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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=extensions
-TARGET=svg
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/svgprinter.obj \
- $(SLO)$/svguno.obj \
- $(SLO)$/svgwriter.obj \
- $(SLO)$/svgaction.obj
-
-# --- Library -----------------------------------
-
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-SHL1IMPLIB=i$(SHL1TARGET)
-
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-DEF1NAME=$(SHL1TARGET)
-
-SHL1STDLIBS=\
- $(XMLOFFLIB) \
- $(VCLLIB) \
- $(TOOLSLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-SHL1LIBS= $(SLB)$/$(TARGET).lib
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/extensions/source/svg/svgaction.cxx b/extensions/source/svg/svgaction.cxx
deleted file mode 100644
index 324fefa16b6f..000000000000
--- a/extensions/source/svg/svgaction.cxx
+++ /dev/null
@@ -1,1461 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_extensions.hxx"
-
-#include "svgaction.hxx"
-#include <vcl/virdev.hxx>
-#include <vcl/cvtgrf.hxx>
-#include <vcl/metric.hxx>
-
-#undef _SVG_USE_NATIVE_TEXTDECORATION
-#undef _SVG_USE_TSPANS
-
-// -----------
-// - statics -
-// -----------
-
-static const char aXMLElemSVG[] = "svg";
-static const char aXMLElemG[] = "g";
-static const char aXMLElemDefs[] = "defs";
-static const char aXMLElemClipPath[] = "clipPath";
-static const char aXMLElemLine[] = "line";
-static const char aXMLElemRect[] = "rect";
-static const char aXMLElemEllipse[] = "ellipse";
-static const char aXMLElemPath[] = "path";
-static const char aXMLElemPolygon[] = "polygon";
-static const char aXMLElemPolyLine[] = "polyline";
-static const char aXMLElemText[] = "text";
-static const char aXMLElemTSpan[] = "tspan";
-static const char aXMLElemImage[] = "image";
-
-static const char aXMLAttrTransform[] = "transform";
-static const char aXMLAttrStyle[] = "style";
-static const char aXMLAttrId[] = "id";
-
-static const char aXMLAttrD[] = "d";
-static const char aXMLAttrX[] = "x";
-static const char aXMLAttrY[] = "y";
-static const char aXMLAttrX1[] = "x1";
-static const char aXMLAttrY1[] = "y1";
-static const char aXMLAttrX2[] = "x2";
-static const char aXMLAttrY2[] = "y2";
-static const char aXMLAttrCX[] = "cx";
-static const char aXMLAttrCY[] = "cy";
-static const char aXMLAttrRX[] = "rx";
-static const char aXMLAttrRY[] = "ry";
-static const char aXMLAttrWidth[] = "width";
-static const char aXMLAttrHeight[] = "height";
-static const char aXMLAttrPoints[] = "points";
-static const char aXMLAttrXLinkHRef[] = "xlink:href";
-
-static const sal_Unicode pBase64[] =
-{
- //0 1 2 3 4 5 6 7
- 'A','B','C','D','E','F','G','H', // 0
- 'I','J','K','L','M','N','O','P', // 1
- 'Q','R','S','T','U','V','W','X', // 2
- 'Y','Z','a','b','c','d','e','f', // 3
- 'g','h','i','j','k','l','m','n', // 4
- 'o','p','q','r','s','t','u','v', // 5
- 'w','x','y','z','0','1','2','3', // 6
- '4','5','6','7','8','9','+','/' // 7
-};
-
-// --------------
-// - FastString -
-// --------------
-
-FastString::FastString( sal_uInt32 nInitLen, sal_uInt32 nIncrement ) :
- mpBuffer( new sal_Unicode[ nInitLen * sizeof( sal_Unicode ) ] ),
- mnBufLen( nInitLen ),
- mnCurLen( 0 ),
- mnBufInc( nIncrement ),
- mnPartPos( 0 )
-{
- DBG_ASSERT( nInitLen, "invalid initial length" );
- DBG_ASSERT( nIncrement, "invalid increment" );
-}
-
-// -----------------------------------------------------------------------------
-
-FastString::FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen ) :
- mnBufInc( 2048 ),
- mnPartPos( 0 )
-{
- DBG_ASSERT( pBufferForBase64Encoding && nBufLen, "invalid arguments" );
-
- const sal_uInt32 nQuadCount = nBufLen / 3;
- const sal_uInt32 nRest = nBufLen % 3;
-
- if( nQuadCount || nRest )
- {
- mnBufLen = mnCurLen = ( ( nQuadCount + ( nRest ? 1 : 0 ) ) << 2 );
- mpBuffer = new sal_Unicode[ mnBufLen * sizeof( sal_Unicode ) ];
-
- sal_Char* pTmpSrc = pBufferForBase64Encoding;
- sal_Unicode* pTmpDst = mpBuffer;
-
- for( sal_uInt32 i = 0; i < nQuadCount; i++ )
- {
- const sal_Int32 nA = *pTmpSrc++;
- const sal_Int32 nB = *pTmpSrc++;
- const sal_Int32 nC = *pTmpSrc++;
-
- *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ];
- *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ];
- *pTmpDst++ = pBase64[ ( ( nB << 2 ) & 0x3c ) + ( ( nC >> 6 ) & 0x3 ) ];
- *pTmpDst++ = pBase64[ nC & 0x3f ];
- }
-
- if( 1 == nRest )
- {
- const sal_Int32 nA = *pTmpSrc;
-
- *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ];
- *pTmpDst++ = pBase64[ ( nA << 4 ) & 0x30 ];
- *pTmpDst++ = '=';
- *pTmpDst = '=';
- }
- else if( 2 == nRest )
- {
- const sal_Int32 nA = *pTmpSrc++;
- const sal_Int32 nB = *pTmpSrc;
-
- *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ];
- *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ];
- *pTmpDst++ = pBase64[ ( nB << 2 ) & 0x3c ];
- *pTmpDst = '=';
- }
- }
- else
- {
- mpBuffer = new sal_Unicode[ ( mnBufLen = 1 ) * sizeof( sal_Unicode ) ];
- mnCurLen = 0;
- }
-}
-
-// -----------------------------------------------------------------------------
-
-FastString::~FastString()
-{
- delete[] mpBuffer;
-}
-
-// -----------------------------------------------------------------------------
-
-FastString& FastString::operator+=( const NMSP_RTL::OUString& rStr )
-{
- if( rStr.getLength() )
- {
- if( ( mnCurLen + rStr.getLength() ) > mnBufLen )
- {
- const sal_uInt32 nNewBufLen = ( mnBufLen + ( ( ( mnCurLen + rStr.getLength() ) - mnBufLen ) / mnBufInc + 1 ) * mnBufInc );
- sal_Unicode* pNewBuffer = new sal_Unicode[ nNewBufLen * sizeof( sal_Unicode ) ];
-
- memcpy( pNewBuffer, mpBuffer, mnBufLen * sizeof( sal_Unicode ) );
- delete[] mpBuffer;
- mpBuffer = pNewBuffer;
- mnBufLen = nNewBufLen;
- }
-
- memcpy( mpBuffer + mnCurLen, rStr.getStr(), rStr.getLength() * sizeof( sal_Unicode ) );
- mnCurLen += rStr.getLength();
-
- if( maString.getLength() )
- maString = NMSP_RTL::OUString();
- }
-
- return *this;
-}
-
-// -----------------------------------------------------------------------------
-
-const NMSP_RTL::OUString& FastString::GetString() const
-{
- if( !maString.getLength() && mnCurLen )
- ( (FastString*) this )->maString = NMSP_RTL::OUString( mpBuffer, mnCurLen );
-
- return maString;
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool FastString::GetFirstPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString )
-{
- const sal_uInt32 nLength = Min( mnCurLen, nPartLen );
-
- mnPartPos = 0;
-
- if( nLength )
- {
- rPartString = NMSP_RTL::OUString( mpBuffer, nLength );
- mnPartPos = nLength;
- }
-
- return( rPartString.getLength() > 0 );
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool FastString::GetNextPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString )
-{
- if( mnPartPos < mnCurLen )
- {
- const sal_uInt32 nLength = Min( mnCurLen - mnPartPos, nPartLen );
- rPartString = NMSP_RTL::OUString( mpBuffer + mnPartPos, nLength );
- mnPartPos += nLength;
- }
- else
- rPartString = NMSP_RTL::OUString();
-
- return( rPartString.getLength() > 0 );
-}
-
-// ----------------------
-// - SVGAttributeWriter -
-// ----------------------
-
-SVGAttributeWriter::SVGAttributeWriter( SVGActionWriter& rParent, SvXMLExport& rExport ) :
- mrParent( rParent ),
- mrExport( rExport ),
- mpElemFont( NULL ),
- mpElemPaint( NULL )
-{
-}
-
-// -----------------------------------------------------------------------------
-
-SVGAttributeWriter::~SVGAttributeWriter()
-{
- delete mpElemPaint;
- delete mpElemFont;
-}
-
-// -----------------------------------------------------------------------------
-
-NMSP_RTL::OUString SVGAttributeWriter::GetFontStyle( const Font& rFont )
-{
- FastString aStyle;
-
- // font family
- aStyle += B2UCONST( "font-family:" );
- aStyle += NMSP_RTL::OUString( rFont.GetName().GetToken( 0, ';' ) );
-
- // font size
- aStyle += B2UCONST( ";" );
- aStyle += B2UCONST( "font-size:" );
- aStyle += mrParent.GetValueString( mrParent.ImplMap( Size( 0, rFont.GetHeight() ) ).Height(), mrParent.HasDoublePoints() );
-
- // font style
- if( rFont.GetItalic() != ITALIC_NONE )
- {
- aStyle += B2UCONST( ";" );
- aStyle += B2UCONST( "font-style:" );
-
- if( rFont.GetItalic() == ITALIC_OBLIQUE )
- aStyle += B2UCONST( "oblique" );
- else
- aStyle += B2UCONST( "italic" );
- }
-
- // font weight
- sal_Int32 nFontWeight;
-
- switch( rFont.GetWeight() )
- {
- case WEIGHT_THIN: nFontWeight = 100; break;
- case WEIGHT_ULTRALIGHT: nFontWeight = 200; break;
- case WEIGHT_LIGHT: nFontWeight = 300; break;
- case WEIGHT_SEMILIGHT: nFontWeight = 400; break;
- case WEIGHT_NORMAL: nFontWeight = 400; break;
- case WEIGHT_MEDIUM: nFontWeight = 500; break;
- case WEIGHT_SEMIBOLD: nFontWeight = 600; break;
- case WEIGHT_BOLD: nFontWeight = 700; break;
- case WEIGHT_ULTRABOLD: nFontWeight = 800; break;
- case WEIGHT_BLACK: nFontWeight = 900; break;
- default: nFontWeight = 400; break;
- }
-
- aStyle += B2UCONST( ";" );
- aStyle += B2UCONST( "font-weight:" );
- aStyle += NMSP_RTL::OUString::valueOf( nFontWeight );
-
- // !!!
- // font-variant
- // font-stretch
- // font-size-adjust
-
-#ifdef _SVG_USE_NATIVE_TEXTDECORATION
-
- if( rFont.GetUnderline() != UNDERLINE_NONE || rFont.GetStrikeout() != STRIKEOUT_NONE )
- {
- aStyle += B2UCONST( ";" );
- aStyle += B2UCONST( "text-decoration:" );
-
- if( rFont.GetUnderline() != UNDERLINE_NONE )
- aStyle += B2UCONST( " underline" );
-
- if( rFont.GetStrikeout() != STRIKEOUT_NONE )
- aStyle += B2UCONST( " line-through" );
- }
-
-#endif // _SVG_USE_NATIVE_TEXTDECORATION
-
- return aStyle.GetString();
-}
-
-// -----------------------------------------------------------------------------
-
-NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, const Color& rFillColor )
-{
- FastString aStyle;
-
- // line color
- aStyle += B2UCONST( "stroke:" );
-
- if( rLineColor.GetTransparency() == 255 )
- aStyle += B2UCONST( "none" );
- else
- {
- // line color value in rgb
- aStyle += B2UCONST( "rgb(" );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetRed() );
- aStyle += B2UCONST( "," );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetGreen() );
- aStyle += B2UCONST( "," );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetBlue() );
- aStyle += B2UCONST( ")" );
-
- // line color opacity in percent if neccessary
- if( rLineColor.GetTransparency() )
- {
- aStyle += B2UCONST( ";" );
- aStyle += B2UCONST( "stroke-opacity:" );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) ( ( 255 - (double) rLineColor.GetTransparency() ) / 2.55 ) );
- aStyle += B2UCONST( "%" );
- }
- }
-
- // fill color
- aStyle += B2UCONST( ";" );
- aStyle += B2UCONST( "fill:" );
-
- if( rFillColor.GetTransparency() == 255 )
- aStyle += B2UCONST( "none" );
- else
- {
- // fill color value in rgb
- aStyle += B2UCONST( "rgb(" );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetRed() );
- aStyle += B2UCONST( "," );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetGreen() );
- aStyle += B2UCONST( "," );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetBlue() );
- aStyle += B2UCONST( ")" );
-
- // fill color opacity in percent if neccessary
- if( rFillColor.GetTransparency() )
- {
- aStyle += B2UCONST( ";" );
- aStyle += B2UCONST( "fill-opacity:" );
- aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) ( ( 255 - (double) rFillColor.GetTransparency() ) / 2.55 ) );
- aStyle += B2UCONST( "%" );
- }
- }
-
- return aStyle.GetString();
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGAttributeWriter::SetFontAttr( const Font& rFont )
-{
- if( !mpElemFont || ( rFont != maCurFont ) )
- {
- delete mpElemPaint, mpElemPaint = NULL;
- delete mpElemFont;
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetFontStyle( maCurFont = rFont ) );
- mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFillColor )
-{
- if( !mpElemPaint || ( rLineColor != maCurLineColor ) || ( rFillColor != maCurFillColor ) )
- {
- delete mpElemPaint;
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetPaintStyle( maCurLineColor = rLineColor, maCurFillColor = rFillColor ) );
- mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
- }
-}
-
-// -------------------
-// - SVGActionWriter -
-// -------------------
-
-SVGActionWriter::SVGActionWriter( SvXMLExport& rExport, const GDIMetaFile& rMtf,
- VirtualDevice* pParentVDev, sal_Bool bWriteDoublePoints ) :
- mrExport( rExport ),
- mrMtf( rMtf ),
- mpContext( NULL ),
- mnCurClipId( 1 ),
- mbClipAttrChanged( sal_False ),
- mbDoublePoints( bWriteDoublePoints )
-{
- if( pParentVDev )
- {
- mpVDev = pParentVDev;
- mbDestroyVDev = sal_False;
- maTargetMapMode = mpVDev->GetMapMode();
- }
- else
- {
- mpVDev = new VirtualDevice;
- mpVDev->EnableOutput( sal_False );
- mbDestroyVDev = sal_True;
- maTargetMapMode = MAP_100TH_MM;
- }
-
- mpVDev->Push();
- mpVDev->SetMapMode( mrMtf.GetPrefMapMode() );
- ImplWriteActions( mrMtf );
- mpVDev->Pop();
-}
-
-// -----------------------------------------------------------------------------
-
-SVGActionWriter::~SVGActionWriter()
-{
- DBG_ASSERT( !mpContext, "Not all contexts are closed" );
-
- if( mbDestroyVDev )
- delete mpVDev;
-}
-
-// -----------------------------------------------------------------------------
-
-long SVGActionWriter::ImplMap( sal_Int32 nVal ) const
-{
- return ImplMap( Size( nVal, nVal ) ).Width();
-}
-
-// -----------------------------------------------------------------------------
-
-Point SVGActionWriter::ImplMap( const Point& rPt ) const
-{
- return mpVDev->LogicToLogic( rPt, mpVDev->GetMapMode(), maTargetMapMode );
-}
-
-// -----------------------------------------------------------------------------
-
-Size SVGActionWriter::ImplMap( const Size& rSz ) const
-{
- return mpVDev->LogicToLogic( rSz, mpVDev->GetMapMode(), maTargetMapMode );
-}
-
-// -----------------------------------------------------------------------------
-
-NMSP_RTL::OUString SVGActionWriter::GetValueString( sal_Int32 nVal, sal_Bool bDoublePoints )
-{
- if( !bDoublePoints )
- return NMSP_RTL::OUString::valueOf( nVal );
- else
- {
- const double fPoints = nVal * 72.0 / 2540.0;
- const sal_Int32 nInt = (sal_Int32) fPoints;
-
- return( ( NMSP_RTL::OUString::valueOf( nInt ) +=
- NMSP_RTL::OUString::valueOf( (sal_Unicode) '.' ) ) +=
- NMSP_RTL::OUString::valueOf( labs( (sal_Int32) ( ( fPoints - nInt ) * 100.0 ) ) ) );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor,
- const NMSP_RTL::OUString* pStyle )
-{
- const Point aPt1( ImplMap( rPt1 ) );
- const Point aPt2( ImplMap( rPt2 ) );
-
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX1, GetValueString( aPt1.X(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY1, GetValueString( aPt1.Y(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX2, GetValueString( aPt2.X(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY2, GetValueString( aPt2.Y(), mbDoublePoints ) );
-
- // add additional style if requested
- if( pStyle )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle );
-
- if( pLineColor )
- {
- // !!! mrExport.AddAttribute( XML_NAMESPACE_NONE, ... )
- OSL_FAIL( "SVGActionWriter::ImplWriteLine: Line color not implemented" );
- }
-
- {
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, sal_True, sal_True );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nRadY,
- const NMSP_RTL::OUString* pStyle )
-{
- const Rectangle aRect( ImplMap( rRect ) );
-
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, GetValueString( aRect.Left(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aRect.Top(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, GetValueString( aRect.GetWidth(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, GetValueString( aRect.GetHeight(), mbDoublePoints ) );
-
- if( nRadX )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, GetValueString( ImplMap( nRadX ), mbDoublePoints ) );
-
- if( nRadY )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, GetValueString( ImplMap( nRadY ), mbDoublePoints ) );
-
- // add additional style if requested
- if( pStyle )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle );
-
- {
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, sal_True, sal_True );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY,
- const NMSP_RTL::OUString* pStyle )
-{
- const Point aCenter( ImplMap( rCenter ) );
-
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, GetValueString( aCenter.X(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCY, GetValueString( aCenter.Y(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, GetValueString( ImplMap( nRadX ), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, GetValueString( ImplMap( nRadY ), mbDoublePoints ) );
-
- // add additional style if requested
- if( pStyle )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle );
-
- {
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, sal_True, sal_True );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly,
- const NMSP_RTL::OUString* pStyle )
-{
- if( rPoly.GetSize() )
- {
- if( rPoly.HasFlags() )
- ImplWritePolyPolygon( rPoly, bLineOnly, pStyle );
- else
- {
- FastString aStyle;
- FastString aPoints;
- sal_uInt16 i = 0, nSize = rPoly.GetSize();
- const NMSP_RTL::OUString aBlank( B2UCONST( " " ) );
-
- // points
- while( i < nSize )
- {
- const Point aPolyPoint( ImplMap( rPoly[ i ] ) );
-
- aPoints += GetValueString( aPolyPoint.X(), mbDoublePoints );
- aPoints += B2UCONST( "," );
- aPoints += GetValueString( aPolyPoint.Y(), mbDoublePoints );
-
- if( ++i < nSize )
- aPoints += aBlank;
- }
-
- // style
- if( bLineOnly )
- {
- aStyle += B2UCONST( "fill:none" );
-
- if( pStyle )
- {
- aStyle += B2UCONST( ";" );
- aStyle += *pStyle;
- }
- }
- else if( pStyle )
- aStyle += *pStyle;
-
- // add point attribute
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrPoints, aPoints.GetString() );
-
- // add style attribute
- if( aStyle.GetLength() )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aStyle.GetString() );
-
- {
- // write polyline/polygon element
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, bLineOnly ? aXMLElemPolyLine : aXMLElemPolygon, sal_True, sal_True );
- }
- }
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly,
- const NMSP_RTL::OUString* pStyle )
-{
- if( rPolyPoly.Count() )
- {
- if( ( rPolyPoly.Count() == 1 ) && ( rPolyPoly[ 0 ].HasFlags() == sal_False ) )
- ImplWritePolygon( rPolyPoly[ 0 ], bLineOnly, pStyle );
- else
- {
- FastString aStyle;
- FastString aPathData;
- const NMSP_RTL::OUString aBlank( B2UCONST( " " ) );
- const NMSP_RTL::OUString aComma( B2UCONST( "," ) );
- Point aPolyPoint;
-
- for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
- {
- const Polygon& rPoly = rPolyPoly[ (sal_uInt16) i ];
- sal_uInt16 n = 1, nSize = rPoly.GetSize();
-
- if( nSize > 1 )
- {
- aPathData += B2UCONST( "M " );
- aPathData += GetValueString( ( aPolyPoint = ImplMap( rPoly[ 0 ] ) ).X(), mbDoublePoints );
- aPathData += aComma;
- aPathData += GetValueString( aPolyPoint.Y(), mbDoublePoints );
- sal_Char nCurrentMode = 0;
-
- while( n < nSize )
- {
- aPathData += aBlank;
- if ( ( rPoly.GetFlags( n ) == POLY_CONTROL ) && ( ( n + 2 ) < nSize ) )
- {
- if ( nCurrentMode != 'C' )
- {
- nCurrentMode = 'C';
- aPathData += B2UCONST( "C " );
- }
- for ( int j = 0; j < 3; j++ )
- {
- if ( j )
- aPathData += aBlank;
- aPathData += GetValueString( ( aPolyPoint = ImplMap( rPoly[ n++ ] ) ).X(), mbDoublePoints );
- aPathData += aComma;
- aPathData += GetValueString( aPolyPoint.Y(), mbDoublePoints );
- }
- }
- else
- {
- if ( nCurrentMode != 'L' )
- {
- nCurrentMode = 'L';
- aPathData += B2UCONST( "L " );
- }
- aPathData += GetValueString( ( aPolyPoint = ImplMap( rPoly[ n++ ] ) ).X(), mbDoublePoints );
- aPathData += aComma;
- aPathData += GetValueString( aPolyPoint.Y(), mbDoublePoints );
- }
- }
- aPathData += B2UCONST( " Z" );
-
- if( i < ( nCount - 1 ) )
- aPathData += aBlank;
- }
- }
- if( bLineOnly )
- {
- aStyle += B2UCONST( "fill:none" );
- if( pStyle )
- aStyle += B2UCONST( ";" );
- }
- if( pStyle )
- aStyle += *pStyle;
-
- // add style attribute
- if( aStyle.GetLength() )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aStyle.GetString() );
-
- // add path data attribute
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, aPathData.GetString() );
- {
- // write polyline/polygon element
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, sal_True, sal_True );
- }
- }
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient,
- const NMSP_RTL::OUString* pStyle )
-{
- if( rPolyPoly.Count() )
- {
- SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
- FastString aClipId;
- FastString aClipStyle;
-
- aClipId += B2UCONST( "clip" );
- aClipId += NMSP_RTL::OUString::valueOf( ImplGetNextClipId() );
-
- {
- SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, sal_True, sal_True );
-
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aClipId.GetString() );
-
- {
- SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, sal_True, sal_True );
- ImplWritePolyPolygon( rPolyPoly, sal_False );
- }
- }
-
- // create new context with clippath set
- aClipStyle += B2UCONST( "clip-path:URL(#" );
- aClipStyle += aClipId.GetString();
- aClipStyle += B2UCONST( ")" );
-
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aClipStyle.GetString() );
-
- {
- GDIMetaFile aTmpMtf;
- SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
-
- mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf );
- ImplWriteActions( aTmpMtf, pStyle );
- }
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
- const sal_Int32* pDXArray, long nWidth,
- const NMSP_RTL::OUString* pStyle )
-{
- String aText( rText ); aText.EraseLeadingChars( ' ' );
- sal_uInt32 nLen = aText.Len(), i;
-
- if( nLen )
- {
- Size aNormSize;
- sal_Int32* pOwnArray;
- sal_Int32* pDX;
-
- // get text sizes
- if( pDXArray )
- {
- pOwnArray = NULL;
- aNormSize = Size( mpVDev->GetTextWidth( aText ), 0 );
- pDX = const_cast< sal_Int32* >( pDXArray );
- }
- else
- {
- pOwnArray = new sal_Int32[ nLen ];
- aNormSize = Size( mpVDev->GetTextArray( aText, pOwnArray ), 0 );
- pDX = pOwnArray;
- }
-
- if( nLen > 1 )
- {
- aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( aText.GetChar( (sal_uInt16) nLen - 1 ) );
-
- if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) )
- {
- const double fFactor = (double) nWidth / aNormSize.Width();
-
- for( i = 0; i < ( nLen - 1 ); i++ )
- pDX[ i ] = FRound( pDX[ i ] * fFactor );
- }
- }
-
- FastString aStyle;
- const Font& rFont = mpVDev->GetFont();
- const FontMetric aMetric( mpVDev->GetFontMetric() );
- Point aBaseLinePos( rPos );
- SvXMLElementExport* pTransform = NULL;
-
- // leading whitespaces erased? => adjust position
- if( nLen < rText.Len() )
- {
- aBaseLinePos.X() += mpVDev->GetTextWidth( ' ' ) * ( rText.Len() - nLen );
- }
-
- // always adjust text position to match baseline alignment
- switch( rFont.GetAlign() )
- {
- case( ALIGN_TOP ):
- aBaseLinePos.Y() += aMetric.GetAscent();
- break;
-
- case( ALIGN_BOTTOM ):
- aBaseLinePos.Y() -= aMetric.GetDescent();
- break;
-
- default:
- break;
- }
-
- // get mapped text position
- const Point aPt( ImplMap( aBaseLinePos ) );
-
- // if text is rotated, set transform at new g element
- if( rFont.GetOrientation() )
- {
- String aTransform;
-
- aTransform = NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM("translate"));
- aTransform += '(';
- aTransform += String( GetValueString( aPt.X(), mbDoublePoints ) );
- aTransform += ',';
- aTransform += String( GetValueString( aPt.Y(), mbDoublePoints ) );
- aTransform += ')';
-
- aTransform += String( NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(" rotate")) );
- aTransform += '(';
- aTransform += String( NMSP_RTL::OUString::valueOf( rFont.GetOrientation() * -0.1 ) );
- aTransform += ')';
-
- aTransform += String( NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(" translate")) );
- aTransform += '(';
- aTransform += String( GetValueString( -aPt.X(), mbDoublePoints ) );
- aTransform += ',';
- aTransform += String( GetValueString( -aPt.Y(), mbDoublePoints ) );
- aTransform += ')';
-
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
- pTransform = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
- }
-
- // add additional style if requested
- if( pStyle && pStyle->getLength() )
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle );
-
- // write text element
-#ifdef _SVG_USE_TSPANS
- if( pDXArray )
- {
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, sal_True, sal_True );
- FastString aTSpanX;
- const NMSP_RTL::OUString aSpace( ' ' );
- long i, nX, nCount;
-
- aTSpanX += GetValueString( aPt.X(), mbDoublePoints );
- aTSpanX += aSpace;
-
- for( i = 0, nX = aPt.X(), nCount = ( nLen - 1 ); i < nCount; )
- {
- aTSpanX += GetValueString( aPt.X() + pDX[ i++ ], mbDoublePoints );
- aTSpanX += aSpace;
- }
-
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, aTSpanX.GetString() );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y(), mbDoublePoints ) );
-
- {
- try
- {
- try
- {
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, sal_True, sal_True );
- mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) );
- }
- catch( ::com::sun::star::xml::sax::SAXException& )
- {
- // string seems to contain invalid characters
- }
- }
- }
- }
- else
-#endif
- {
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, GetValueString( aPt.X(), mbDoublePoints ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y(), mbDoublePoints ) );
-
- try
- {
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, sal_True, sal_True );
- mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) );
- }
- catch( ::com::sun::star::xml::sax::SAXException& )
- {
- // string seems to contain invalid characters
- }
- }
-
-#ifndef _SVG_USE_NATIVE_TEXTDECORATION
-
- // write strikeout if neccessary
- if( ( rFont.GetStrikeout() != STRIKEOUT_NONE ) || ( rFont.GetUnderline() != UNDERLINE_NONE ) )
- {
- Polygon aPoly( 4 );
- const long nLineHeight = Max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 );
-
- if( rFont.GetStrikeout() )
- {
- const long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 );
-
- aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 );
- aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y();
- aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1;
- aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y();
-
- ImplWritePolygon( aPoly, sal_False );
- }
-
- if( rFont.GetUnderline() )
- {
- const long nYLinePos = aBaseLinePos.Y() + ( nLineHeight << 1 );
-
- aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 );
- aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y();
- aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1;
- aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y();
-
- ImplWritePolygon( aPoly, sal_False );
- }
- }
-
-#endif // _SVG_USE_NATIVE_TEXTDECORATION
-
- delete[] pOwnArray;
- delete pTransform;
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
- const Point& rPt, const Size& rSz,
- const Point& rSrcPt, const Size& rSrcSz,
- const NMSP_RTL::OUString* /*pStyle*/ )
-{
- if( !!rBmpEx )
- {
- BitmapEx aBmpEx( rBmpEx );
- Point aPoint = Point();
- const Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() );
- const Rectangle aSrcRect( rSrcPt, rSrcSz );
-
- if( aSrcRect != aBmpRect )
- aBmpEx.Crop( aSrcRect );
-
- if( !!aBmpEx )
- {
- SvMemoryStream aOStm( 65535, 65535 );
-
- if( GraphicConverter::Export( aOStm, rBmpEx, CVT_PNG ) == ERRCODE_NONE )
- {
- const Point aPt( ImplMap( rPt ) );
- const Size aSz( ImplMap( rSz ) );
- FastString aImageData( (sal_Char*) aOStm.GetData(), aOStm.Tell() );
- REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( mrExport.GetDocHandler(), NMSP_UNO::UNO_QUERY );
-
- if( xExtDocHandler.is() )
- {
- static const sal_uInt32 nPartLen = 64;
- const NMSP_RTL::OUString aSpace( ' ' );
- const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) );
- NMSP_RTL::OUString aString;
- NMSP_RTL::OUString aImageString;
-
- aString = aLineFeed;
- aString += B2UCONST( "<" );
- aString += NMSP_RTL::OUString::createFromAscii( aXMLElemImage );
- aString += aSpace;
-
- aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrX );
- aString += B2UCONST( "=\"" );
- aString += GetValueString( aPt.X(), mbDoublePoints );
- aString += B2UCONST( "\" " );
-
- aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrY );
- aString += B2UCONST( "=\"" );
- aString += GetValueString( aPt.Y(), mbDoublePoints );
- aString += B2UCONST( "\" " );
-
- aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrWidth );
- aString += B2UCONST( "=\"" );
- aString += GetValueString( aSz.Width(), mbDoublePoints );
- aString += B2UCONST( "\" " );
-
- aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrHeight );
- aString += B2UCONST( "=\"" );
- aString += GetValueString( aSz.Height(), mbDoublePoints );
- aString += B2UCONST( "\" " );
-
- aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrXLinkHRef );
- aString += B2UCONST( "=\"data:image/png;base64," );
-
- if( aImageData.GetFirstPartString( nPartLen, aImageString ) )
- {
- xExtDocHandler->unknown( aString += aImageString );
-
- while( aImageData.GetNextPartString( nPartLen, aImageString ) )
- {
- xExtDocHandler->unknown( aLineFeed );
- xExtDocHandler->unknown( aImageString );
- }
- }
-
- xExtDocHandler->unknown( B2UCONST( "\"/>" ) );
- }
- }
- }
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL::OUString* pStyle )
-{
- ImplAcquireContext();
-
- for( sal_uLong i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ )
- {
- const MetaAction* pAction = rMtf.GetAction( i );
- const sal_uInt16 nType = pAction->GetType();
-
- switch( nType )
- {
- case( META_PIXEL_ACTION ):
- {
- const MetaPixelAction* pA = (const MetaPixelAction*) pAction;
-
- mpContext->SetPaintAttr( pA->GetColor(), pA->GetColor() );
- ImplWriteLine( pA->GetPoint(), pA->GetPoint(), &pA->GetColor(), pStyle );
- }
- break;
-
- case( META_POINT_ACTION ):
- {
- const MetaPointAction* pA = (const MetaPointAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() );
- ImplWriteLine( pA->GetPoint(), pA->GetPoint(), NULL, pStyle );
- }
- break;
-
- case( META_LINE_ACTION ):
- {
- const MetaLineAction* pA = (const MetaLineAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() );
- ImplWriteLine( pA->GetStartPoint(), pA->GetEndPoint(), NULL, pStyle );
- }
- break;
-
- case( META_RECT_ACTION ):
- {
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteRect( ( (const MetaRectAction*) pAction )->GetRect(), 0, 0, pStyle );
- }
- break;
-
- case( META_ROUNDRECT_ACTION ):
- {
- const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound(), pStyle );
- }
- break;
-
- case( META_ELLIPSE_ACTION ):
- {
- const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction;
- const Rectangle& rRect = pA->GetRect();
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1, pStyle );
- }
- break;
-
- case( META_ARC_ACTION ):
- case( META_PIE_ACTION ):
- case( META_CHORD_ACTION ):
- case( META_POLYGON_ACTION ):
- {
- Polygon aPoly;
-
- switch( nType )
- {
- case( META_ARC_ACTION ):
- {
- const MetaArcAction* pA = (const MetaArcAction*) pAction;
- aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC );
- }
- break;
-
- case( META_PIE_ACTION ):
- {
- const MetaPieAction* pA = (const MetaPieAction*) pAction;
- aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE );
- }
- break;
-
- case( META_CHORD_ACTION ):
- {
- const MetaChordAction* pA = (const MetaChordAction*) pAction;
- aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD );
- }
- break;
-
- case( META_POLYGON_ACTION ):
- aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon();
- break;
- }
-
- if( aPoly.GetSize() )
- {
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWritePolygon( aPoly, sal_False, pStyle );
- }
- }
- break;
-
- case( META_POLYLINE_ACTION ):
- {
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction;
- const Polygon& rPoly = pA->GetPolygon();
-
- if( rPoly.GetSize() )
- {
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWritePolygon( rPoly, sal_True, pStyle );
- }
- }
- break;
-
- case( META_POLYPOLYGON_ACTION ):
- {
- const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pAction;
- const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
-
- if( rPolyPoly.Count() )
- {
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWritePolyPolygon( rPolyPoly, sal_False, pStyle );
- }
- }
- break;
-
- case( META_GRADIENT_ACTION ):
- {
- const MetaGradientAction* pA = (const MetaGradientAction*) pAction;
- GDIMetaFile aTmpMtf;
-
- mpVDev->AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf );
- ImplWriteActions( aTmpMtf, pStyle );
- }
- break;
-
- case( META_GRADIENTEX_ACTION ):
- {
- const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction;
- ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), pStyle );
- }
- break;
-
- case META_HATCH_ACTION:
- {
- const MetaHatchAction* pA = (const MetaHatchAction*) pAction;
- GDIMetaFile aTmpMtf;
-
- mpVDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf );
- ImplWriteActions( aTmpMtf, pStyle );
- }
- break;
-
- case( META_TRANSPARENT_ACTION ):
- {
- const MetaTransparentAction* pA = (const MetaTransparentAction*) pAction;
- const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
-
- if( rPolyPoly.Count() )
- {
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWritePolyPolygon( rPolyPoly, sal_False, pStyle );
- }
- }
- break;
-
- case( META_FLOATTRANSPARENT_ACTION ):
- {
- const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
- Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
- const Size aSrcSize( aTmpMtf.GetPrefSize() );
- const Point aDestPt( pA->GetPoint() );
- const Size aDestSize( pA->GetSize() );
- const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0;
- const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0;
- long nMoveX, nMoveY;
-
- if( fScaleX != 1.0 || fScaleY != 1.0 )
- {
- aTmpMtf.Scale( fScaleX, fScaleY );
- aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY );
- }
-
- nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y();
-
- if( nMoveX || nMoveY )
- aTmpMtf.Move( nMoveX, nMoveY );
-
- mpVDev->Push();
- ImplWriteActions( aTmpMtf, pStyle );
- mpVDev->Pop();
- }
- break;
-
- case( META_EPS_ACTION ):
- {
- const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
- const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
- sal_Bool bFound = sal_False;
-
- for( sal_uLong j = 0, nCount2 = aGDIMetaFile.GetActionCount(); ( j < nCount2 ) && !bFound; j++ )
- {
- const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j );
-
- if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
- {
- bFound = sal_True;
- const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*) pSubstAct;
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteBmp( pBmpScaleAction->GetBitmap(),
- pA->GetPoint(), pA->GetSize(),
- Point(), pBmpScaleAction->GetBitmap().GetSizePixel(), pStyle );
- }
- }
- }
- break;
-
- case( META_COMMENT_ACTION ):
- {
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
- String aSkipComment;
-
- if( pA->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL )
- {
- const MetaGradientExAction* pGradAction = NULL;
- sal_Bool bDone = sal_False;
-
- while( !bDone && ( ++i < nCount ) )
- {
- pAction = rMtf.GetAction( i );
-
- if( pAction->GetType() == META_GRADIENTEX_ACTION )
- pGradAction = (const MetaGradientExAction*) pAction;
- else if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) == COMPARE_EQUAL ) )
- {
- bDone = sal_True;
- }
- }
-
- if( pGradAction )
- ImplWriteGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), pStyle );
- }
- }
- break;
-
- case( META_BMP_ACTION ):
- {
- const MetaBmpAction* pA = (const MetaBmpAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteBmp( pA->GetBitmap(),
- pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmap().GetSizePixel() ),
- Point(), pA->GetBitmap().GetSizePixel(), pStyle );
- }
- break;
-
- case( META_BMPSCALE_ACTION ):
- {
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteBmp( pA->GetBitmap(),
- pA->GetPoint(), pA->GetSize(),
- Point(), pA->GetBitmap().GetSizePixel(), pStyle );
- }
- break;
-
- case( META_BMPSCALEPART_ACTION ):
- {
- const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteBmp( pA->GetBitmap(),
- pA->GetDestPoint(), pA->GetDestSize(),
- pA->GetSrcPoint(), pA->GetSrcSize(), pStyle );
- }
- break;
-
- case( META_BMPEX_ACTION ):
- {
- const MetaBmpExAction* pA = (const MetaBmpExAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteBmp( pA->GetBitmapEx(),
- pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmapEx().GetSizePixel() ),
- Point(), pA->GetBitmapEx().GetSizePixel(), pStyle );
- }
- break;
-
- case( META_BMPEXSCALE_ACTION ):
- {
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteBmp( pA->GetBitmapEx(),
- pA->GetPoint(), pA->GetSize(),
- Point(), pA->GetBitmapEx().GetSizePixel(), pStyle );
- }
- break;
-
- case( META_BMPEXSCALEPART_ACTION ):
- {
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction;
-
- mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteBmp( pA->GetBitmapEx(),
- pA->GetDestPoint(), pA->GetDestSize(),
- pA->GetSrcPoint(), pA->GetSrcSize(), pStyle );
- }
- break;
-
- case( META_TEXT_ACTION ):
- {
- const MetaTextAction* pA = (const MetaTextAction*) pAction;
-
- mpContext->SetFontAttr( mpVDev->GetFont() );
- mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() );
- ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), NULL, 0, pStyle );
- }
- break;
-
- case( META_TEXTRECT_ACTION ):
- {
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
-
- mpContext->SetFontAttr( mpVDev->GetFont() );
- mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() );
- ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0, pStyle );
- }
- break;
-
- case( META_TEXTARRAY_ACTION ):
- {
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
- const Point aPos( ImplMap( pA->GetPoint() ) );
-
- mpContext->SetFontAttr( mpVDev->GetFont() );
- mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() );
- ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), pA->GetDXArray(), 0, pStyle );
- }
- break;
-
- case( META_STRETCHTEXT_ACTION ):
- {
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
-
- mpContext->SetFontAttr( mpVDev->GetFont() );
- mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() );
- ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), NULL, pA->GetWidth(), pStyle );
- }
- break;
-
- case( META_CLIPREGION_ACTION ):
- case( META_ISECTRECTCLIPREGION_ACTION ):
- case( META_ISECTREGIONCLIPREGION_ACTION ):
- case( META_MOVECLIPREGION_ACTION ):
- {
- ( (MetaAction*) pAction )->Execute( mpVDev );
- mbClipAttrChanged = sal_True;
- }
- break;
-
- case( META_REFPOINT_ACTION ):
- case( META_MAPMODE_ACTION ):
- case( META_LINECOLOR_ACTION ):
- case( META_FILLCOLOR_ACTION ):
- case( META_TEXTLINECOLOR_ACTION ):
- case( META_TEXTFILLCOLOR_ACTION ):
- case( META_TEXTCOLOR_ACTION ):
- case( META_TEXTALIGN_ACTION ):
- case( META_FONT_ACTION ):
- case( META_PUSH_ACTION ):
- case( META_POP_ACTION ):
- {
- ( (MetaAction*) pAction )->Execute( mpVDev );
- }
- break;
-
- case( META_RASTEROP_ACTION ):
- case( META_MASK_ACTION ):
- case( META_MASKSCALE_ACTION ):
- case( META_MASKSCALEPART_ACTION ):
- case( META_WALLPAPER_ACTION ):
- case( META_TEXTLINE_ACTION ):
- case( META_LAYOUTMODE_ACTION ):
- {
- // !!! >>> we don't want to support these actions
- }
- break;
-
-#ifdef DBG_UTIL
- default :
- ByteString aDbgOut( "SVGActionWriter::ImplWriteActions: unsupported MetaAction #" );
- aDbgOut.Append( ByteString::CreateFromInt32( nType ) );
- OSL_FAIL( aDbgOut.GetBuffer() );
- break;
-#endif
- }
- }
-
- ImplReleaseContext();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/svg/svgaction.hxx b/extensions/source/svg/svgaction.hxx
deleted file mode 100644
index 309d20aec6b4..000000000000
--- a/extensions/source/svg/svgaction.hxx
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SVGACTION_HXX
-#define _SVGACTION_HXX
-
-#include "svgcom.hxx"
-
-// --------------
-// - FastString -
-// --------------
-
-class FastString
-{
-private:
-
- NMSP_RTL::OUString maString;
- sal_Unicode* mpBuffer;
- sal_uInt32 mnBufLen;
- sal_uInt32 mnCurLen;
- sal_uInt32 mnBufInc;
- sal_uInt32 mnPartPos;
-
-public:
-
- FastString( sal_uInt32 nInitLen = 2048, sal_uInt32 nIncrement = 2048 );
- FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen );
- ~FastString();
-
- FastString& operator+=( const NMSP_RTL::OUString& rStr );
-
- const NMSP_RTL::OUString& GetString() const;
- sal_Bool GetFirstPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString );
- sal_Bool GetNextPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString );
-
- sal_uInt32 GetLength() const { return mnCurLen; }
- void Clear() { mnCurLen = 0, maString = NMSP_RTL::OUString(); }
-};
-
-// ----------------------
-// - SVGAttributeWriter -
-// ----------------------
-
-class SVGActionWriter;
-
-class SVGAttributeWriter
-{
-private:
-
- Font maCurFont;
- Color maCurLineColor;
- Color maCurFillColor;
- SVGActionWriter& mrParent;
- SvXMLExport& mrExport;
- SvXMLElementExport* mpElemFont;
- SvXMLElementExport* mpElemPaint;
-
- SVGAttributeWriter();
-
-public:
-
- SVGAttributeWriter( SVGActionWriter& rParent, SvXMLExport& rExport );
- virtual ~SVGAttributeWriter();
-
- NMSP_RTL::OUString GetFontStyle( const Font& rFont );
- NMSP_RTL::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor );
-
- void SetFontAttr( const Font& rFont );
- void SetPaintAttr( const Color& rLineColor, const Color& rFillColor );
-};
-
-// -------------------
-// - SVGActionWriter -
-// -------------------
-
-class SVGAttributeWriter;
-class SvXMLExport;
-class GDIMetaFile;
-
-class SVGActionWriter
-{
- friend class SVGAttributeWriter;
-
-private:
-
- Stack maContextStack;
- SvXMLExport& mrExport;
- const GDIMetaFile& mrMtf;
- SVGAttributeWriter* mpContext;
- VirtualDevice* mpVDev;
- MapMode maTargetMapMode;
- sal_Int32 mnCurClipId;
- sal_Bool mbDestroyVDev;
- sal_Bool mbPaintAttrChanged;
- sal_Bool mbFontAttrChanged;
- sal_Bool mbClipAttrChanged;
- sal_Bool mbDoublePoints;
-
- SVGAttributeWriter* ImplAcquireContext() { maContextStack.Push( mpContext = new SVGAttributeWriter( *this, mrExport ) ); return mpContext; }
- void ImplReleaseContext() { delete (SVGAttributeWriter*) maContextStack.Pop(); mpContext = (SVGAttributeWriter*) maContextStack.Top(); }
-
- long ImplMap( sal_Int32 nVal ) const;
- Point ImplMap( const Point& rPt ) const;
- Size ImplMap( const Size& rSz ) const;
- inline Rectangle ImplMap( const Rectangle& rRect ) const { return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); }
-
- void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL, const NMSP_RTL::OUString* pStyle = NULL );
- void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0, const NMSP_RTL::OUString* pStyle = NULL );
- void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, const NMSP_RTL::OUString* pStyle = NULL );
- void ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL );
- void ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL );
- void ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, const NMSP_RTL::OUString* pStyle = NULL );
- void ImplWriteText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, const NMSP_RTL::OUString* pStyle = NULL );
- void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const NMSP_RTL::OUString* pStyle = NULL );
-
- void ImplCheckFontAttributes();
- void ImplCheckPaintAttributes();
-
- void ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL::OUString* pStyle = NULL );
-
- sal_Int32 ImplGetNextClipId() { return mnCurClipId++; }
-
- SVGActionWriter();
-
-public:
-
- static NMSP_RTL::OUString GetValueString( sal_Int32 nVal, sal_Bool bDoublePoints );
-
-public:
-
- SVGActionWriter( SvXMLExport& rExport, const GDIMetaFile& rMtf,
- VirtualDevice* pParentVDev = NULL,
- sal_Bool bWriteDoublePoints = sal_False );
- virtual ~SVGActionWriter();
-
- const VirtualDevice& GetVDev() const { return *mpVDev; }
- sal_Bool HasDoublePoints() const { return mbDoublePoints; }
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/svg/svgcom.hxx b/extensions/source/svg/svgcom.hxx
deleted file mode 100644
index b43beeb611e9..000000000000
--- a/extensions/source/svg/svgcom.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SVGCOM_HXX
-#define _SVGCOM_HXX
-
-#include <cppuhelper/weak.hxx>
-#include <rtl/ustring.hxx>
-#include <tools/debug.hxx>
-#include <tools/stream.hxx>
-#include <tools/string.hxx>
-#include <tools/urlobj.hxx>
-#include <tools/stack.hxx>
-#include <vcl/salbtype.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/metaact.hxx>
-
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/uno/RuntimeException.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
-#include <com/sun/star/svg/XSVGWriter.hpp>
-#include <com/sun/star/svg/XSVGPrinter.hpp>
-#include <xmloff/xmlexp.hxx>
-#include <xmloff/nmspmap.hxx>
-
-// -----------------------------------------------------------------------------
-
-#define NMSP_CPPU cppu
-#define NMSP_RTL rtl
-#define NMSP_UNO com::sun::star::uno
-#define NMSP_LANG com::sun::star::lang
-#define NMSP_SAX com::sun::star::xml::sax
-#define NMSP_SVG com::sun::star::svg
-#define NMSP_REGISTRY com::sun::star::registry
-
-
-#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj >
-#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj >
-#define ANY NMSP_UNO::Any
-#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar )))
-#define SVG_DTD_STRING B2UCONST( "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">" )
-
-#endif // _SYNCCOM_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/svg/svgprinter.cxx b/extensions/source/svg/svgprinter.cxx
deleted file mode 100644
index 288f5bac5d22..000000000000
--- a/extensions/source/svg/svgprinter.cxx
+++ /dev/null
@@ -1,331 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_extensions.hxx"
-
-#define _RMPRINTER_EXT
-
-#include "svgprinter.hxx"
-#include "svgaction.hxx"
-#include <uno/mapping.hxx>
-#include <vcl/print.hxx>
-#include <vcl/virdev.hxx>
-
-static const char aXMLElemSVG[] = "svg";
-static const char aXMLElemMetaSVG[] = "staroffice:svgElementMeta";
-static const char aXMLElemDesc[] = "desc";
-static const char aXMLElemMeta[] = "metadata";
-static const char aXMLElemRect[] = "rect";
-
-static const char aXMLAttrMetaSVGOuter[] = "isOuterElement";
-static const char aXMLAttrMetaSVGPage[] = "isPageElement";
-static const char aXMLAttrViewBox[] = "viewBox";
-static const char aXMLAttrX[] = "x";
-static const char aXMLAttrY[] = "y";
-static const char aXMLAttrWidth[] = "width";
-static const char aXMLAttrHeight[] = "height";
-
-// ----------------
-// - SVGMtfExport -
-// ----------------
-
-class SVGPrinterExport : public SvXMLExport
-{
-private:
-
- Printer maPrinter;
- VirtualDevice* mpVDev;
- SvXMLElementExport* mpOuterElement;
- sal_uInt32 mnPage;
-
- SVGPrinterExport();
-
- SvXMLElementExport* ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize );
- void ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage );
-
-protected:
-
- virtual void _ExportMeta() {}
- virtual void _ExportStyles( sal_Bool /*bUsed*/ ) {}
- virtual void _ExportAutoStyles() {}
- virtual void _ExportContent() {}
- virtual void _ExportMasterStyles() {}
- virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID ) { (void)eClass; return 0; }
-
-public:
-
- // #110680#
- SVGPrinterExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
- const REF( NMSP_SAX::XDocumentHandler )& rxHandler,
- const JobSetup& rSetup,
- const NMSP_RTL::OUString& rJobName,
- sal_uInt32 nCopies,
- sal_Bool bCollate );
-
- virtual ~SVGPrinterExport();
-
- virtual void writePage( const JobSetup& rJobSetup, const GDIMetaFile& rMtf );
-};
-
-// -----------------------------------------------------------------------------
-
-// #110680#
-SVGPrinterExport::SVGPrinterExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
- const REF( NMSP_SAX::XDocumentHandler )& rxHandler,
- const JobSetup& rSetup,
- const NMSP_RTL::OUString& rJobName,
- sal_uInt32 /*nCopies*/,
- sal_Bool /*bCollate*/ )
-: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler ),
- mpVDev( NULL ),
- mnPage( 0 )
-{
- maPrinter.SetJobSetup( rSetup );
-
- GetDocHandler()->startDocument();
-
- REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( GetDocHandler(), NMSP_UNO::UNO_QUERY );
-
- if( xExtDocHandler.is() )
- {
- NMSP_RTL::OUString aString;
- const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) );
-
- // intro
- xExtDocHandler->unknown( ( aString = SVG_DTD_STRING ) += aLineFeed );
- xExtDocHandler->unknown( ( aString = B2UCONST( "<!ELEMENT metadata (#PCDATA | staroffice:svgElementMeta)*> " ) += aLineFeed ) );
- xExtDocHandler->unknown( ( aString = B2UCONST( "<!ELEMENT staroffice:svgElementMeta ANY> " ) += aLineFeed ) );
- xExtDocHandler->unknown( ( aString = B2UCONST( "<!ATTLIST staroffice:svgElementMeta " ) += aLineFeed ) );
-
- // ATTLIST
- xExtDocHandler->unknown( ( aString = B2UCONST( "isOuterElement (true | false) \"false\" " ) += aLineFeed ) );
- xExtDocHandler->unknown( ( aString = B2UCONST( "isPageElement (true | false) \"true\"" ) += aLineFeed ) );
-
- // end of intro
- xExtDocHandler->unknown( ( aString = B2UCONST( ">" ) += aLineFeed ) );
- xExtDocHandler->unknown( ( aString = B2UCONST( "]>" ) ) );
- }
-
- // create outer element
- Size aOutputSize;
-
- mpOuterElement = ImplCreateSVGElement( rSetup, aOutputSize );
-
- // write description
- SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, sal_True, sal_True );
- NMSP_RTL::OUString aDesc( B2UCONST( "document name: " ) );
-
- GetDocHandler()->characters( aDesc += rJobName );
- delete pDescElem;
-
- // write meta attributes
- ImplWriteMetaAttr( sal_True, sal_False );
-}
-
-// -----------------------------------------------------------------------------
-
-SVGPrinterExport::~SVGPrinterExport()
-{
- delete mpOuterElement;
- GetDocHandler()->endDocument();
- delete mpVDev;
-}
-
-// -----------------------------------------------------------------------------
-
-SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize )
-{
- NMSP_RTL::OUString aAttr;
-
- delete mpVDev;
- mpVDev = new VirtualDevice;
- mpVDev->EnableOutput( sal_False );
- mpVDev->SetMapMode( MAP_100TH_MM );
- maPrinter.SetJobSetup( rSetup );
-
- rOutputSize = maPrinter.PixelToLogic( maPrinter.GetOutputSizePixel(), mpVDev->GetMapMode() );
-
- aAttr = SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, aAttr );
-
- aAttr = SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, aAttr );
-
- aAttr = B2UCONST( "0.0 0.0 " );
- aAttr += SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True );
- aAttr += B2UCONST( " " );
- aAttr += SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrViewBox, aAttr );
-
- return( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemSVG, sal_True, sal_True ) );
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGPrinterExport::ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage )
-{
- SvXMLElementExport aMetaData( *this, XML_NAMESPACE_NONE, aXMLElemMeta, sal_True, sal_True );
- NMSP_RTL::OUString aAttr;
-
- aAttr = bOuter ? B2UCONST( "true" ) : B2UCONST( "false" );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrMetaSVGOuter, aAttr );
-
- aAttr = bPage ? B2UCONST( "true" ) : B2UCONST( "false" );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrMetaSVGPage, aAttr );
-
- {
- delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemMetaSVG, sal_True, sal_True ) );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGPrinterExport::writePage( const JobSetup& rSetup, const GDIMetaFile& rMtf )
-{
- Size aOutputSize;
- NMSP_RTL::OUString aAttr;
- SvXMLElementExport* pPageElem = ImplCreateSVGElement( rSetup, aOutputSize );
-
- // write description
- SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, sal_True, sal_True );
- NMSP_RTL::OUString aDesc( B2UCONST( "page: " ) );
-
- GetDocHandler()->characters( aDesc += NMSP_RTL::OUString::valueOf( (sal_Int32) ++mnPage ) );
- delete pDescElem;
-
- // write meta attributes
- ImplWriteMetaAttr( sal_False, sal_True );
-
- // write dummy rect element
- aAttr = B2UCONST( "0.0" );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, aAttr );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, aAttr );
-
- aAttr = SVGActionWriter::GetValueString( aOutputSize.Width(), sal_True );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, aAttr );
-
- aAttr = SVGActionWriter::GetValueString( aOutputSize.Height(), sal_True );
- AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, aAttr );
-
- delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemRect, sal_True, sal_True ) );
- delete( new SVGActionWriter( *this, rMtf, mpVDev, sal_True ) );
-
- delete pPageElem;
-}
-
-// --------------
-// - SVGPrinter -
-// --------------
-
-SVGPrinter::SVGPrinter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ) :
- mxFact( rxMgr ),
- mpWriter( NULL )
-{
-}
-
-// -----------------------------------------------------------------------------
-
-SVGPrinter::~SVGPrinter()
-{
- delete mpWriter;
-}
-
-// -----------------------------------------------------------------------------
-
-
-ANY SAL_CALL SVGPrinter::queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException )
-{
- const ANY aRet( NMSP_CPPU::queryInterface( rType, static_cast< NMSP_SVG::XSVGPrinter* >( this ) ) );
-
- return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) );
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL SVGPrinter::acquire() throw()
-{
- OWeakObject::acquire();
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL SVGPrinter::release() throw()
-{
- OWeakObject::release();
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool SAL_CALL SVGPrinter::startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler,
- const SEQ( sal_Int8 )& rJobSetupSeq,
- const NMSP_RTL::OUString& rJobName,
- sal_uInt32 nCopies, sal_Bool bCollate ) throw( NMSP_UNO::RuntimeException )
-{
- const sal_Bool bRet = ( mpWriter == NULL );
-
- if( bRet )
- {
- SvMemoryStream aMemStm( (char*) rJobSetupSeq.getConstArray(), rJobSetupSeq.getLength(), STREAM_READ );
- JobSetup aJobSetup;
-
- aMemStm.SetCompressMode( COMPRESSMODE_FULL );
- aMemStm >> aJobSetup;
-
- const REF( NMSP_SAX::XDocumentHandler ) xDocumentHandler( rxHandler );
-
- // #110680#
- // mpWriter = new SVGPrinterExport( xDocumentHandler, aJobSetup, rJobName, nCopies, bCollate );
- mpWriter = new SVGPrinterExport( mxFact, xDocumentHandler, aJobSetup, rJobName, nCopies, bCollate );
- }
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL SVGPrinter::printPage( const SEQ( sal_Int8 )& rPrintPage ) throw( NMSP_UNO::RuntimeException )
-{
- SvMemoryStream aMemStm( (char*) rPrintPage.getConstArray(), rPrintPage.getLength(), STREAM_READ );
- PrinterPage aPage;
-
- aMemStm.SetCompressMode( COMPRESSMODE_FULL );
- aMemStm >> aPage;
- mpWriter->writePage( aPage.GetJobSetup(), *aPage.GetGDIMetaFile() );
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL SVGPrinter::endJob() throw( NMSP_UNO::RuntimeException )
-{
- delete mpWriter, mpWriter = NULL;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/svg/svgprinter.hxx b/extensions/source/svg/svgprinter.hxx
deleted file mode 100644
index bbc29a06b6f8..000000000000
--- a/extensions/source/svg/svgprinter.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SVGPRINTER_HXX
-#define _SVGPRINTER_HXX
-
-#include "svgcom.hxx"
-
-// -------------
-// - SVGWriter -
-// -------------
-
-class SVGPrinterExport;
-
-class SVGPrinter : public NMSP_CPPU::OWeakObject, NMSP_SVG::XSVGPrinter
-{
-private:
-
- REF( NMSP_LANG::XMultiServiceFactory ) mxFact;
- SVGPrinterExport* mpWriter;
-
- SVGPrinter();
-
-public:
-
- SVGPrinter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr );
- virtual ~SVGPrinter();
-
- // XInterface
- virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException );
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
-
- // XSVGPrinter
- virtual sal_Bool SAL_CALL startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler,
- const SEQ( sal_Int8 )& rJobSetup,
- const NMSP_RTL::OUString& rJobName,
- sal_uInt32 nCopies, sal_Bool bCollate ) throw( NMSP_UNO::RuntimeException );
- virtual void SAL_CALL printPage( const SEQ( sal_Int8 )& rPrintPage ) throw( NMSP_UNO::RuntimeException );
- virtual void SAL_CALL endJob() throw( NMSP_UNO::RuntimeException );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/svg/svguno.cxx b/extensions/source/svg/svguno.cxx
deleted file mode 100644
index 7fb81d407452..000000000000
--- a/extensions/source/svg/svguno.cxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_extensions.hxx"
-
-#include "svgcom.hxx"
-#include "svgwriter.hxx"
-#include "svgprinter.hxx"
-
-#include <cppuhelper/factory.hxx>
-#include <uno/mapping.hxx>
-
-// -------------------
-// - factory methods -
-// -------------------
-
-static REF( NMSP_UNO::XInterface ) SAL_CALL create_SVGWriter( const REF( NMSP_LANG::XMultiServiceFactory )& rxFact )
-{
- return REF( NMSP_UNO::XInterface )( *new SVGWriter( rxFact ) );
-}
-
-// -----------------------------------------------------------------------------
-
-static REF( NMSP_UNO::XInterface ) SAL_CALL create_SVGPrinter( const REF( NMSP_LANG::XMultiServiceFactory )& rxFact )
-{
- return REF( NMSP_UNO::XInterface )( *new SVGPrinter( rxFact ) );
-}
-
-// ------------------------------------------
-// - component_getImplementationEnvironment -
-// ------------------------------------------
-
-extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-// ------------------------
-// - component_getFactory -
-// ------------------------
-
-extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
-{
- REF( NMSP_LANG::XSingleServiceFactory ) xFactory;
- void* pRet = 0;
-
- if( rtl_str_compare( pImplName, "com.sun.star.comp.extensions.SVGWriter" ) == 0 )
- {
- const NMSP_RTL::OUString aServiceName( B2UCONST( "com.sun.star.svg.SVGWriter" ) );
-
- xFactory = REF( NMSP_LANG::XSingleServiceFactory )( NMSP_CPPU::createSingleFactory(
- reinterpret_cast< NMSP_LANG::XMultiServiceFactory* >( pServiceManager ),
- B2UCONST( "com.sun.star.comp.extensions.SVGWriter" ),
- create_SVGWriter, SEQ( NMSP_RTL::OUString )( &aServiceName, 1 ) ) );
- }
- else if( rtl_str_compare( pImplName, "com.sun.star.comp.extensions.SVGPrinter" ) == 0 )
- {
- const NMSP_RTL::OUString aServiceName( B2UCONST( "com.sun.star.svg.SVGPrinter" ) );
-
- xFactory = REF( NMSP_LANG::XSingleServiceFactory )( NMSP_CPPU::createSingleFactory(
- reinterpret_cast< NMSP_LANG::XMultiServiceFactory* >( pServiceManager ),
- B2UCONST( "com.sun.star.comp.extensions.SVGPrinter" ),
- create_SVGPrinter, SEQ( NMSP_RTL::OUString )( &aServiceName, 1 ) ) );
- }
-
- if( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/svg/svgwriter.cxx b/extensions/source/svg/svgwriter.cxx
deleted file mode 100644
index e89c69e4b4e1..000000000000
--- a/extensions/source/svg/svgwriter.cxx
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_extensions.hxx"
-
-#include "svgwriter.hxx"
-#include "svgaction.hxx"
-#include <uno/mapping.hxx>
-
-// ----------------
-// - SVGMtfExport -
-// ----------------
-
-class SVGMtfExport : public SvXMLExport
-{
-private:
-
- SVGMtfExport();
-
-protected:
-
- virtual void _ExportMeta() {}
- virtual void _ExportStyles( sal_Bool /*bUsed*/ ) {}
- virtual void _ExportAutoStyles() {}
- virtual void _ExportContent() {}
- virtual void _ExportMasterStyles() {}
- virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum /*eClass*/ ) { return 0; }
-
-public:
-
- SVGMtfExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
- const REF( NMSP_SAX::XDocumentHandler )& rxHandler );
-
- virtual ~SVGMtfExport();
-
- virtual void writeMtf( const GDIMetaFile& rMtf );
-};
-
-// -----------------------------------------------------------------------------
-
-SVGMtfExport::SVGMtfExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
- const REF( NMSP_SAX::XDocumentHandler )& rxHandler )
-: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler )
-{
- GetDocHandler()->startDocument();
-}
-
-// -----------------------------------------------------------------------------
-
-SVGMtfExport::~SVGMtfExport()
-{
- GetDocHandler()->endDocument();
-}
-
-// -----------------------------------------------------------------------------
-
-void SVGMtfExport::writeMtf( const GDIMetaFile& rMtf )
-{
- const Size aSize( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_MM ) );
- NMSP_RTL::OUString aAttr;
- REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( GetDocHandler(), NMSP_UNO::UNO_QUERY );
-
- if( xExtDocHandler.is() )
- xExtDocHandler->unknown( SVG_DTD_STRING );
-
- aAttr = NMSP_RTL::OUString::valueOf( aSize.Width() );
- aAttr += B2UCONST( "mm" );
- AddAttribute( XML_NAMESPACE_NONE, "width", aAttr );
-
- aAttr = NMSP_RTL::OUString::valueOf( aSize.Height() );
- aAttr += B2UCONST( "mm" );
- AddAttribute( XML_NAMESPACE_NONE, "height", aAttr );
-
- aAttr = B2UCONST( "0 0 " );
- aAttr += NMSP_RTL::OUString::valueOf( aSize.Width() * 100L );
- aAttr += B2UCONST( " " );
- aAttr += NMSP_RTL::OUString::valueOf( aSize.Height() * 100L );
- AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
-
- {
- SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", sal_True, sal_True );
- SVGActionWriter* pWriter = new SVGActionWriter( *this, rMtf );
-
- delete pWriter;
- }
-}
-
-// -------------
-// - SVGWriter -
-// -------------
-
-SVGWriter::SVGWriter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ) :
- mxFact( rxMgr )
-{
-}
-
-// -----------------------------------------------------------------------------
-
-SVGWriter::~SVGWriter()
-{
-}
-
-// -----------------------------------------------------------------------------
-
-
-ANY SAL_CALL SVGWriter::queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException )
-{
- const ANY aRet( NMSP_CPPU::queryInterface( rType, static_cast< NMSP_SVG::XSVGWriter* >( this ) ) );
-
- return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) );
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL SVGWriter::acquire() throw()
-{
- OWeakObject::acquire();
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL SVGWriter::release() throw()
-{
- OWeakObject::release();
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL SVGWriter::write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler,
- const SEQ( sal_Int8 )& rMtfSeq ) throw( NMSP_UNO::RuntimeException )
-{
- SvMemoryStream aMemStm( (char*) rMtfSeq.getConstArray(), rMtfSeq.getLength(), STREAM_READ );
- GDIMetaFile aMtf;
-
- aMemStm.SetCompressMode( COMPRESSMODE_FULL );
- aMemStm >> aMtf;
-
- const REF( NMSP_SAX::XDocumentHandler ) xDocumentHandler( rxDocHandler );
-
- SVGMtfExport* pWriter = new SVGMtfExport( mxFact, xDocumentHandler );
-
- pWriter->writeMtf( aMtf );
- delete pWriter;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/svg/svgwriter.hxx b/extensions/source/svg/svgwriter.hxx
deleted file mode 100644
index 2622f83f0182..000000000000
--- a/extensions/source/svg/svgwriter.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SVGWRITER_HXX
-#define _SVGWRITER_HXX
-
-#include "svgcom.hxx"
-
-// -------------
-// - SVGWriter -
-// -------------
-
-class SVGWriter : public NMSP_CPPU::OWeakObject, NMSP_SVG::XSVGWriter
-{
-private:
-
- REF( NMSP_LANG::XMultiServiceFactory ) mxFact;
-
- SVGWriter();
-
-public:
-
- SVGWriter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr );
- virtual ~SVGWriter();
-
- // XInterface
- virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException );
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
-
- // XSVGWriter
- virtual void SAL_CALL write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler,
- const SEQ( sal_Int8 )& rMtfSeq ) throw( NMSP_UNO::RuntimeException );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 1e0366f6de11..2a5fc808180a 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -816,7 +816,7 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues,
osl::DirectoryItem aDirectoryItem;
if( osl::DirectoryItem::E_None == osl::DirectoryItem::get(aLocalFileName, aDirectoryItem) )
{
- osl::FileStatus aFileStatus(FileStatusMask_FileSize);
+ osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileSize);
if( osl::DirectoryItem::E_None == aDirectoryItem.getFileStatus(aFileStatus) )
{
sal_Int64 nDownloadSize = aModel.getDownloadSize();
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index f6ffb0e821a7..dc94aaa08b25 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -381,16 +381,14 @@ static const cppu::ImplementationEntry kImplementations_entries[] =
//------------------------------------------------------------------------------
-extern "C" void SAL_CALL
-component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **)
{
*aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
//------------------------------------------------------------------------------
-extern "C" void *
-component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
{
return cppu::component_getFactoryHelper(
pszImplementationName,
diff --git a/extensions/source/update/check/updatehdl.src b/extensions/source/update/check/updatehdl.src
index 58f88b7e4852..6f1ae28a7384 100644
--- a/extensions/source/update/check/updatehdl.src
+++ b/extensions/source/update/check/updatehdl.src
@@ -44,7 +44,7 @@ String RID_UPDATE_STR_NO_UPD_FOUND
String RID_UPDATE_STR_UPD_FOUND
{
- Text [ en-US ] = "%PRODUCTNAME %NEXTVERSION is available.\n\nThe installed version is %PRODUCTNAME %PRODUCTVERSION.\n\nNote: Before downloading an update, please ensure that you have sufficient access rights to install it.\nA password, usually the administrator's or root password, may be required.";
+ Text [ en-US ] = "%PRODUCTNAME %NEXTVERSION is available.\n\nThe installed version is %PRODUCTNAME %PRODUCTVERSION.\n\nNote: Before downloading an update, please ensure that you have sufficient access rights to install it.\nA password, usually the administrator's or root password, may be required.";
};
String RID_UPDATE_STR_DLG_TITLE
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 7105c72cea95..b3b9596d5c0f 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -844,16 +844,14 @@ static const cppu::ImplementationEntry kImplementations_entries[] =
//------------------------------------------------------------------------------
-extern "C" void SAL_CALL
-component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **)
{
*aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
//------------------------------------------------------------------------------
-extern "C" void *
-component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
{
return cppu::component_getFactoryHelper(
pszImplementationName,
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index dbb220acae70..2acaf584a4e6 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -1044,16 +1044,14 @@ static const cppu::ImplementationEntry kImplementations_entries[] =
//------------------------------------------------------------------------------
-extern "C" void SAL_CALL
-component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **)
{
*aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
//------------------------------------------------------------------------------
-extern "C" void *
-component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
{
return cppu::component_getFactoryHelper(
pszImplementationName,
diff --git a/extensions/source/xmlextract/xmxuno.cxx b/extensions/source/xmlextract/xmxuno.cxx
index 81bd158e2f93..622b66449919 100644
--- a/extensions/source/xmlextract/xmxuno.cxx
+++ b/extensions/source/xmlextract/xmxuno.cxx
@@ -47,13 +47,13 @@ static REF( NMSP_UNO::XInterface ) SAL_CALL create_XMLExtractor( const REF( NMSP
extern "C"
{
//==================================================================================================
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = 0;
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index 2ee1e3364507..1164292bfb7b 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.cxx
@@ -369,7 +369,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/,
return sal_False;
}
-extern "C" void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
static void * pRet= NULL;
@@ -395,7 +395,7 @@ extern "C" void * SAL_CALL component_getFactory(
return pRet;
}
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;