summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-21 17:18:37 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-21 17:18:37 +0100
commit605209eda74b0b31a8da020a2dfd2bbadbb1c7d4 (patch)
treedf8a931de7a4c4b1ee5ab1f7ed5506388943ecbc
parentc931cca51fec6a327e94b22e93f0e2fb3fa1e43f (diff)
parentd646413d464dc5d6518f87daa8538cd0c600797f (diff)
removetooltypes01: Rebase to DEV300m98
-rw-r--r--basic/inc/pch/precompiled_basic.hxx2
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx7
-rwxr-xr-xbasic/source/classes/sbunoobj.cxx94
-rw-r--r--basic/source/runtime/dllmgr.cxx3
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--desktop/inc/app.hxx2
-rw-r--r--desktop/scripts/unopkg.sh15
-rw-r--r--desktop/source/app/app.cxx147
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedialog.cxx4
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx129
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.hxx17
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx33
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx33
-rw-r--r--desktop/source/deployment/registry/component/dp_compbackenddb.cxx43
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx33
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx128
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx13
-rwxr-xr-xdesktop/source/deployment/registry/dp_backend.cxx6
-rw-r--r--desktop/source/deployment/registry/dp_backenddb.cxx108
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx18
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx38
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx427
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.cxx11
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.hxx2
-rwxr-xr-xdesktop/source/deployment/registry/inc/dp_backend.h20
-rw-r--r--desktop/source/deployment/registry/inc/dp_backenddb.hxx12
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.cxx22
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/registry/package/dp_package.cxx26
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx45
-rwxr-xr-xdesktop/source/deployment/registry/sfwk/dp_sfwk.cxx17
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx36
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_shared.h18
-rw-r--r--drawinglayer/source/processor2d/vclhelperbitmaprender.cxx39
-rwxr-xr-x[-rw-r--r--]editeng/inc/pch/precompiled_editeng.hxx4
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx21
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx14
-rw-r--r--fpicker/source/office/OfficeFilePicker.hxx2
-rw-r--r--fpicker/source/unx/gnome/SalGtkFilePicker.cxx2
-rw-r--r--framework/Library_fwe.mk13
-rw-r--r--framework/Library_fwi.mk16
-rw-r--r--framework/Library_fwk.mk13
-rw-r--r--framework/Library_fwl.mk13
-rw-r--r--framework/Library_fwm.mk13
-rw-r--r--framework/inc/pch/precompiled_framework.hxx4
-rw-r--r--framework/inc/services/layoutmanager.hxx2
-rw-r--r--framework/prj/build.lst1
-rw-r--r--framework/qa/unoapi/makefile.mk48
-rw-r--r--framework/source/helper/tagwindowasmodified.cxx2
-rw-r--r--[-rwxr-xr-x]framework/source/layoutmanager/uielement.cxx39
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx2
-rw-r--r--[-rwxr-xr-x]officecfg/registry/data/org/openoffice/Office/Accelerators.xcu16
-rwxr-xr-xofficecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu2
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs55
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Draw.xcs8
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Impress.xcs49
-rw-r--r--sfx2/AllLangResTarget_sfx2.mk3
-rwxr-xr-xsfx2/Library_sfx.mk20
-rw-r--r--sfx2/inc/frmload.hxx2
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx2
-rw-r--r--sfx2/inc/sfx2/docfile.hxx1
-rw-r--r--sfx2/inc/sfx2/event.hxx1
-rw-r--r--sfx2/inc/sfx2/mnumgr.hxx2
-rw-r--r--sfx2/inc/sfx2/module.hxx2
-rw-r--r--sfx2/inc/sfx2/objsh.hxx11
-rw-r--r--sfx2/inc/sfx2/printer.hxx60
-rw-r--r--sfx2/inc/sfx2/sfxbasecontroller.hxx3
-rw-r--r--sfx2/inc/sfx2/sfxbasemodel.hxx31
-rw-r--r--sfx2/inc/sfx2/viewsh.hxx13
-rw-r--r--sfx2/prj/build.lst3
-rw-r--r--sfx2/qa/cppunit/makefile.mk86
-rw-r--r--sfx2/qa/unoapi/makefile.mk48
-rw-r--r--sfx2/source/appl/app.cxx2
-rw-r--r--sfx2/source/appl/appmain.cxx15
-rw-r--r--sfx2/source/config/config.hrc41
-rw-r--r--sfx2/source/config/config.src35
-rw-r--r--sfx2/source/config/evntconf.cxx3
-rw-r--r--sfx2/source/doc/doctempl.cxx4
-rw-r--r--sfx2/source/doc/docvor.cxx18
-rw-r--r--sfx2/source/doc/objcont.cxx50
-rw-r--r--sfx2/source/doc/objxtor.cxx25
-rwxr-xr-xsfx2/source/doc/printhelper.cxx82
-rw-r--r--sfx2/source/view/frmload.cxx40
-rw-r--r--sfx2/source/view/printer.cxx322
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx10
-rw-r--r--sfx2/source/view/viewprn.cxx155
-rw-r--r--svx/inc/pch/precompiled_svx.hxx4
-rw-r--r--svx/inc/svx/fmgridif.hxx2
-rw-r--r--svx/inc/svx/fmtools.hxx2
-rw-r--r--svx/inc/svx/unoshtxt.hxx2
-rw-r--r--svx/inc/svx/xdef.hxx3
-rw-r--r--svx/prj/makefile.mk2
-rw-r--r--svx/source/dialog/bmpmask.src4
-rw-r--r--svx/source/dialog/contdlg.src2
-rw-r--r--svx/source/dialog/optgrid.cxx12
-rw-r--r--svx/source/dialog/optgrid.src4
-rw-r--r--svx/source/fmcomp/gridcell.cxx11
-rw-r--r--svx/source/form/fmscriptingenv.cxx1
-rw-r--r--svx/source/form/fmundo.cxx3
-rw-r--r--svx/source/gallery2/gallery1.cxx2
-rw-r--r--svx/source/items/customshapeitem.cxx2
-rw-r--r--svx/source/sdr/contact/objectcontactofobjlistpainter.cxx2
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx2
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx2
-rw-r--r--svx/source/svdraw/svddrgmt.cxx38
-rw-r--r--svx/source/svdraw/svdobj.cxx6
-rw-r--r--svx/source/svdraw/svdotext.cxx4
-rw-r--r--svx/source/svdraw/svdotxtr.cxx2
-rw-r--r--svx/source/svdraw/svdview.cxx2
-rw-r--r--svx/source/unodraw/unoprov.cxx2
-rw-r--r--svx/source/unodraw/unoshtxt.cxx8
-rw-r--r--svx/source/xoutdev/xpool.cxx4
-rwxr-xr-xuui/source/iahndl.hxx2
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.cxx6
-rwxr-xr-xvbahelper/source/vbahelper/vbaeventshelperbase.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx22
-rw-r--r--xmloff/Library_xo.mk15
-rw-r--r--xmloff/Library_xof.mk15
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx15
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx30
-rw-r--r--xmloff/source/chart/transporttypes.hxx5
123 files changed, 1667 insertions, 1565 deletions
diff --git a/basic/inc/pch/precompiled_basic.hxx b/basic/inc/pch/precompiled_basic.hxx
index e8f9e004ca6a..ae45c383c74d 100644
--- a/basic/inc/pch/precompiled_basic.hxx
+++ b/basic/inc/pch/precompiled_basic.hxx
@@ -272,7 +272,7 @@
#include "vcl/timer.hxx"
#include "vcl/toolbox.hxx"
#include "vcl/window.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "vcl/wrkwin.hxx"
#include "vos/diagnose.hxx"
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index b134c0e4056a..e8fe55c2f920 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -507,6 +507,13 @@ namespace basic
// register as listener for the BasicManager being destroyed
StartListening( *_out_rpBasicManager );
+
+ // #i104876: Library container must not be modified just after
+ // creation. This happens as side effect when creating default
+ // "Standard" libraries and needs to be corrected here
+ xBasicLibs->setModified( sal_False );
+ xDialogLibs->setModified( sal_False );
+
}
//--------------------------------------------------------------------
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 625f1e00b3df..cc3c7df91ca0 100755
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1297,6 +1297,30 @@ Any sbxToUnoValue( SbxVariable* pVar )
return sbxToUnoValueImpl( pVar );
}
+
+// Funktion, um einen globalen Bezeichner im
+// UnoScope zu suchen und fuer Sbx zu wrappen
+static bool implGetTypeByName( const String& rName, Type& rRetType )
+{
+ bool bSuccess = false;
+
+ Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
+ if( xTypeAccess->hasByHierarchicalName( rName ) )
+ {
+ Any aRet = xTypeAccess->getByHierarchicalName( rName );
+ Reference< XTypeDescription > xTypeDesc;
+ aRet >>= xTypeDesc;
+
+ if( xTypeDesc.is() )
+ {
+ rRetType = Type( xTypeDesc->getTypeClass(), xTypeDesc->getName() );
+ bSuccess = true;
+ }
+ }
+ return bSuccess;
+}
+
+
// Konvertierung von Sbx nach Uno mit bekannter Zielklasse
Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty )
{
@@ -1387,6 +1411,39 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty
}
break;
+ case TypeClass_TYPE:
+ {
+ if( eBaseType == SbxOBJECT )
+ {
+ // XIdlClass?
+ Reference< XIdlClass > xIdlClass;
+
+ SbxBaseRef pObj = (SbxBase*)pVar->GetObject();
+ if( pObj && pObj->ISA(SbUnoObject) )
+ {
+ Any aUnoAny = ((SbUnoObject*)(SbxBase*)pObj)->getUnoAny();
+ aUnoAny >>= xIdlClass;
+ }
+
+ if( xIdlClass.is() )
+ {
+ ::rtl::OUString aClassName = xIdlClass->getName();
+ Type aType( xIdlClass->getTypeClass(), aClassName.getStr() );
+ aRetVal <<= aType;
+ }
+ }
+ else if( eBaseType == SbxSTRING )
+ {
+ // String representing type?
+ String aTypeName = pVar->GetString();
+ Type aType;
+ bool bSuccess = implGetTypeByName( aTypeName, aType );
+ if( bSuccess )
+ aRetVal <<= aType;
+ }
+ }
+ break;
+
/* folgende Typen lassen wir erstmal weg
case TypeClass_SERVICE: break;
case TypeClass_CLASS: break;
@@ -4237,6 +4294,8 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite
(void)pBasic;
(void)bWrite;
+ static String aTypeTypeString( RTL_CONSTASCII_USTRINGPARAM("type") );
+
// 2 parameters needed
if ( rPar.Count() != 3 )
{
@@ -4248,6 +4307,41 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite
String aTypeName = rPar.Get(1)->GetString();
SbxVariable* pVal = rPar.Get(2);
+ if( aTypeName == aTypeTypeString )
+ {
+ SbxDataType eBaseType = pVal->SbxValue::GetType();
+ String aValTypeName;
+ if( eBaseType == SbxSTRING )
+ {
+ aValTypeName = pVal->GetString();
+ }
+ else if( eBaseType == SbxOBJECT )
+ {
+ // XIdlClass?
+ Reference< XIdlClass > xIdlClass;
+
+ SbxBaseRef pObj = (SbxBase*)pVal->GetObject();
+ if( pObj && pObj->ISA(SbUnoObject) )
+ {
+ Any aUnoAny = ((SbUnoObject*)(SbxBase*)pObj)->getUnoAny();
+ aUnoAny >>= xIdlClass;
+ }
+
+ if( xIdlClass.is() )
+ aValTypeName = xIdlClass->getName();
+ }
+ Type aType;
+ bool bSuccess = implGetTypeByName( aValTypeName, aType );
+ if( bSuccess )
+ {
+ Any aTypeAny( aType );
+ SbxVariableRef refVar = rPar.Get(0);
+ SbxObjectRef xUnoAnyObject = new SbUnoAnyObject( aTypeAny );
+ refVar->PutObject( xUnoAnyObject );
+ }
+ return;
+ }
+
// Check the type
Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
Any aRet;
diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx
index 28201226333a..8cc6ce7edd82 100644
--- a/basic/source/runtime/dllmgr.cxx
+++ b/basic/source/runtime/dllmgr.cxx
@@ -206,7 +206,8 @@ SbError marshalString(
return e;
}
std::vector< char > * blob = data.newBlob();
- blob->insert(blob->begin(), str.getStr(), str.getStr() + str.getLength());
+ blob->insert(
+ blob->begin(), str.getStr(), str.getStr() + str.getLength() + 1);
*buffer = address(*blob);
data.unmarshalStrings.push_back(StringData(variable, *buffer, special));
return ERRCODE_NONE;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index de3149d7892e..1d1f1c641547 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -37,7 +37,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/sound.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/msgbox.hxx>
#include <basic/sbx.hxx>
#include <svl/zforlist.hxx>
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index e2515187e688..3b3cba11f5a0 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -65,6 +65,8 @@ class Desktop : public Application
{
friend class UserInstall;
+ void doShutdown();
+
public:
enum BootstrapError
{
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh
index 77172e549534..5020b89194d1 100644
--- a/desktop/scripts/unopkg.sh
+++ b/desktop/scripts/unopkg.sh
@@ -44,16 +44,27 @@ cd "$sd_cwd"
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
+#Recognize the "sync" option. sync must be applied without any other
+#options except bootstrap variables or the verbose option
for arg in $@
do
case "$arg" in
-env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
+ sync) OPTSYNC=true;;
+ -v) VERBOSE=true;;
+ --verbose) VERBOSE=true;;
+ *) OPTOTHER=$arg;;
esac
done
+if [ "$OPTSYNC" = "true" ] && [ -z "$OPTOTHER" ]
+then
+ JVMFWKPARAMS='-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+fi
+
# extend the ld_library_path for java: javaldx checks the sofficerc for us
if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
- my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
+ my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS $JVMFWKPARAMS \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
if [ -n "$my_path" ] ; then
LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
@@ -70,6 +81,6 @@ unset XENVIRONMENT
# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
# execute binary
-exec "$sd_prog/unopkg.bin" "$@" \
+exec "$sd_prog/unopkg.bin" "$@" "$JVMFWKPARAMS" \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 3ebcb6c3cd0d..2e1ab6ef2d84 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -202,6 +202,7 @@ static const ::rtl::OUString CFG_PATH_REG ( RTL_CONSTASCII_USTRINGP
static const ::rtl::OUString CFG_ENTRY_REGURL ( RTL_CONSTASCII_USTRINGPARAM( "URL" ));
static const ::rtl::OUString CFG_ENTRY_TEMPLATEREGURL ( RTL_CONSTASCII_USTRINGPARAM( "TemplateURL" ));
+static ::rtl::OUString getBrandSharePreregBundledPathURL();
// ----------------------------------------------------------------------------
ResMgr* Desktop::GetDesktopResManager()
@@ -578,6 +579,44 @@ static ::rtl::OUString getLastSyncFileURLFromUserInstallation()
return aTmp.makeStringAndClear();
}
+//Checks if the argument src is the folder of the help or configuration
+//backend in the prereg folder
+static bool excludeTmpFilesAndFolders(const rtl::OUString & src)
+{
+ const char helpBackend[] = "com.sun.star.comp.deployment.help.PackageRegistryBackend";
+ const char configBackend[] = "com.sun.star.comp.deployment.configuration.PackageRegistryBackend";
+ if (src.endsWithAsciiL(helpBackend, sizeof(helpBackend) - 1 )
+ || src.endsWithAsciiL(configBackend, sizeof(configBackend) - 1))
+ {
+ return true;
+ }
+ return false;
+}
+
+//If we are about to copy the contents of some special folder as determined
+//by excludeTmpFilesAndFolders, then we omit those files or folders with a name
+//derived from temporary folders.
+static bool isExcludedFileOrFolder( const rtl::OUString & name)
+{
+ char const * allowed[] = {
+ "backenddb.xml",
+ "configmgr.ini",
+ "registered_packages.db"
+ };
+
+ const unsigned int size = sizeof(allowed) / sizeof (char const *);
+ bool bExclude = true;
+ for (unsigned int i= 0; i < size; i ++)
+ {
+ ::rtl::OUString allowedName = ::rtl::OUString::createFromAscii(allowed[i]);
+ if (allowedName.equals(name))
+ {
+ bExclude = false;
+ break;
+ }
+ }
+ return bExclude;
+}
static osl::FileBase::RC copy_bundled_recursive(
const rtl::OUString& srcUnqPath,
@@ -605,6 +644,7 @@ throw()
sal_Int32 n_Mask = FileStatusMask_FileURL | FileStatusMask_FileName | FileStatusMask_Type;
osl::DirectoryItem aDirItem;
+ bool bExcludeFiles = excludeTmpFilesAndFolders(srcUnqPath);
while( err == osl::FileBase::E_None && ( next = aDir.getNextItem( aDirItem ) ) == osl::FileBase::E_None )
{
@@ -634,7 +674,12 @@ throw()
// Special treatment for "lastsychronized" file. Must not be
// copied from the bundled folder!
- if ( IsDoc && aFileName.equalsAscii( pLastSyncFileName ))
+ //Also do not copy *.tmp files and *.tmp_ folders. This affects the files/folders
+ //from the help and configuration backend
+ if ( IsDoc && (aFileName.equalsAscii( pLastSyncFileName )
+ || bExcludeFiles && isExcludedFileOrFolder(aFileName)))
+ bFilter = true;
+ else if (!IsDoc && bExcludeFiles && isExcludedFileOrFolder(aFileName))
bFilter = true;
}
@@ -1486,8 +1531,26 @@ void Desktop::AppEvent( const ApplicationEvent& rAppEvent )
HandleAppEvent( rAppEvent );
}
+struct ExecuteGlobals
+{
+ Reference < css::document::XEventListener > xGlobalBroadcaster;
+ sal_Bool bRestartRequested;
+ sal_Bool bUseSystemFileDialog;
+ std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
+ std::auto_ptr<SvtPathOptions> pPathOptions;
+
+ ExecuteGlobals()
+ : bRestartRequested( sal_False )
+ , bUseSystemFileDialog( sal_True )
+ {}
+};
+
+static ExecuteGlobals* pExecGlobals = NULL;
+
void Desktop::Main()
{
+ pExecGlobals = new ExecuteGlobals();
+
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Main" );
// Remember current context object
@@ -1545,14 +1608,8 @@ void Desktop::Main()
Reference< XMultiServiceFactory > xSMgr =
::comphelper::getProcessServiceFactory();
- std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
- std::auto_ptr<SvtPathOptions> pPathOptions;
-
Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
- sal_Bool bRestartRequested( sal_False );
- sal_Bool bUseSystemFileDialog(sal_True);
int nAcquireCount( 0 );
- Reference < css::document::XEventListener > xGlobalBroadcaster;
try
{
RegisterServices( xSMgr );
@@ -1638,7 +1695,7 @@ void Desktop::Main()
SetDisplayName( aTitle );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create SvtPathOptions and SvtLanguageOptions" );
- pPathOptions.reset( new SvtPathOptions);
+ pExecGlobals->pPathOptions.reset( new SvtPathOptions);
SetSplashScreenProgress(40);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" );
@@ -1655,7 +1712,7 @@ void Desktop::Main()
}
// create service for loadin SFX (still needed in startup)
- xGlobalBroadcaster = Reference < css::document::XEventListener >
+ pExecGlobals->xGlobalBroadcaster = Reference < css::document::XEventListener >
( xSMgr->createInstance(
DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
@@ -1711,13 +1768,13 @@ void Desktop::Main()
}
// keep a language options instance...
- pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
+ pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
- if (xGlobalBroadcaster.is())
+ if (pExecGlobals->xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;
aEvent.EventName = ::rtl::OUString::createFromAscii("OnStartApp");
- xGlobalBroadcaster->notifyEvent(aEvent);
+ pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
}
SetSplashScreenProgress(50);
@@ -1737,7 +1794,7 @@ void Desktop::Main()
}
// check whether the shutdown is caused by restart
- bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
+ pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
if ( pCmdLineArgs->IsHeadless() )
{
@@ -1745,11 +1802,11 @@ void Desktop::Main()
// headless mode relies on Application::EnableHeadlessMode()
// which does only work for VCL dialogs!!
SvtMiscOptions aMiscOptions;
- bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog();
+ pExecGlobals->bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog();
aMiscOptions.SetUseSystemFileDialog( sal_False );
}
- if ( !bRestartRequested )
+ if ( !pExecGlobals->bRestartRequested )
{
if ((!pCmdLineArgs->WantsToLoadDocument() ) &&
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
@@ -1821,10 +1878,9 @@ void Desktop::Main()
SvtAccessibilityOptions aOptions;
aOptions.SetVCLSettings();
- if ( !bRestartRequested )
+ if ( !pExecGlobals->bRestartRequested )
{
Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
-
sal_Bool bTerminateRequested = sal_False;
// Preload function depends on an initialized sfx application!
@@ -1880,9 +1936,9 @@ void Desktop::Main()
new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
// check whether the shutdown is caused by restart just before entering the Execute
- bRestartRequested = bRestartRequested || ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
+ pExecGlobals->bRestartRequested = pExecGlobals->bRestartRequested || ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
- if ( !bRestartRequested )
+ if ( !pExecGlobals->bRestartRequested )
{
// if this run of the office is triggered by restart, some additional actions should be done
DoRestartActionsIfNecessary( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoQuickstart() );
@@ -1901,44 +1957,57 @@ void Desktop::Main()
FatalError( MakeStartupErrorMessage(exAnyCfg.Message) );
}
}
+ // CAUTION: you do not necessarily get here e.g. on the Mac.
+ // please put all deinitialization code into doShutdown
+ doShutdown();
+}
- if ( bRestartRequested )
+void Desktop::doShutdown()
+{
+ if( ! pExecGlobals )
+ return;
+
+ if ( pExecGlobals->bRestartRequested )
SetRestartState();
- if (xGlobalBroadcaster.is())
+ if (pExecGlobals->xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;
aEvent.EventName = ::rtl::OUString::createFromAscii("OnCloseApp");
- xGlobalBroadcaster->notifyEvent(aEvent);
+ pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
}
- delete pResMgr;
+ delete pResMgr, pResMgr = NULL;
// Restore old value
+ CommandLineArgs* pCmdLineArgs = GetCommandLineArgs();
if ( pCmdLineArgs->IsHeadless() )
- SvtMiscOptions().SetUseSystemFileDialog( bUseSystemFileDialog );
+ SvtMiscOptions().SetUseSystemFileDialog( pExecGlobals->bUseSystemFileDialog );
// remove temp directory
RemoveTemporaryDirectory();
FlushConfiguration();
// The acceptors in the AcceptorMap must be released (in DeregisterServices)
// with the solar mutex unlocked, to avoid deadlock:
- nAcquireCount = Application::ReleaseSolarMutex();
+ ULONG nAcquireCount = Application::ReleaseSolarMutex();
DeregisterServices();
Application::AcquireSolarMutex(nAcquireCount);
tools::DeInitTestToolLib();
// be sure that path/language options gets destroyed before
// UCB is deinitialized
RTL_LOGFILE_CONTEXT_TRACE( aLog, "-> dispose path/language options" );
- pLanguageOptions.reset( 0 );
- pPathOptions.reset( 0 );
+ pExecGlobals->pLanguageOptions.reset( 0 );
+ pExecGlobals->pPathOptions.reset( 0 );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- dispose path/language options" );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "-> deinit ucb" );
::ucbhelper::ContentBroker::deinitialize();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- deinit ucb" );
+ sal_Bool bRR = pExecGlobals->bRestartRequested;
+ delete pExecGlobals, pExecGlobals = NULL;
+
RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::Main" );
- if ( bRestartRequested )
+ if ( bRR )
{
restartOnMac(true);
// wouldn't the solution be more clean if SalMain returns the exit code to the system?
@@ -2053,9 +2122,9 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r
// unfortunately this broke the QUARTZ behavior which is to always run
// in quickstart mode since Mac applications do not usually quit
// when the last document closes
- #ifndef QUARTZ
+ //#ifndef QUARTZ
if ( bQuickstart )
- #endif
+ //#endif
{
Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments(
DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ),
@@ -2123,17 +2192,6 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings, Window* )
}
hStyleSettings.SetUseImagesInMenus(bUseImagesInMenus);
- sal_uInt16 nTabStyle = hStyleSettings.GetTabControlStyle();
- nTabStyle &= ~STYLE_TABCONTROL_SINGLELINE;
- if( aAppearanceCfg.IsSingleLineTabCtrl() )
- nTabStyle |=STYLE_TABCONTROL_SINGLELINE;
-
- nTabStyle &= ~STYLE_TABCONTROL_COLOR;
- if( aAppearanceCfg.IsColoredTabCtrl() )
- nTabStyle |= STYLE_TABCONTROL_COLOR;
-
- hStyleSettings.SetTabControlStyle(nTabStyle);
-
hStyleSettings.SetDragFullOptions( nDragFullOptions );
rSettings.SetStyleSettings ( hStyleSettings );
}
@@ -3135,6 +3193,13 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
catch(const css::uno::Exception&)
{}
}
+ else if( rAppEvent.GetEvent() == "PRIVATE:DOSHUTDOWN" )
+ {
+ Desktop* pD = dynamic_cast<Desktop*>(GetpApp());
+ OSL_ENSURE( pD, "no desktop ?!?" );
+ if( pD )
+ pD->doShutdown();
+ }
}
void Desktop::OpenSplashScreen()
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 9f7271d36e2d..154736e1e056 100755
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -388,6 +388,10 @@ void UpdateDialog::Thread::execute()
uno::Reference<ucb::XCommandEnvironment>());
} catch (lang::IllegalArgumentException& ) {
OSL_ASSERT(0);
+ continue;
+ } catch (css::ucb::CommandFailedException& ) {
+ OSL_ASSERT(0);
+ continue;
}
OSL_ASSERT(extensions.getLength() == 3);
if (extensions[0].is() )
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 709cca86c631..6eb547c4e98a 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -183,12 +183,8 @@ ExtensionManager::ExtensionManager( Reference< uno::XComponentContext > const& x
::cppu::WeakComponentImplHelper1< css::deployment::XExtensionManager >(getMutex()),
m_xContext( xContext )
{
- Reference<deploy::XPackageManagerFactory> xPackageManagerFactory(
- deploy::thePackageManagerFactory::get(m_xContext));
- m_userRepository = xPackageManagerFactory->getPackageManager(OUSTR("user"));
- m_sharedRepository = xPackageManagerFactory->getPackageManager(OUSTR("shared"));
- m_bundledRepository = xPackageManagerFactory->getPackageManager(OUSTR("bundled"));
- m_tmpRepository = xPackageManagerFactory->getPackageManager(OUSTR("tmp"));
+ m_xPackageManagerFactory = deploy::thePackageManagerFactory::get(m_xContext);
+ OSL_ASSERT(m_xPackageManagerFactory.is());
m_repositoryNames.push_back(OUSTR("user"));
m_repositoryNames.push_back(OUSTR("shared"));
@@ -201,6 +197,23 @@ ExtensionManager::~ExtensionManager()
{
}
+Reference<deploy::XPackageManager> ExtensionManager::getUserRepository()
+{
+ return m_xPackageManagerFactory->getPackageManager(OUSTR("user"));
+}
+Reference<deploy::XPackageManager> ExtensionManager::getSharedRepository()
+{
+ return m_xPackageManagerFactory->getPackageManager(OUSTR("shared"));
+}
+Reference<deploy::XPackageManager> ExtensionManager::getBundledRepository()
+{
+ return m_xPackageManagerFactory->getPackageManager(OUSTR("bundled"));
+}
+Reference<deploy::XPackageManager> ExtensionManager::getTmpRepository()
+{
+ return m_xPackageManagerFactory->getPackageManager(OUSTR("tmp"));
+}
+
Reference<task::XAbortChannel> ExtensionManager::createAbortChannel()
throw (uno::RuntimeException)
{
@@ -213,11 +226,11 @@ ExtensionManager::getPackageManager(::rtl::OUString const & repository)
{
Reference<deploy::XPackageManager> xPackageManager;
if (repository.equals(OUSTR("user")))
- xPackageManager = m_userRepository;
+ xPackageManager = getUserRepository();
else if (repository.equals(OUSTR("shared")))
- xPackageManager = m_sharedRepository;
+ xPackageManager = getSharedRepository();
else if (repository.equals(OUSTR("bundled")))
- xPackageManager = m_bundledRepository;
+ xPackageManager = getBundledRepository();
else
throw lang::IllegalArgumentException(
OUSTR("No valid repository name provided."),
@@ -288,7 +301,7 @@ void ExtensionManager::addExtensionsToMap(
::std::list<Reference<deploy::XPackage> > extensionList;
try
{ //will throw an exception if the extension does not exist
- extensionList.push_back(m_userRepository->getDeployedPackage(
+ extensionList.push_back(getUserRepository()->getDeployedPackage(
identifier, fileName, Reference<ucb::XCommandEnvironment>()));
} catch(lang::IllegalArgumentException &)
{
@@ -296,7 +309,7 @@ void ExtensionManager::addExtensionsToMap(
}
try
{
- extensionList.push_back(m_sharedRepository->getDeployedPackage(
+ extensionList.push_back(getSharedRepository()->getDeployedPackage(
identifier, fileName, Reference<ucb::XCommandEnvironment>()));
} catch (lang::IllegalArgumentException &)
{
@@ -304,7 +317,7 @@ void ExtensionManager::addExtensionsToMap(
}
try
{
- extensionList.push_back(m_bundledRepository->getDeployedPackage(
+ extensionList.push_back(getBundledRepository()->getDeployedPackage(
identifier, fileName, Reference<ucb::XCommandEnvironment>()));
} catch (lang::IllegalArgumentException &)
{
@@ -508,7 +521,7 @@ Reference<deploy::XPackage> ExtensionManager::backupExtension(
if (xOldExtension.is())
{
- xBackup = m_tmpRepository->addPackage(
+ xBackup = getTmpRepository()->addPackage(
xOldExtension->getURL(), uno::Sequence<beans::NamedValue>(),
OUString(), Reference<task::XAbortChannel>(), tmpCmdEnv);
@@ -529,7 +542,7 @@ uno::Sequence< Reference<deploy::XPackageTypeInfo> >
ExtensionManager::getSupportedPackageTypes()
throw (uno::RuntimeException)
{
- return m_userRepository->getSupportedPackageTypes();
+ return getUserRepository()->getSupportedPackageTypes();
}
//Do some necessary checks and user interaction. This function does not
//aquire the extension manager mutex and that mutex must not be aquired
@@ -649,9 +662,9 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
//Determine the repository to use
Reference<deploy::XPackageManager> xPackageManager;
if (repository.equals(OUSTR("user")))
- xPackageManager = m_userRepository;
+ xPackageManager = getUserRepository();
else if (repository.equals(OUSTR("shared")))
- xPackageManager = m_sharedRepository;
+ xPackageManager = getSharedRepository();
else
throw lang::IllegalArgumentException(
OUSTR("No valid repository name provided."),
@@ -664,7 +677,7 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
getTempExtension(url, xAbortChannel, xCmdEnv);
//Make sure the extension is removed from the tmp repository in case
//of an exception
- ExtensionRemoveGuard tmpExtensionRemoveGuard(xTmpExtension, m_tmpRepository);
+ ExtensionRemoveGuard tmpExtensionRemoveGuard(xTmpExtension, getTmpRepository());
const OUString sIdentifier = dp_misc::getIdentifier(xTmpExtension);
const OUString sFileName = xTmpExtension->getName();
Reference<deploy::XPackage> xOldExtension;
@@ -708,7 +721,7 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
//the xTmpExtension
//no command environment supplied, only this class shall interact
//with the user!
- xExtensionBackup = m_tmpRepository->importExtension(
+ xExtensionBackup = getTmpRepository()->importExtension(
xOldExtension, Reference<task::XAbortChannel>(),
Reference<ucb::XCommandEnvironment>());
tmpExtensionRemoveGuard.reset(xExtensionBackup);
@@ -857,9 +870,9 @@ void ExtensionManager::removeExtension(
{
//Determine the repository to use
if (repository.equals(OUSTR("user")))
- xPackageManager = m_userRepository;
+ xPackageManager = getUserRepository();
else if (repository.equals(OUSTR("shared")))
- xPackageManager = m_sharedRepository;
+ xPackageManager = getSharedRepository();
else
throw lang::IllegalArgumentException(
OUSTR("No valid repository name provided."),
@@ -919,7 +932,7 @@ void ExtensionManager::removeExtension(
Reference<task::XAbortChannel>(),
tmpCmdEnv);
- m_tmpRepository->removePackage(
+ getTmpRepository()->removePackage(
dp_misc::getIdentifier(xExtensionBackup),
xExtensionBackup->getName(), xAbortChannel, xCmdEnv);
fireModified();
@@ -932,7 +945,7 @@ void ExtensionManager::removeExtension(
}
if (xExtensionBackup.is())
- m_tmpRepository->removePackage(
+ getTmpRepository()->removePackage(
dp_misc::getIdentifier(xExtensionBackup),
xExtensionBackup->getName(), xAbortChannel, xCmdEnv);
}
@@ -1160,13 +1173,13 @@ uno::Sequence< uno::Sequence<Reference<deploy::XPackage> > >
id2extensions mapExt;
uno::Sequence<Reference<deploy::XPackage> > userExt =
- m_userRepository->getDeployedPackages(xAbort, xCmdEnv);
+ getUserRepository()->getDeployedPackages(xAbort, xCmdEnv);
addExtensionsToMap(mapExt, userExt, OUSTR("user"));
uno::Sequence<Reference<deploy::XPackage> > sharedExt =
- m_sharedRepository->getDeployedPackages(xAbort, xCmdEnv);
+ getSharedRepository()->getDeployedPackages(xAbort, xCmdEnv);
addExtensionsToMap(mapExt, sharedExt, OUSTR("shared"));
uno::Sequence<Reference<deploy::XPackage> > bundledExt =
- m_bundledRepository->getDeployedPackages(xAbort, xCmdEnv);
+ getBundledRepository()->getDeployedPackages(xAbort, xCmdEnv);
addExtensionsToMap(mapExt, bundledExt, OUSTR("bundled"));
//copy the values of the map to a vector for sorting
@@ -1236,7 +1249,7 @@ void ExtensionManager::reinstallDeployedExtensions(
const OUString id = dp_misc::getIdentifier(extensions[ pos ]);
const OUString fileName = extensions[ pos ]->getName();
OSL_ASSERT(id.getLength());
- activateExtension(id, fileName, false, false, xAbortChannel, xCmdEnv );
+ activateExtension(id, fileName, false, true, xAbortChannel, xCmdEnv );
}
catch (lang::DisposedException &)
{
@@ -1260,6 +1273,64 @@ void ExtensionManager::reinstallDeployedExtensions(
}
}
+/** Works on the bundled repository. That is using the variables
+ BUNDLED_EXTENSIONS and BUNDLED_EXTENSIONS_USER.
+ */
+void ExtensionManager::synchronizeBundledPrereg(
+ Reference<task::XAbortChannel> const & xAbortChannel,
+ Reference<ucb::XCommandEnvironment> const & xCmdEnv )
+ throw (deploy::DeploymentException,
+ uno::RuntimeException)
+{
+ try
+ {
+ String sSynchronizingBundled(StrSyncRepository::get());
+ sSynchronizingBundled.SearchAndReplaceAllAscii( "%NAME", OUSTR("bundled"));
+ dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled);
+
+ Reference<deploy::XPackageManagerFactory> xPackageManagerFactory(
+ deploy::thePackageManagerFactory::get(m_xContext));
+
+ Reference<deploy::XPackageManager> xMgr =
+ xPackageManagerFactory->getPackageManager(OUSTR("bundled_prereg"));
+ xMgr->synchronize(xAbortChannel, xCmdEnv);
+ progressBundled.update(OUSTR("\n\n"));
+
+ uno::Sequence<Reference<deploy::XPackage> > extensions = xMgr->getDeployedPackages(
+ xAbortChannel, xCmdEnv);
+ try
+ {
+ for (sal_Int32 i = 0; i < extensions.getLength(); i++)
+ {
+ extensions[i]->registerPackage(true, xAbortChannel, xCmdEnv);
+ }
+ }
+ catch (...)
+ {
+ OSL_ASSERT(0);
+ }
+ OUString lastSyncBundled(RTL_CONSTASCII_USTRINGPARAM(
+ "$BUNDLED_EXTENSIONS_PREREG/lastsynchronized"));
+ writeLastModified(lastSyncBundled, xCmdEnv);
+
+ } catch (deploy::DeploymentException& ) {
+ throw;
+ } catch (ucb::CommandFailedException & ) {
+ throw;
+ } catch (ucb::CommandAbortedException & ) {
+ throw;
+ } catch (lang::IllegalArgumentException &) {
+ throw;
+ } catch (uno::RuntimeException &) {
+ throw;
+ } catch (...) {
+ uno::Any exc = ::cppu::getCaughtException();
+ throw deploy::DeploymentException(
+ OUSTR("Extension Manager: exception in synchronize"),
+ static_cast<OWeakObject*>(this), exc);
+ }
+}
+
sal_Bool ExtensionManager::synchronize(
Reference<task::XAbortChannel> const & xAbortChannel,
Reference<ucb::XCommandEnvironment> const & xCmdEnv )
@@ -1277,13 +1348,13 @@ sal_Bool ExtensionManager::synchronize(
String sSynchronizingShared(StrSyncRepository::get());
sSynchronizingShared.SearchAndReplaceAllAscii( "%NAME", OUSTR("shared"));
dp_misc::ProgressLevel progressShared(xCmdEnv, sSynchronizingShared);
- bModified = m_sharedRepository->synchronize(xAbortChannel, xCmdEnv);
+ bModified = getSharedRepository()->synchronize(xAbortChannel, xCmdEnv);
progressShared.update(OUSTR("\n\n"));
String sSynchronizingBundled(StrSyncRepository::get());
sSynchronizingBundled.SearchAndReplaceAllAscii( "%NAME", OUSTR("bundled"));
dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled);
- bModified |= m_bundledRepository->synchronize(xAbortChannel, xCmdEnv);
+ bModified |= getBundledRepository()->synchronize(xAbortChannel, xCmdEnv);
progressBundled.update(OUSTR("\n\n"));
//Always determine the active extension. This is necessary for the
@@ -1410,7 +1481,7 @@ Reference<deploy::XPackage> ExtensionManager::getTempExtension(
{
Reference<ucb::XCommandEnvironment> tmpCmdEnvA(new TmpRepositoryCommandEnv());
- Reference<deploy::XPackage> xTmpPackage = m_tmpRepository->addPackage(
+ Reference<deploy::XPackage> xTmpPackage = getTmpRepository()->addPackage(
url, uno::Sequence<beans::NamedValue>(),OUString(), xAbortChannel, tmpCmdEnvA);
if (!xTmpPackage.is())
{
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx
index 683f45a1bd6e..e7a180a05de1 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.hxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.hxx
@@ -205,6 +205,12 @@ public:
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
+ virtual void SAL_CALL synchronizeBundledPrereg(
+ css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
+ css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv )
+ throw (css::deployment::DeploymentException,
+ css::uno::RuntimeException);
+
virtual css::uno::Sequence<css::uno::Reference<css::deployment::XPackage> > SAL_CALL
getExtensionsWithUnacceptedLicenses(
::rtl::OUString const & repository,
@@ -229,11 +235,7 @@ private:
};
css::uno::Reference< css::uno::XComponentContext> m_xContext;
-
- css::uno::Reference<css::deployment::XPackageManager> m_userRepository;
- css::uno::Reference<css::deployment::XPackageManager> m_sharedRepository;
- css::uno::Reference<css::deployment::XPackageManager> m_bundledRepository;
- css::uno::Reference<css::deployment::XPackageManager> m_tmpRepository;
+ css::uno::Reference<css::deployment::XPackageManagerFactory> m_xPackageManagerFactory;
//only to be used within addExtension
::osl::Mutex m_addMutex;
@@ -243,6 +245,11 @@ private:
*/
::std::list< ::rtl::OUString > m_repositoryNames;
+ css::uno::Reference<css::deployment::XPackageManager> getUserRepository();
+ css::uno::Reference<css::deployment::XPackageManager> getSharedRepository();
+ css::uno::Reference<css::deployment::XPackageManager> getBundledRepository();
+ css::uno::Reference<css::deployment::XPackageManager> getTmpRepository();
+
bool isUserDisabled(::rtl::OUString const & identifier,
::rtl::OUString const & filename);
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 4cc43a8386d8..6d4750bb2447 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -40,9 +40,8 @@
#include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/registry/XRegistryKey.hpp"
#include "com/sun/star/task/XAbortChannel.hpp"
-#include "com/sun/star/ucb/CommandFailedException.hpp"
-#include "com/sun/star/ucb/XCommandEnvironment.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/ucb/XCommandEnvironment.hpp"
#include "com/sun/star/xml/dom/XElement.hpp"
#include "com/sun/star/xml/dom/XNode.hpp"
@@ -71,9 +70,8 @@ namespace xml = com::sun::star::xml ;
namespace dp_info {
class PackageInformationProvider :
- public ::cppu::WeakImplHelper3< deployment::XPackageInformationProvider,
- css_ucb::XCommandEnvironment,
- task::XInteractionHandler >
+ public ::cppu::WeakImplHelper1< deployment::XPackageInformationProvider >
+
{
public:
PackageInformationProvider( uno::Reference< uno::XComponentContext >const& xContext);
@@ -82,16 +80,6 @@ class PackageInformationProvider :
static uno::Sequence< rtl::OUString > getServiceNames();
static rtl::OUString getImplName();
- // XInteractionHandler
- virtual void SAL_CALL handle( const uno::Reference< task::XInteractionRequest >& Request )
- throw( uno::RuntimeException );
- // XCommandEnvironment
- virtual uno::Reference< task::XInteractionHandler > SAL_CALL getInteractionHandler()
- throw ( uno::RuntimeException ) { return static_cast<task::XInteractionHandler*>(this); };
-
- virtual uno::Reference< css_ucb::XProgressHandler > SAL_CALL getProgressHandler()
- throw ( uno::RuntimeException ) { return uno::Reference< css_ucb::XProgressHandler >(); };
-
// XPackageInformationProvider
virtual rtl::OUString SAL_CALL getPackageLocation( const rtl::OUString& extensionId )
throw ( uno::RuntimeException );
@@ -125,17 +113,6 @@ PackageInformationProvider::~PackageInformationProvider()
}
//------------------------------------------------------------------------------
-void SAL_CALL PackageInformationProvider::handle( uno::Reference< task::XInteractionRequest > const & rRequest)
- throw (uno::RuntimeException)
-{
- uno::Sequence< uno::Reference< task::XInteractionContinuation > > xContinuations = rRequest->getContinuations();
- if ( xContinuations.getLength() == 1 )
- {
- xContinuations[0]->select();
- }
-}
-
-//------------------------------------------------------------------------------
rtl::OUString PackageInformationProvider::getPackageLocation(
const rtl::OUString & repository,
const rtl::OUString& _rExtensionId )
@@ -150,7 +127,7 @@ rtl::OUString PackageInformationProvider::getPackageLocation(
xManager->getDeployedExtensions(
repository,
uno::Reference< task::XAbortChannel >(),
- static_cast < XCommandEnvironment *> (this) ) );
+ uno::Reference< css_ucb::XCommandEnvironment > () ) );
for ( int pos = packages.getLength(); pos--; )
{
@@ -320,7 +297,7 @@ uno::Sequence< uno::Sequence< rtl::OUString > > SAL_CALL PackageInformationProvi
const uno::Sequence< uno::Sequence< uno::Reference<deployment::XPackage > > >
allExt = mgr->getAllExtensions(
uno::Reference< task::XAbortChannel >(),
- static_cast < XCommandEnvironment *> (this) );
+ uno::Reference< css_ucb::XCommandEnvironment > () );
uno::Sequence< uno::Sequence< rtl::OUString > > retList;
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 44bc4d469f2f..2e2c5e2a2f53 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -370,6 +370,24 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
//No stamp file. We assume that bundled is always readonly. It must not be
//modified from ExtensionManager but only by the installer
}
+ else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bundled_prereg") )) {
+ //This is a bundled repository but the registration data
+ //is in the brand layer: share/prereg
+ //It is special because the registration data are copied at the first startup
+ //into the user installation. The processed help and xcu files are not
+ //copied. Instead the backenddb.xml for the help backend references the help
+ //by using $BUNDLED_EXTENSION_PREREG instead $BUNDLED_EXTENSIONS_USER. The
+ //configmgr.ini also used $BUNDLED_EXTENSIONS_PREREG to refer to the xcu file
+ //which contain the replacement for %origin%.
+ that->m_activePackages = OUSTR(
+ "vnd.sun.star.expand:$BUNDLED_EXTENSIONS");
+ that->m_registrationData = OUSTR(
+ "vnd.sun.star.expand:$BUNDLED_EXTENSIONS_PREREG");
+ that->m_registryCache = OUSTR(
+ "vnd.sun.star.expand:$BUNDLED_EXTENSIONS_PREREG/registry");
+ logFile = OUSTR(
+ "vnd.sun.star.expand:$BUNDLED_EXTENSIONS_PREREG/log.txt");
+ }
else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("tmp") )) {
that->m_activePackages = OUSTR(
"vnd.sun.star.expand:$TMP_EXTENSIONS/extensions");
@@ -949,6 +967,8 @@ void PackageManagerImpl::removePackage(
contentRemoved.writeStream( xData, true /* replace existing */ );
}
m_activePackagesDB->erase( id, fileName ); // to be removed upon next start
+ //remove any cached data hold by the backend
+ m_xRegistry->packageRemoved(xPackage->getURL(), xPackage->getPackageType()->getMediaType());
}
try_dispose( xPackage );
@@ -989,7 +1009,8 @@ OUString PackageManagerImpl::getDeployPath( ActivePackages::Data const & data )
//The bundled extensions are not contained in an additional folder
//with a unique name. data.temporaryName contains already the
//UTF8 encoded folder name. See PackageManagerImpl::synchronize
- if (!m_context.equals(OUSTR("bundled")))
+ if (!m_context.equals(OUSTR("bundled"))
+ && !m_context.equals(OUSTR("bundled_prereg")))
{
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("_/") );
buf.append( ::rtl::Uri::encode( data.fileName, rtl_UriCharClassPchar,
@@ -1341,6 +1362,8 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
Reference<css::ucb::XCommandEnvironment> const & xCmdEnv)
{
bool bModified = false;
+ OSL_ASSERT(!m_context.equals(OUSTR("user")));
+
ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() );
//check if the folder exist at all. The shared extension folder
//may not exist for a normal user.
@@ -1366,8 +1389,8 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
//The temporary folders of user and shared have an '_' at then end.
//But the name in ActivePackages.temporaryName is saved without.
OUString title2 = title;
- bool bNotBundled = !m_context.equals(OUSTR("bundled"));
- if (bNotBundled)
+ bool bShared = m_context.equals(OUSTR("shared"));
+ if (bShared)
{
OSL_ASSERT(title2[title2.getLength() -1] == '_');
title2 = title2.copy(0, title2.getLength() -1);
@@ -1389,7 +1412,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
// an added extension
OUString url(m_activePackages_expanded + OUSTR("/") + titleEncoded);
OUString sExtFolder;
- if (bNotBundled) //that is, shared
+ if (bShared) //that is, shared
{
//Check if the extension was not "deleted" already which is indicated
//by a xxx.tmpremoved file
@@ -1411,7 +1434,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
ActivePackages::Data dbData;
dbData.temporaryName = titleEncoded;
- if (bNotBundled)
+ if (bShared)
dbData.fileName = sExtFolder;
else
dbData.fileName = title;
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
index 898e7c931f6d..458ece3d0bd8 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
@@ -82,26 +82,29 @@ OUString ComponentBackendDb::getKeyElementName()
void ComponentBackendDb::addEntry(::rtl::OUString const & url, Data const & data)
{
try{
- Reference<css::xml::dom::XNode> componentNode = writeKeyElement(url);
- writeSimpleElement(OUSTR("java-type-library"),
- OUString::valueOf((sal_Bool) data.javaTypeLibrary),
- componentNode);
-
- writeSimpleList(
- data.implementationNames,
- OUSTR("implementation-names"),
- OUSTR("name"),
- componentNode);
-
- writeVectorOfPair(
- data.singletons,
- OUSTR("singletons"),
- OUSTR("item"),
- OUSTR("key"),
- OUSTR("value"),
- componentNode);
-
- save();
+ if (!activateEntry(url))
+ {
+ Reference<css::xml::dom::XNode> componentNode = writeKeyElement(url);
+ writeSimpleElement(OUSTR("java-type-library"),
+ OUString::valueOf((sal_Bool) data.javaTypeLibrary),
+ componentNode);
+
+ writeSimpleList(
+ data.implementationNames,
+ OUSTR("implementation-names"),
+ OUSTR("name"),
+ componentNode);
+
+ writeVectorOfPair(
+ data.singletons,
+ OUSTR("singletons"),
+ OUSTR("item"),
+ OUSTR("key"),
+ OUSTR("value"),
+ componentNode);
+
+ save();
+ }
}
catch(css::uno::Exception &)
{
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index d1511952a92a..650a7585d929 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -270,8 +270,8 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
std::auto_ptr<ComponentBackendDb> m_backendDb;
void addDataToDb(OUString const & url, ComponentBackendDb::Data const & data);
- void deleteDataFromDb(OUString const & url);
ComponentBackendDb::Data readDataFromDb(OUString const & url);
+ void revokeEntryFromDb(OUString const & url);
//These rdbs are for writing new service entries. The rdb files are copies
@@ -327,6 +327,10 @@ public:
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException);
+
using PackageRegistryBackend::disposing;
//Will be called from ComponentPackageImpl
@@ -660,12 +664,6 @@ void BackendImpl::addDataToDb(
m_backendDb->addEntry(url, data);
}
-void BackendImpl::deleteDataFromDb(OUString const & url)
-{
- if (m_backendDb.get())
- m_backendDb->removeEntry(url);
-}
-
ComponentBackendDb::Data BackendImpl::readDataFromDb(OUString const & url)
{
ComponentBackendDb::Data data;
@@ -674,6 +672,12 @@ ComponentBackendDb::Data BackendImpl::readDataFromDb(OUString const & url)
return data;
}
+void BackendImpl::revokeEntryFromDb(OUString const & url)
+{
+ if (m_backendDb.get())
+ m_backendDb->revokeEntry(url);
+}
+
// XPackageRegistry
//______________________________________________________________________________
Sequence< Reference<deployment::XPackageTypeInfo> >
@@ -682,6 +686,14 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
return m_typeInfos;
}
+void BackendImpl::packageRemoved(OUString const & url, OUString const & /*mediaType*/)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException)
+{
+ if (m_backendDb.get())
+ m_backendDb->removeEntry(url);
+}
+
// PackageRegistryBackend
//______________________________________________________________________________
Reference<deployment::XPackage> BackendImpl::bindPackage_(
@@ -1437,6 +1449,9 @@ void BackendImpl::ComponentPackageImpl::getComponentInfo(
// Package
//______________________________________________________________________________
+//We could use here BackendImpl::hasActiveEntry. However, this check is just as well.
+//And it also shows the problem if another extension has overwritten an implementation
+//entry, because it contains the same service implementation
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::ComponentPackageImpl::isRegistered_(
::osl::ResettableMutexGuard &,
@@ -1590,7 +1605,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
that->releaseObject(url);
}
m_registered = REG_NOT_REGISTERED;
- that->deleteDataFromDb(url);
+ getMyBackend()->revokeEntryFromDb(url);
}
}
@@ -1803,7 +1818,7 @@ void BackendImpl::ComponentsPackageImpl::processPackage_(
that->componentLiveRemoval(that->readDataFromDb(url));
}
that->releaseObject(url);
- that->deleteDataFromDb(url);
+ that->revokeEntryFromDb(url);
}
}
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 1e7ee5bfac8a..24e5587cd0cc 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -132,15 +132,21 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference<XCommandEnvironment> const & xCmdEnv );
void configmgrini_flush( Reference<XCommandEnvironment> const & xCmdEnv );
- bool addToConfigmgrIni( bool isSchema, OUString const & url,
+ /* The paramter isURL is false in the case of adding the conf:ini-entry
+ value from the backend db. This entry already contains the path as it
+ is used in the configmgr.ini.
+ */
+ bool addToConfigmgrIni( bool isSchema, bool isURL, OUString const & url,
Reference<XCommandEnvironment> const & xCmdEnv );
bool removeFromConfigmgrIni( bool isSchema, OUString const & url,
Reference<XCommandEnvironment> const & xCmdEnv );
void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data);
::boost::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url);
- OUString deleteDataFromDb(OUString const & url);
+ void revokeEntryFromDb(OUString const & url);
::std::list<OUString> getAllIniEntries();
+ bool hasActiveEntry(OUString const & url);
+ bool activateEntry(OUString const & url);
public:
BackendImpl( Sequence<Any> const & args,
@@ -149,6 +155,9 @@ public:
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException);
using PackageRegistryBackend::disposing;
};
@@ -240,18 +249,10 @@ void BackendImpl::addDataToDb(
return data;
}
-OUString BackendImpl::deleteDataFromDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(OUString const & url)
{
- OUString url2(url);
- if (m_backendDb.get()) {
- boost::optional< ConfigurationBackendDb::Data > data(
- m_backendDb->getEntry(url));
- if (data) {
- url2 = expandUnoRcTerm(data->iniEntry);
- }
- m_backendDb->removeEntry(url);
- }
- return url2;
+ if (m_backendDb.get())
+ m_backendDb->revokeEntry(url);
}
::std::list<OUString> BackendImpl::getAllIniEntries()
@@ -262,6 +263,20 @@ OUString BackendImpl::deleteDataFromDb(OUString const & url)
return ::std::list<OUString>();
}
+bool BackendImpl::hasActiveEntry(OUString const & url)
+{
+ if (m_backendDb.get())
+ return m_backendDb->hasActiveEntry(url);
+ return false;
+}
+
+bool BackendImpl::activateEntry(OUString const & url)
+{
+ if (m_backendDb.get())
+ return m_backendDb->activateEntry(url);
+ return false;
+}
+
// XPackageRegistry
@@ -271,6 +286,13 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
{
return m_typeInfos;
}
+void BackendImpl::packageRemoved(OUString const & url, OUString const & /*mediaType*/)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException)
+{
+ if (m_backendDb.get())
+ m_backendDb->removeEntry(url);
+}
// PackageRegistryBackend
//______________________________________________________________________________
@@ -457,10 +479,10 @@ void BackendImpl::configmgrini_flush(
}
//______________________________________________________________________________
-bool BackendImpl::addToConfigmgrIni( bool isSchema, OUString const & url_,
+bool BackendImpl::addToConfigmgrIni( bool isSchema, bool isURL, OUString const & url_,
Reference<XCommandEnvironment> const & xCmdEnv )
{
- const OUString rcterm( dp_misc::makeRcTerm(url_) );
+ const OUString rcterm( isURL ? dp_misc::makeRcTerm(url_) : url_ );
const ::osl::MutexGuard guard( getMutex() );
configmgrini_verify_init( xCmdEnv );
t_stringlist & rSet = getFiles(isSchema);
@@ -509,6 +531,7 @@ bool BackendImpl::removeFromConfigmgrIni(
// Package
//______________________________________________________________________________
+
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
@@ -534,7 +557,7 @@ BackendImpl::PackageImpl::isRegistered_(
const rtl::OUString url(getURL());
bool bReg = false;
- if (that->readDataFromDb(getURL()))
+ if (that->hasActiveEntry(getURL()))
bReg = true;
if (!bReg)
//fallback for user extension registered in berkeley DB
@@ -677,38 +700,48 @@ void BackendImpl::PackageImpl::processPackage_(
if (doRegisterPackage)
{
- ConfigurationBackendDb::Data data;
- if (!m_isSchema)
+ if (getMyBackend()->activateEntry(getURL()))
{
- const OUString sModFolder = that->createFolder(OUString(), xCmdEnv);
- bool out_replaced = false;
- url = replaceOrigin(url, sModFolder, xCmdEnv, out_replaced);
- if (out_replaced)
- data.dataUrl = sModFolder;
- else
- deleteTempFolder(sModFolder);
+ ::boost::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url);
+ OSL_ASSERT(data);
+ that->addToConfigmgrIni( m_isSchema, false, data->iniEntry, xCmdEnv );
}
- //No need for live-deployment for bundled extension, because OOo
- //restarts after installation
- if (that->m_eContext != CONTEXT_BUNDLED
- && !startup)
+ else
{
- if (m_isSchema)
+ ConfigurationBackendDb::Data data;
+ if (!m_isSchema)
{
- com::sun::star::configuration::Update::get(
- that->m_xComponentContext)->insertExtensionXcsFile(
- that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
+ const OUString sModFolder = that->createFolder(OUString(), xCmdEnv);
+ bool out_replaced = false;
+ url = replaceOrigin(url, sModFolder, xCmdEnv, out_replaced);
+ if (out_replaced)
+ data.dataUrl = sModFolder;
+ else
+ deleteTempFolder(sModFolder);
}
- else
+ //No need for live-deployment for bundled extension, because OOo
+ //restarts after installation
+ if (that->m_eContext != CONTEXT_BUNDLED
+ && that->m_eContext != CONTEXT_BUNDLED_PREREG
+ && !startup)
{
- com::sun::star::configuration::Update::get(
- that->m_xComponentContext)->insertExtensionXcuFile(
- that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
+ if (m_isSchema)
+ {
+ com::sun::star::configuration::Update::get(
+ that->m_xComponentContext)->insertExtensionXcsFile(
+ that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
+ }
+ else
+ {
+ com::sun::star::configuration::Update::get(
+ that->m_xComponentContext)->insertExtensionXcuFile(
+ that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
+ }
}
+ that->addToConfigmgrIni( m_isSchema, true, url, xCmdEnv );
+ data.iniEntry = dp_misc::makeRcTerm(url);
+ that->addDataToDb(getURL(), data);
}
- that->addToConfigmgrIni( m_isSchema, url, xCmdEnv );
- data.iniEntry = dp_misc::makeRcTerm(url);
- that->addDataToDb(getURL(), data);
}
else // revoke
{
@@ -741,7 +774,7 @@ void BackendImpl::PackageImpl::processPackage_(
else
deleteTempFolder(sModFolder);
}
- that->addToConfigmgrIni(schema, url_replaced, xCmdEnv);
+ that->addToConfigmgrIni(schema, true, url_replaced, xCmdEnv);
data.iniEntry = dp_misc::makeRcTerm(url_replaced);
that->addDataToDb(url2, data);
}
@@ -759,12 +792,17 @@ void BackendImpl::PackageImpl::processPackage_(
OSL_ASSERT(0);
}
}
- url = that->deleteDataFromDb(url);
- if (!m_isSchema) {
+
+ ::boost::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url);
+ //If an xcu file was life deployed then always a data entry is written.
+ //If the xcu file was already in the configmr.ini then there is also
+ //a data entry
+ if (!m_isSchema && data)
+ {
com::sun::star::configuration::Update::get(
- that->m_xComponentContext)->removeExtensionXcuFile(
- expandUnoRcUrl(url));
+ that->m_xComponentContext)->removeExtensionXcuFile(expandUnoRcTerm(data->iniEntry));
}
+ that->revokeEntryFromDb(url);
}
}
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index 2a02c6d8efa0..2437c54ec734 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
@@ -83,12 +83,15 @@ OUString ConfigurationBackendDb::getKeyElementName()
void ConfigurationBackendDb::addEntry(::rtl::OUString const & url, Data const & data)
{
try{
- Reference<css::xml::dom::XNode> helpNode
- = writeKeyElement(url);
+ if (!activateEntry(url))
+ {
+ Reference<css::xml::dom::XNode> helpNode
+ = writeKeyElement(url);
- writeSimpleElement(OUSTR("data-url"), data.dataUrl, helpNode);
- writeSimpleElement(OUSTR("ini-entry"), data.iniEntry, helpNode);
- save();
+ writeSimpleElement(OUSTR("data-url"), data.dataUrl, helpNode);
+ writeSimpleElement(OUSTR("ini-entry"), data.iniEntry, helpNode);
+ save();
+ }
}
catch (css::deployment::DeploymentException& )
{
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index fa53d4e78a15..266d4406cfde 100755
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -39,6 +39,7 @@
#include "ucbhelper/content.hxx"
#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
#include "com/sun/star/deployment/InvalidRemovedParameterException.hpp"
+#include "com/sun/star/deployment/thePackageManagerFactory.hpp"
#include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp"
#include "com/sun/star/ucb/IOErrorCode.hpp"
#include "com/sun/star/beans/StringPair.hpp"
@@ -99,6 +100,8 @@ PackageRegistryBackend::PackageRegistryBackend(
m_eContext = CONTEXT_BUNDLED;
else if (m_context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("tmp") ))
m_eContext = CONTEXT_TMP;
+ else if (m_context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bundled_prereg") ))
+ m_eContext = CONTEXT_BUNDLED_PREREG;
else if (m_context.matchIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.tdoc:/") ))
m_eContext = CONTEXT_DOCUMENT;
@@ -121,6 +124,9 @@ void PackageRegistryBackend::check()
void PackageRegistryBackend::disposing()
{
try {
+ for ( t_string2ref::const_iterator i = m_bound.begin(); i != m_bound.end(); i++)
+ i->second->removeEventListener(this);
+ m_bound.clear();
m_xComponentContext.clear();
WeakComponentImplHelperBase::disposing();
}
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 14b4f2374c5b..9629855aaf11 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -187,6 +187,74 @@ void BackendDb::removeEntry(::rtl::OUString const & url)
removeElement(sExpression.makeStringAndClear());
}
+void BackendDb::revokeEntry(::rtl::OUString const & url)
+{
+ try
+ {
+ Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY);
+ if (entry.is())
+ {
+ entry->setAttribute(OUSTR("revoked"), OUSTR("true"));
+ save();
+ }
+ }
+ catch(css::uno::Exception &)
+ {
+ Any exc( ::cppu::getCaughtException() );
+ throw css::deployment::DeploymentException(
+ OUSTR("Extension Manager: failed to revoke data entry in backend db: ") +
+ m_urlDb, 0, exc);
+ }
+}
+
+bool BackendDb::activateEntry(::rtl::OUString const & url)
+{
+ try
+ {
+ bool ret = false;
+ Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY);
+ if (entry.is())
+ {
+ //no attribute "active" means it is active, that is, registered.
+ entry->removeAttribute(OUSTR("revoked"));
+ save();
+ ret = true;
+ }
+ return ret;
+ }
+ catch(css::uno::Exception &)
+ {
+ Any exc( ::cppu::getCaughtException() );
+ throw css::deployment::DeploymentException(
+ OUSTR("Extension Manager: failed to revoke data entry in backend db: ") +
+ m_urlDb, 0, exc);
+ }
+}
+
+bool BackendDb::hasActiveEntry(::rtl::OUString const & url)
+{
+ try
+ {
+ bool ret = false;
+ Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY);
+ if (entry.is())
+ {
+ OUString sActive = entry->getAttribute(OUSTR("revoked"));
+ if (!sActive.equals(OUSTR("true")))
+ ret = true;
+ }
+ return ret;
+
+ }
+ catch(css::uno::Exception &)
+ {
+ Any exc( ::cppu::getCaughtException() );
+ throw css::deployment::DeploymentException(
+ OUSTR("Extension Manager: failed to determine an active entry in backend db: ") +
+ m_urlDb, 0, exc);
+ }
+}
+
Reference<css::xml::dom::XNode> BackendDb::getKeyElement(
::rtl::OUString const & url)
{
@@ -577,32 +645,34 @@ RegisteredDb::RegisteredDb(
void RegisteredDb::addEntry(::rtl::OUString const & url)
{
try{
+ if (!activateEntry(url))
+ {
+ const OUString sNameSpace = getDbNSName();
+ const OUString sPrefix = getNSPrefix();
+ const OUString sEntry = getKeyElementName();
- const OUString sNameSpace = getDbNSName();
- const OUString sPrefix = getNSPrefix();
- const OUString sEntry = getKeyElementName();
-
- Reference<css::xml::dom::XDocument> doc = getDocument();
- Reference<css::xml::dom::XNode> root = doc->getFirstChild();
+ Reference<css::xml::dom::XDocument> doc = getDocument();
+ Reference<css::xml::dom::XNode> root = doc->getFirstChild();
#if OSL_DEBUG_LEVEL > 0
- //There must not be yet an entry with the same url
- OUString sExpression(
- sPrefix + OUSTR(":") + sEntry + OUSTR("[@url = \"") + url + OUSTR("\"]"));
- Reference<css::xml::dom::XNode> _extensionNode =
- getXPathAPI()->selectSingleNode(root, sExpression);
- OSL_ASSERT(! _extensionNode.is());
+ //There must not be yet an entry with the same url
+ OUString sExpression(
+ sPrefix + OUSTR(":") + sEntry + OUSTR("[@url = \"") + url + OUSTR("\"]"));
+ Reference<css::xml::dom::XNode> _extensionNode =
+ getXPathAPI()->selectSingleNode(root, sExpression);
+ OSL_ASSERT(! _extensionNode.is());
#endif
- Reference<css::xml::dom::XElement> helpElement(
- doc->createElementNS(sNameSpace, sPrefix + OUSTR(":") + sEntry));
+ Reference<css::xml::dom::XElement> helpElement(
+ doc->createElementNS(sNameSpace, sPrefix + OUSTR(":") + sEntry));
- helpElement->setAttribute(OUSTR("url"), url);
+ helpElement->setAttribute(OUSTR("url"), url);
- Reference<css::xml::dom::XNode> helpNode(
- helpElement, UNO_QUERY_THROW);
- root->appendChild(helpNode);
+ Reference<css::xml::dom::XNode> helpNode(
+ helpElement, UNO_QUERY_THROW);
+ root->appendChild(helpNode);
- save();
+ save();
+ }
}
catch(css::uno::Exception &)
{
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index 0f309a5b729f..eecae4e391b7 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -135,6 +135,10 @@ public:
lang::IllegalArgumentException, RuntimeException);
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ RuntimeException);
+
};
//______________________________________________________________________________
@@ -185,6 +189,20 @@ OUString normalizeMediaType( OUString const & mediaType )
//______________________________________________________________________________
+void PackageRegistryImpl::packageRemoved(
+ ::rtl::OUString const & url, ::rtl::OUString const & mediaType)
+ throw (css::deployment::DeploymentException,
+ css::uno::RuntimeException)
+{
+ const t_string2registry::const_iterator i =
+ m_mediaType2backend.find(mediaType);
+
+ if (i != m_mediaType2backend.end())
+ {
+ i->second->packageRemoved(url, mediaType);
+ }
+}
+
void PackageRegistryImpl::insertBackend(
Reference<deployment::XPackageRegistry> const & xBackend )
{
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index 968ee7297b0f..5ec739153831 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -71,6 +71,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
bool getFileAttributes(sal_uInt64& out_Attributes);
bool isUrlTargetInExtension();
+
public:
inline ExecutablePackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
@@ -92,8 +93,8 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv );
void addDataToDb(OUString const & url);
- bool isRegisteredInDb(OUString const & url);
- void deleteDataFromDb(OUString const & url);
+ bool hasActiveEntry(OUString const & url);
+ void revokeEntryFromDb(OUString const & url);
Reference<deployment::XPackageTypeInfo> m_xExecutableTypeInfo;
std::auto_ptr<ExecutableBackendDb> m_backendDb;
@@ -104,6 +105,9 @@ public:
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException);
using PackageRegistryBackend::disposing;
};
@@ -134,20 +138,20 @@ void BackendImpl::addDataToDb(OUString const & url)
m_backendDb->addEntry(url);
}
-bool BackendImpl::isRegisteredInDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(OUString const & url)
{
- bool ret = false;
if (m_backendDb.get())
- ret = m_backendDb->getEntry(url);
- return ret;
+ m_backendDb->revokeEntry(url);
}
-void BackendImpl::deleteDataFromDb(OUString const & url)
+bool BackendImpl::hasActiveEntry(OUString const & url)
{
if (m_backendDb.get())
- m_backendDb->removeEntry(url);
+ return m_backendDb->hasActiveEntry(url);
+ return false;
}
+
// XPackageRegistry
Sequence< Reference<deployment::XPackageTypeInfo> >
BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
@@ -156,6 +160,14 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
& m_xExecutableTypeInfo, 1);
}
+void BackendImpl::packageRemoved(OUString const & url, OUString const & /*mediaType*/)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException)
+{
+ if (m_backendDb.get())
+ m_backendDb->removeEntry(url);
+}
+
// PackageRegistryBackend
Reference<deployment::XPackage> BackendImpl::bindPackage_(
OUString const & url, OUString const & mediaType, sal_Bool bRemoved,
@@ -217,7 +229,7 @@ BackendImpl::ExecutablePackageImpl::isRegistered_(
::rtl::Reference<dp_misc::AbortChannel> const &,
Reference<XCommandEnvironment> const & )
{
- bool registered = getMyBackend()->isRegisteredInDb(getURL());
+ bool registered = getMyBackend()->hasActiveEntry(getURL());
return beans::Optional< beans::Ambiguous<sal_Bool> >(
sal_True /* IsPresent */,
beans::Ambiguous<sal_Bool>(
@@ -248,7 +260,8 @@ void BackendImpl::ExecutablePackageImpl::processPackage_(
else if (getMyBackend()->m_context.equals(OUSTR("shared")))
attributes |= (osl_File_Attribute_OwnExe | osl_File_Attribute_GrpExe
| osl_File_Attribute_OthExe);
- else if (!getMyBackend()->m_context.equals(OUSTR("bundled")))
+ else if (!getMyBackend()->m_context.equals(OUSTR("bundled"))
+ && !getMyBackend()->m_context.equals(OUSTR("bundled_prereg")))
//Bundled extension are required to be in the properly
//installed. That is an executable must have the right flags
OSL_ASSERT(0);
@@ -261,7 +274,7 @@ void BackendImpl::ExecutablePackageImpl::processPackage_(
}
else
{
- getMyBackend()->deleteDataFromDb(getURL());
+ getMyBackend()->revokeEntryFromDb(getURL());
}
}
@@ -277,7 +290,8 @@ bool BackendImpl::ExecutablePackageImpl::isUrlTargetInExtension()
sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$UNO_USER_PACKAGES_CACHE"));
else if (getMyBackend()->m_context.equals(OUSTR("shared")))
sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$UNO_SHARED_PACKAGES_CACHE"));
- else if (getMyBackend()->m_context.equals(OUSTR("bundled")))
+ else if (getMyBackend()->m_context.equals(OUSTR("bundled"))
+ || getMyBackend()->m_context.equals(OUSTR("bundled_prereg")))
sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$BUNDLED_EXTENSIONS"));
else
OSL_ASSERT(0);
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 5a7538f6a866..0adb63614828 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -80,7 +80,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
::rtl::Reference<AbortChannel> const & abortChannel,
Reference<XCommandEnvironment> const & xCmdEnv );
- bool extensionContainsCompiledHelp();
+
public:
PackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
@@ -88,6 +88,8 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference<deployment::XPackageTypeInfo> const & xPackageType,
bool bRemoved, OUString const & identifier);
+ bool extensionContainsCompiledHelp();
+
//XPackage
virtual css::beans::Optional< ::rtl::OUString > SAL_CALL getRegistrationDataURL()
throw (deployment::ExtensionRemovedException, css::uno::RuntimeException);
@@ -100,14 +102,16 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
sal_Bool bRemoved, OUString const & identifier,
Reference<XCommandEnvironment> const & xCmdEnv );
- void implProcessHelp( Reference< deployment::XPackage > xPackage, bool doRegisterPackage,
- bool compiledHelp, Reference<ucb::XCommandEnvironment> const & xCmdEnv);
+ void implProcessHelp( PackageImpl * package, bool doRegisterPackage,
+ Reference<ucb::XCommandEnvironment> const & xCmdEnv);
void implCollectXhpFiles( const rtl::OUString& aDir,
std::vector< rtl::OUString >& o_rXhpFileVector );
void addDataToDb(OUString const & url, HelpBackendDb::Data const & data);
::boost::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url);
- void deleteDataFromDb(OUString const & url);
+ bool hasActiveEntry(OUString const & url);
+ void revokeEntryFromDb(OUString const & url);
+ bool activateEntry(OUString const & url);
Reference< ucb::XSimpleFileAccess > getFileAccess( void );
Reference< ucb::XSimpleFileAccess > m_xSFA;
@@ -123,6 +127,10 @@ public:
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException);
+
};
//______________________________________________________________________________
@@ -162,6 +170,14 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
return m_typeInfos;
}
+void BackendImpl::packageRemoved(OUString const & url, OUString const & /*mediaType*/)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException)
+{
+ if (m_backendDb.get())
+ m_backendDb->removeEntry(url);
+}
+
// PackageRegistryBackend
//______________________________________________________________________________
Reference<deployment::XPackage> BackendImpl::bindPackage_(
@@ -220,12 +236,27 @@ void BackendImpl::addDataToDb(
return data;
}
-void BackendImpl::deleteDataFromDb(OUString const & url)
+bool BackendImpl::hasActiveEntry(OUString const & url)
{
if (m_backendDb.get())
- m_backendDb->removeEntry(url);
+ return m_backendDb->hasActiveEntry(url);
+ return false;
+}
+
+void BackendImpl::revokeEntryFromDb(OUString const & url)
+{
+ if (m_backendDb.get())
+ m_backendDb->revokeEntry(url);
}
+bool BackendImpl::activateEntry(OUString const & url)
+{
+ if (m_backendDb.get())
+ return m_backendDb->activateEntry(url);
+ return false;
+}
+
+
//##############################################################################
BackendImpl::PackageImpl::PackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
@@ -235,13 +266,6 @@ BackendImpl::PackageImpl::PackageImpl(
: Package( myBackend, url, name, name, xPackageType, bRemoved,
identifier)
{
-// if (bRemoved)
-// {
-// ::boost::optional<HelpBackendDb::Data> opt =
-// getMyBackend()->readDataFromDb(url);
-// if (opt)
-// m_dbData = *opt;
-// }
}
// Package
@@ -260,7 +284,6 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
return pBackend;
}
-
bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
{
bool bCompiled = true;
@@ -311,6 +334,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
}
return bCompiled;
}
+
//______________________________________________________________________________
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::PackageImpl::isRegistered_(
@@ -321,7 +345,7 @@ BackendImpl::PackageImpl::isRegistered_(
BackendImpl * that = getMyBackend();
bool bReg = false;
- if (that->readDataFromDb(getURL()))
+ if (that->hasActiveEntry(getURL()))
bReg = true;
return beans::Optional< beans::Ambiguous<sal_Bool> >( true, beans::Ambiguous<sal_Bool>( bReg, false ) );
@@ -340,9 +364,7 @@ void BackendImpl::PackageImpl::processPackage_(
(void)xCmdEnv;
BackendImpl* that = getMyBackend();
- Reference< deployment::XPackage > xThisPackage( this );
- that->implProcessHelp( xThisPackage, doRegisterPackage,
- extensionContainsCompiledHelp(), xCmdEnv);
+ that->implProcessHelp( this, doRegisterPackage, xCmdEnv);
}
beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
@@ -355,7 +377,7 @@ beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
::boost::optional<HelpBackendDb::Data> data =
getMyBackend()->readDataFromDb(getURL());
- if (data)
+ if (data && getMyBackend()->hasActiveEntry(getURL()))
return beans::Optional<OUString>(true, data->dataUrl);
return beans::Optional<OUString>(true, OUString());
@@ -368,224 +390,225 @@ static rtl::OUString aSlash( rtl::OUString::createFromAscii( "/" ) );
static rtl::OUString aHelpStr( rtl::OUString::createFromAscii( "help" ) );
-void BackendImpl::implProcessHelp
-( Reference< deployment::XPackage > xPackage, bool doRegisterPackage, bool compiledHelp,
- Reference<ucb::XCommandEnvironment> const & xCmdEnv)
+void BackendImpl::implProcessHelp(
+ PackageImpl * package, bool doRegisterPackage,
+ Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
+ Reference< deployment::XPackage > xPackage(package);
OSL_ASSERT(xPackage.is());
if (doRegisterPackage)
{
- HelpBackendDb::Data data;
-
- if (compiledHelp)
+ //revive already processed help if possible
+ if ( !activateEntry(xPackage->getURL()))
{
+ HelpBackendDb::Data data;
data.dataUrl = xPackage->getURL();
- }
- else
- {
- const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
- data.dataUrl = sHelpFolder;
-
- Reference< ucb::XSimpleFileAccess > xSFA = getFileAccess();
- rtl::OUString aHelpURL = xPackage->getURL();
- rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
- rtl::OUString aName = xPackage->getName();
- if( !xSFA->isFolder( aExpandedHelpURL ) )
+ if (!package->extensionContainsCompiledHelp())
{
- rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
- aErrStr += rtl::OUString::createFromAscii( "No help folder" );
- OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
- throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
- makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
- }
-
- Reference<XComponentContext> const & xContext = getComponentContext();
- Reference< script::XInvocation > xInvocation;
- if( xContext.is() )
- {
- try
+ const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
+ data.dataUrl = sHelpFolder;
+
+ Reference< ucb::XSimpleFileAccess > xSFA = getFileAccess();
+ rtl::OUString aHelpURL = xPackage->getURL();
+ rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
+ rtl::OUString aName = xPackage->getName();
+ if( !xSFA->isFolder( aExpandedHelpURL ) )
{
- xInvocation = Reference< script::XInvocation >(
- xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
+ aErrStr += rtl::OUString::createFromAscii( "No help folder" );
+ OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
+ throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
+ makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
}
- catch (Exception &)
+
+ Reference<XComponentContext> const & xContext = getComponentContext();
+ Reference< script::XInvocation > xInvocation;
+ if( xContext.is() )
{
- // i98680: Survive missing lucene
+ try
+ {
+ xInvocation = Reference< script::XInvocation >(
+ xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
+ "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ }
+ catch (Exception &)
+ {
+ // i98680: Survive missing lucene
+ }
}
- }
- // Scan languages
- Sequence< rtl::OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true );
- sal_Int32 nLangCount = aLanguageFolderSeq.getLength();
- const rtl::OUString* pSeq = aLanguageFolderSeq.getConstArray();
- for( sal_Int32 iLang = 0 ; iLang < nLangCount ; ++iLang )
- {
- rtl::OUString aLangURL = pSeq[iLang];
- if( xSFA->isFolder( aLangURL ) )
+ // Scan languages
+ Sequence< rtl::OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true );
+ sal_Int32 nLangCount = aLanguageFolderSeq.getLength();
+ const rtl::OUString* pSeq = aLanguageFolderSeq.getConstArray();
+ for( sal_Int32 iLang = 0 ; iLang < nLangCount ; ++iLang )
{
- std::vector< rtl::OUString > aXhpFileVector;
-
- // calculate jar file URL
- sal_Int32 indexStartSegment = aLangURL.lastIndexOf('/');
- // for example "/en"
- OUString langFolderURLSegment(
- aLangURL.copy(
- indexStartSegment + 1, aLangURL.getLength() - indexStartSegment - 1));
-
- //create the folder in the "temporary folder"
- ::ucbhelper::Content langFolderContent;
- const OUString langFolderDest = makeURL(sHelpFolder, langFolderURLSegment);
- const OUString langFolderDestExpanded = ::dp_misc::expandUnoRcUrl(langFolderDest);
- ::dp_misc::create_folder(
- &langFolderContent,
- langFolderDest, xCmdEnv);
-
- rtl::OUString aJarFile(
- makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
- OUSTR(".jar")));
- aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
-
- rtl::OUString aEncodedJarFilePath = rtl::Uri::encode(
- aJarFile, rtl_UriCharClassPchar,
- rtl_UriEncodeIgnoreEscapes,
- RTL_TEXTENCODING_UTF8 );
- rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.zip://" );
- aDestBasePath += aEncodedJarFilePath;
- aDestBasePath += rtl::OUString::createFromAscii( "/" );
-
- sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
-
- Sequence< rtl::OUString > aSubLangSeq = xSFA->getFolderContents( aLangURL, true );
- sal_Int32 nSubLangCount = aSubLangSeq.getLength();
- const rtl::OUString* pSubLangSeq = aSubLangSeq.getConstArray();
- for( sal_Int32 iSubLang = 0 ; iSubLang < nSubLangCount ; ++iSubLang )
+ rtl::OUString aLangURL = pSeq[iLang];
+ if( xSFA->isFolder( aLangURL ) )
{
- rtl::OUString aSubFolderURL = pSubLangSeq[iSubLang];
- if( !xSFA->isFolder( aSubFolderURL ) )
- continue;
-
- implCollectXhpFiles( aSubFolderURL, aXhpFileVector );
+ std::vector< rtl::OUString > aXhpFileVector;
+
+ // calculate jar file URL
+ sal_Int32 indexStartSegment = aLangURL.lastIndexOf('/');
+ // for example "/en"
+ OUString langFolderURLSegment(
+ aLangURL.copy(
+ indexStartSegment + 1, aLangURL.getLength() - indexStartSegment - 1));
+
+ //create the folder in the "temporary folder"
+ ::ucbhelper::Content langFolderContent;
+ const OUString langFolderDest = makeURL(sHelpFolder, langFolderURLSegment);
+ const OUString langFolderDestExpanded = ::dp_misc::expandUnoRcUrl(langFolderDest);
+ ::dp_misc::create_folder(
+ &langFolderContent,
+ langFolderDest, xCmdEnv);
+
+ rtl::OUString aJarFile(
+ makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
+ OUSTR(".jar")));
+ aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
+
+ rtl::OUString aEncodedJarFilePath = rtl::Uri::encode(
+ aJarFile, rtl_UriCharClassPchar,
+ rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8 );
+ rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.zip://" );
+ aDestBasePath += aEncodedJarFilePath;
+ aDestBasePath += rtl::OUString::createFromAscii( "/" );
+
+ sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
+
+ Sequence< rtl::OUString > aSubLangSeq = xSFA->getFolderContents( aLangURL, true );
+ sal_Int32 nSubLangCount = aSubLangSeq.getLength();
+ const rtl::OUString* pSubLangSeq = aSubLangSeq.getConstArray();
+ for( sal_Int32 iSubLang = 0 ; iSubLang < nSubLangCount ; ++iSubLang )
+ {
+ rtl::OUString aSubFolderURL = pSubLangSeq[iSubLang];
+ if( !xSFA->isFolder( aSubFolderURL ) )
+ continue;
- // Copy to package (later: move?)
- rtl::OUString aDestPath = aDestBasePath;
- rtl::OUString aPureFolderName = aSubFolderURL.copy( nLenLangFolderURL );
- aDestPath += aPureFolderName;
- xSFA->copy( aSubFolderURL, aDestPath );
- }
+ implCollectXhpFiles( aSubFolderURL, aXhpFileVector );
- // Call compiler
- sal_Int32 nXhpFileCount = aXhpFileVector.size();
- rtl::OUString* pXhpFiles = new rtl::OUString[nXhpFileCount];
- for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
- {
- rtl::OUString aXhpFile = aXhpFileVector[iXhp];
- rtl::OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL );
- pXhpFiles[iXhp] = aXhpRelFile;
- }
+ // Copy to package (later: move?)
+ rtl::OUString aDestPath = aDestBasePath;
+ rtl::OUString aPureFolderName = aSubFolderURL.copy( nLenLangFolderURL );
+ aDestPath += aPureFolderName;
+ xSFA->copy( aSubFolderURL, aDestPath );
+ }
- rtl::OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
- rtl::OUString aOfficeHelpPathFileURL;
- ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
+ // Call compiler
+ sal_Int32 nXhpFileCount = aXhpFileVector.size();
+ rtl::OUString* pXhpFiles = new rtl::OUString[nXhpFileCount];
+ for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
+ {
+ rtl::OUString aXhpFile = aXhpFileVector[iXhp];
+ rtl::OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL );
+ pXhpFiles[iXhp] = aXhpRelFile;
+ }
- HelpProcessingErrorInfo aErrorInfo;
- bool bSuccess = compileExtensionHelp(
- aOfficeHelpPathFileURL, aHelpStr, aLangURL,
- nXhpFileCount, pXhpFiles,
- langFolderDestExpanded, aErrorInfo );
+ rtl::OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
+ rtl::OUString aOfficeHelpPathFileURL;
+ ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
- if( bSuccess && xInvocation.is() )
- {
- Sequence<uno::Any> aParamsSeq( 6 );
-
- aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
-
- rtl::OUString aLang;
- sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
- if( nLastSlash != -1 )
- aLang = aLangURL.copy( nLastSlash + 1 );
- else
- aLang = rtl::OUString::createFromAscii( "en" );
- aParamsSeq[1] = uno::makeAny( aLang );
-
- aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
- aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
-
- aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
- rtl::OUString aSystemPath;
- osl::FileBase::getSystemPathFromFileURL(
- langFolderDestExpanded, aSystemPath );
- aParamsSeq[5] = uno::makeAny( aSystemPath );
-
- Sequence< sal_Int16 > aOutParamIndex;
- Sequence< uno::Any > aOutParam;
- uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
- aParamsSeq, aOutParamIndex, aOutParam );
- }
+ HelpProcessingErrorInfo aErrorInfo;
+ bool bSuccess = compileExtensionHelp(
+ aOfficeHelpPathFileURL, aHelpStr, aLangURL,
+ nXhpFileCount, pXhpFiles,
+ langFolderDestExpanded, aErrorInfo );
- if( !bSuccess )
- {
- sal_uInt16 nErrStrId = 0;
- switch( aErrorInfo.m_eErrorClass )
+ if( bSuccess && xInvocation.is() )
{
- case HELPPROCESSING_GENERAL_ERROR:
- case HELPPROCESSING_INTERNAL_ERROR: nErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
- case HELPPROCESSING_XMLPARSING_ERROR: nErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
- default: ;
- };
-
- rtl::OUString aErrStr;
- if( nErrStrId != 0 )
+ Sequence<uno::Any> aParamsSeq( 6 );
+
+ aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
+
+ rtl::OUString aLang;
+ sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
+ if( nLastSlash != -1 )
+ aLang = aLangURL.copy( nLastSlash + 1 );
+ else
+ aLang = rtl::OUString::createFromAscii( "en" );
+ aParamsSeq[1] = uno::makeAny( aLang );
+
+ aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
+ aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
+
+ aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
+ rtl::OUString aSystemPath;
+ osl::FileBase::getSystemPathFromFileURL(
+ langFolderDestExpanded, aSystemPath );
+ aParamsSeq[5] = uno::makeAny( aSystemPath );
+
+ Sequence< sal_Int16 > aOutParamIndex;
+ Sequence< uno::Any > aOutParam;
+ uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
+ aParamsSeq, aOutParamIndex, aOutParam );
+ }
+
+ if( !bSuccess )
{
- aErrStr = getResourceString( nErrStrId );
-
- // Remoce CR/LF
- rtl::OUString aErrMsg( aErrorInfo.m_aErrorMsg );
- sal_Unicode nCR = 13, nLF = 10;
- sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
- sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
- sal_Int32 nCopy;
- if( nSearchCR != -1 || nSearchLF != -1 )
+ USHORT nErrStrId = 0;
+ switch( aErrorInfo.m_eErrorClass )
{
- if( nSearchCR == -1 )
- nCopy = nSearchLF;
- else if( nSearchLF == -1 )
- nCopy = nSearchCR;
- else
- nCopy = ( nSearchCR < nSearchLF ) ? nSearchCR : nSearchLF;
-
- aErrMsg = aErrMsg.copy( 0, nCopy );
- }
- aErrStr += aErrMsg;
- if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
+ case HELPPROCESSING_GENERAL_ERROR:
+ case HELPPROCESSING_INTERNAL_ERROR: nErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
+ case HELPPROCESSING_XMLPARSING_ERROR: nErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
+ default: ;
+ };
+
+ rtl::OUString aErrStr;
+ if( nErrStrId != 0 )
{
- aErrStr += rtl::OUString::createFromAscii( " in " );
-
- rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
- rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- aErrStr += aDecodedFile;
- if( aErrorInfo.m_nXMLParsingLine != -1 )
+ aErrStr = getResourceString( nErrStrId );
+
+ // Remoce CR/LF
+ rtl::OUString aErrMsg( aErrorInfo.m_aErrorMsg );
+ sal_Unicode nCR = 13, nLF = 10;
+ sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
+ sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
+ sal_Int32 nCopy;
+ if( nSearchCR != -1 || nSearchLF != -1 )
+ {
+ if( nSearchCR == -1 )
+ nCopy = nSearchLF;
+ else if( nSearchLF == -1 )
+ nCopy = nSearchCR;
+ else
+ nCopy = ( nSearchCR < nSearchLF ) ? nSearchCR : nSearchLF;
+
+ aErrMsg = aErrMsg.copy( 0, nCopy );
+ }
+ aErrStr += aErrMsg;
+ if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
{
- aErrStr += rtl::OUString::createFromAscii( ", line " );
- aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
+ aErrStr += rtl::OUString::createFromAscii( " in " );
+
+ rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
+ rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ aErrStr += aDecodedFile;
+ if( aErrorInfo.m_nXMLParsingLine != -1 )
+ {
+ aErrStr += rtl::OUString::createFromAscii( ", line " );
+ aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
+ }
}
}
- }
- OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
- throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
- makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
+ throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
+ makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ }
}
}
}
+ //Writing the data entry replaces writing the flag file. If we got to this
+ //point the registration was successful.
+ addDataToDb(xPackage->getURL(), data);
}
- //Writing the data entry replaces writing the flag file. If we got to this
- //point the registration was successful.
- addDataToDb(xPackage->getURL(), data);
} //if (doRegisterPackage)
else
{
- deleteDataFromDb(xPackage->getURL());
+ revokeEntryFromDb(xPackage->getURL());
}
}
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index 8ec9a39d5050..81057f744640 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
@@ -83,11 +83,14 @@ OUString HelpBackendDb::getKeyElementName()
void HelpBackendDb::addEntry(::rtl::OUString const & url, Data const & data)
{
try{
- Reference<css::xml::dom::XNode> helpNode
- = writeKeyElement(url);
+ if (!activateEntry(url))
+ {
+ Reference<css::xml::dom::XNode> helpNode
+ = writeKeyElement(url);
- writeSimpleElement(OUSTR("data-url"), data.dataUrl, helpNode);
- save();
+ writeSimpleElement(OUSTR("data-url"), data.dataUrl, helpNode);
+ save();
+ }
}
catch (css::deployment::DeploymentException& )
{
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
index c7b730fd1b99..bcff008c00ae 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
@@ -76,6 +76,8 @@ public:
void addEntry(::rtl::OUString const & url, Data const & data);
::boost::optional<Data> getEntry(::rtl::OUString const & url);
+ //must also return the data urls for entries with @activ="false". That is,
+ //those are currently revoked.
::std::list< ::rtl::OUString> getAllDataUrls();
};
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index 20fc2a8dc7e1..80aec2402a59 100755
--- a/desktop/source/deployment/registry/inc/dp_backend.h
+++ b/desktop/source/deployment/registry/inc/dp_backend.h
@@ -299,7 +299,7 @@ protected:
// currently only for library containers:
enum {
CONTEXT_UNKNOWN,
- CONTEXT_USER, CONTEXT_SHARED,CONTEXT_BUNDLED, CONTEXT_TMP,
+ CONTEXT_USER, CONTEXT_SHARED,CONTEXT_BUNDLED, CONTEXT_TMP, CONTEXT_BUNDLED_PREREG,
CONTEXT_DOCUMENT
} m_eContext;
bool m_readOnly;
@@ -345,6 +345,18 @@ protected:
static void deleteTempFolder(
::rtl::OUString const & folderUrl);
+ ::rtl::OUString getSharedRegistrationDataURL(
+ css::uno::Reference<css::deployment::XPackage> const & extension,
+ css::uno::Reference<css::deployment::XPackage> const & item);
+
+ /* The backends must implement this function, which is called
+ from XPackageRegistry::packageRemoved (also implemented here).
+ This ensure that the backends clean up their registration data
+ when an extension was removed.
+ */
+// virtual void deleteDbEntry( ::rtl::OUString const & url) = 0;
+
+
public:
struct StrRegisteringPackage : public ::dp_misc::StaticResourceString<
@@ -373,6 +385,12 @@ public:
css::deployment::InvalidRemovedParameterException,
css::ucb::CommandFailedException,
css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+// virtual void SAL_CALL packageRemoved(
+// ::rtl::OUString const & url, ::rtl::OUString const & mediaType)
+// throw (css::deployment::DeploymentException,
+// css::uno::RuntimeException);
+
};
}
diff --git a/desktop/source/deployment/registry/inc/dp_backenddb.hxx b/desktop/source/deployment/registry/inc/dp_backenddb.hxx
index a0e477979f8c..299a6ec328ce 100644
--- a/desktop/source/deployment/registry/inc/dp_backenddb.hxx
+++ b/desktop/source/deployment/registry/inc/dp_backenddb.hxx
@@ -147,6 +147,18 @@ public:
virtual ~BackendDb() {};
void removeEntry(::rtl::OUString const & url);
+
+ /* This is called to write the "revoked" attribute to the entry.
+ This is done when XPackage::revokePackage is called.
+ */
+ void revokeEntry(::rtl::OUString const & url);
+
+ /* returns false if the entry does not exist yet.
+ */
+ bool activateEntry(::rtl::OUString const & url);
+
+ bool hasActiveEntry(::rtl::OUString const & url);
+
};
class RegisteredDb: public BackendDb
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
index 2e92a907f8fb..660d6bb374c3 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
@@ -82,15 +82,19 @@ OUString ExtensionBackendDb::getKeyElementName()
void ExtensionBackendDb::addEntry(::rtl::OUString const & url, Data const & data)
{
try{
- Reference<css::xml::dom::XNode> extensionNodeNode = writeKeyElement(url);
- writeVectorOfPair(
- data.items,
- OUSTR("extension-items"),
- OUSTR("item"),
- OUSTR("url"),
- OUSTR("media-type"),
- extensionNodeNode);
- save();
+ //reactive revoked entry if possible.
+ if (!activateEntry(url))
+ {
+ Reference<css::xml::dom::XNode> extensionNodeNode = writeKeyElement(url);
+ writeVectorOfPair(
+ data.items,
+ OUSTR("extension-items"),
+ OUSTR("item"),
+ OUSTR("url"),
+ OUSTR("media-type"),
+ extensionNodeNode);
+ save();
+ }
}
catch(css::uno::Exception &)
{
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 262bbef420f2..d247597a808f 100755..100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -250,7 +250,7 @@ class BackendImpl : public ImplBaseT
void addDataToDb(OUString const & url, ExtensionBackendDb::Data const & data);
ExtensionBackendDb::Data readDataFromDb(OUString const & url);
- void deleteDataFromDb(OUString const & url);
+ void revokeEntryFromDb(OUString const & url);
// PackageRegistryBackend
virtual Reference<deployment::XPackage> bindPackage_(
@@ -276,6 +276,9 @@ public:
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException);
using ImplBaseT::disposing;
};
@@ -360,6 +363,21 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
return m_typeInfos;
}
+void BackendImpl::packageRemoved(OUString const & url, OUString const & /*mediaType*/)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException)
+{
+ //Notify the backend responsible for processing the different media
+ //types that this extension was removed.
+ ExtensionBackendDb::Data data = readDataFromDb(url);
+ for (ExtensionBackendDb::Data::ITC_ITEMS i = data.items.begin(); i != data.items.end(); i++)
+ {
+ m_xRootRegistry->packageRemoved(i->first, i->second);
+ }
+
+ if (m_backendDb.get())
+ m_backendDb->removeEntry(url);
+}
// PackageRegistryBackend
@@ -460,10 +478,10 @@ ExtensionBackendDb::Data BackendImpl::readDataFromDb(
return data;
}
-void BackendImpl::deleteDataFromDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(OUString const & url)
{
if (m_backendDb.get())
- m_backendDb->removeEntry(url);
+ m_backendDb->revokeEntry(url);
}
@@ -973,7 +991,7 @@ void BackendImpl::PackageImpl::processPackage_(
// selected
}
}
- getMyBackend()->deleteDataFromDb(getURL());
+ getMyBackend()->revokeEntryFromDb(getURL());
}
}
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index edeae256cbaf..dddf82e09790 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -101,13 +101,8 @@ class BackendImpl : public t_helper
Reference<XCommandEnvironment> const & xCmdEnv );
void addDataToDb(OUString const & url);
- void deleteDataFromDb(OUString const & url);
- bool isRegisteredInDb(OUString const & url);
-
-
-
-// Reference< ucb::XSimpleFileAccess > getFileAccess( void );
-// Reference< ucb::XSimpleFileAccess > m_xSFA;
+ bool hasActiveEntry(OUString const & url);
+ void revokeEntryFromDb(OUString const & url);
const Reference<deployment::XPackageTypeInfo> m_xBasicLibTypeInfo;
const Reference<deployment::XPackageTypeInfo> m_xDialogLibTypeInfo;
@@ -123,6 +118,10 @@ public:
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException);
+
};
//______________________________________________________________________________
@@ -191,18 +190,11 @@ void BackendImpl::addDataToDb(OUString const & url)
m_backendDb->addEntry(url);
}
-bool BackendImpl::isRegisteredInDb(OUString const & url)
+bool BackendImpl::hasActiveEntry(OUString const & url)
{
- bool registered = false;
if (m_backendDb.get())
- registered = m_backendDb->getEntry(url);
- return registered;
-}
-
-void BackendImpl::deleteDataFromDb(OUString const & url)
-{
- if (m_backendDb.get())
- m_backendDb->removeEntry(url);
+ return m_backendDb->hasActiveEntry(url);
+ return false;
}
// XUpdatable
@@ -219,6 +211,19 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
{
return m_typeInfos;
}
+void BackendImpl::revokeEntryFromDb(OUString const & url)
+{
+ if (m_backendDb.get())
+ m_backendDb->revokeEntry(url);
+}
+
+void BackendImpl::packageRemoved(OUString const & url, OUString const & /*mediaType*/)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException)
+{
+ if (m_backendDb.get())
+ m_backendDb->removeEntry(url);
+}
// PackageRegistryBackend
//______________________________________________________________________________
@@ -321,7 +326,7 @@ BackendImpl::PackageImpl::isRegistered_(
BackendImpl * that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
- bool registered = that->isRegisteredInDb(getURL());
+ bool registered = that->hasActiveEntry(getURL());
return beans::Optional< beans::Ambiguous<sal_Bool> >(
true /* IsPresent */,
beans::Ambiguous<sal_Bool>( registered, false /* IsAmbiguous */ ) );
@@ -367,7 +372,7 @@ void BackendImpl::PackageImpl::processPackage_(
xComponentContext ), UNO_QUERY_THROW );
}
}
- bool bRegistered = getMyBackend()->isRegisteredInDb(getURL());
+ bool bRegistered = getMyBackend()->hasActiveEntry(getURL());
if( !doRegisterPackage )
{
//We cannot just call removeLibrary(name) because this could remove a
@@ -399,7 +404,7 @@ void BackendImpl::PackageImpl::processPackage_(
xDialogLibs->removeLibrary(m_dialogName);
}
}
- getMyBackend()->deleteDataFromDb(getURL());
+ getMyBackend()->revokeEntryFromDb(getURL());
return;
}
}
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index f3195701fc7c..7e4be0f4e35a 100755
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -100,6 +100,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
const Reference<deployment::XPackageTypeInfo> m_xTypeInfo;
+
public:
BackendImpl(
Sequence<Any> const & args,
@@ -108,6 +109,9 @@ public:
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
+ virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException);
};
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
@@ -218,6 +222,8 @@ BackendImpl::BackendImpl(
}
}
+
+
// XPackageRegistry
//______________________________________________________________________________
Sequence< Reference<deployment::XPackageTypeInfo> >
@@ -226,6 +232,12 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException)
return Sequence< Reference<deployment::XPackageTypeInfo> >(&m_xTypeInfo, 1);
}
+void BackendImpl::packageRemoved(OUString const & /*url*/, OUString const & /*mediaType*/)
+ throw (deployment::DeploymentException,
+ uno::RuntimeException)
+{
+}
+
// PackageRegistryBackend
//______________________________________________________________________________
Reference<deployment::XPackage> BackendImpl::bindPackage_(
@@ -338,6 +350,11 @@ void BackendImpl::PackageImpl:: initPackageHandler()
{
aContext <<= OUSTR("bundled");
}
+ else if ( that->m_eContext == CONTEXT_BUNDLED_PREREG )
+ {
+ aContext <<= OUSTR("bundled_prereg");
+ }
+
else
{
OSL_ASSERT( 0 );
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 4545ed862271..83552cb7c4c6 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -380,7 +380,12 @@ extern "C" int unopkg_main()
}
else if (subCommand.equals(OUSTR("sync")))
{
- //sync is private!!!! Only for bundled extensions!!!
+ //sync is private!!!! Only to be called from setup!!!
+ //The UserInstallation is diverted to the prereg folder. But only
+ //the lock file is written! This requires that
+ //-env:UNO_JAVA_JFW_INSTALL_DATA is passed to javaldx and unopkg otherwise the
+ //javasettings file is written to the prereg folder.
+ //
//For performance reasons unopkg sync is called during the setup and
//creates the registration data for the repository of the bundled
//extensions. It is then copied to the user installation during
@@ -395,10 +400,21 @@ extern "C" int unopkg_main()
//$BUNDLED_EXTENSIONS_USER
if (hasNoFolder(OUSTR("$BRAND_BASE_DIR/share/extensions")))
{
- removeFolder(OUSTR("$BUNDLED_EXTENSIONS_USER"));
+ removeFolder(OUSTR("$BUNDLED_EXTENSIONS_PREREG"));
//return otherwise we create the registration data again
return 0;
}
+ //redirect the UserInstallation, so we do not create a
+ //user installation for the admin and we also do not need
+ //to call unopkg with -env:UserInstallation
+ ::rtl::Bootstrap::set(OUSTR("UserInstallation"),
+ OUSTR("$BUNDLED_EXTENSIONS_PREREG/.."));
+ //Setting UNO_JAVA_JFW_INSTALL_DATA causes the javasettings to be written
+ //in the office installation. We do not want to create the user data folder
+ //for the admin. The value must also be set in the unopkg script (Linux, etc.)
+ //when calling javaldx
+ ::rtl::Bootstrap::set(OUSTR("UNO_JAVA_JFW_INSTALL_DATA"),
+ OUSTR("$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml"));
}
@@ -418,6 +434,7 @@ extern "C" int unopkg_main()
//prevent the deletion of the registry data folder
//synching is done in XExtensionManager.reinstall
if (!subcmd_gui && ! subCommand.equals(OUSTR("reinstall"))
+ && ! subCommand.equals(OUSTR("sync"))
&& ! dp_misc::office_is_running())
dp_misc::syncRepositories(xCmdEnv);
@@ -613,12 +630,15 @@ extern "C" int unopkg_main()
}
else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("sync")))
{
- //This sub command may be removed later and is only there to have a
- //possibility to start extension synching without any output.
- //This is just here so we do not get an error, because of an unknown
- //sub-command. We do synching before
- //the sub-commands are processed.
-
+ if (! dp_misc::office_is_running())
+ {
+ xExtensionManager->synchronizeBundledPrereg(
+ Reference<task::XAbortChannel>(), xCmdEnv);
+ }
+ else
+ {
+ dp_misc::writeConsoleError(OUSTR("\nError: office is running"));
+ }
}
else
{
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index d7b6e1ca2336..f6773b768062 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -396,6 +396,7 @@ Reference<XComponentContext> bootstrapStandAlone(
if (! ::ucbhelper::ContentBroker::initialize( xServiceManager, ucb_args ))
throw RuntimeException( OUSTR("cannot initialize UCB!"), 0 );
+ disposeGuard.setDeinitUCB();
return xContext;
}
@@ -627,7 +628,7 @@ void removeFolder(OUString const & folderUrl)
dir.close();
::osl::Directory::remove(url);
}
- else
+ else if (rc != osl::File::E_NOENT)
{
dp_misc::writeConsole(
OUSTR("unopkg: Error while removing ") + url + OUSTR("\n"));
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 4975cc4c087b..55c86260ca8f 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -34,6 +34,7 @@
#include "tools/resmgr.hxx"
#include "rtl/ustring.hxx"
#include "unotools/configmgr.hxx"
+#include "ucbhelper/contentbroker.hxx"
#define APP_NAME "unopkg"
@@ -137,15 +138,14 @@ bool isBootstrapVariable(sal_uInt32 * pIndex);
class DisposeGuard
{
css::uno::Reference<css::lang::XComponent> m_xComp;
-
+ bool m_bDeinitUCB;
public:
- inline DisposeGuard() {}
- inline DisposeGuard(
- css::uno::Reference<css::lang::XComponent> const & xComp )
- : m_xComp( xComp ) {}
-
+ DisposeGuard(): m_bDeinitUCB(false) {}
inline ~DisposeGuard()
{
+ if (m_bDeinitUCB)
+ ::ucbhelper::ContentBroker::deinitialize();
+
if (m_xComp.is())
m_xComp->dispose();
}
@@ -155,6 +155,12 @@ public:
{
m_xComp = xComp;
}
+
+ inline void setDeinitUCB()
+ {
+ m_bDeinitUCB = true;
+ }
+
};
//==============================================================================
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
index 80e34ba27701..752bf6d13849 100644
--- a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
@@ -84,19 +84,18 @@ namespace drawinglayer
aOutlineRange.transform(aSimpleObjectMatrix);
}
- // prepare dest coor
- const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
- const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
- const Rectangle aDestRectPixel(
- basegfx::fround(aOutlineRange.getMinX()),
- basegfx::fround(aOutlineRange.getMinY()),
- nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
- nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
+ // prepare dest coordinates
+ const Point aPoint(
+ basegfx::fround(aOutlineRange.getMinX()),
+ basegfx::fround(aOutlineRange.getMinY()));
+ const Size aSize(
+ basegfx::fround(aOutlineRange.getWidth()),
+ basegfx::fround(aOutlineRange.getHeight()));
// paint it using GraphicManager
Graphic aGraphic(rBitmapEx);
GraphicObject aGraphicObject(aGraphic);
- aGraphicObject.Draw(&rOutDev, aDestRectPixel.TopLeft(), aDestRectPixel.GetSize(), &aAttributes);
+ aGraphicObject.Draw(&rOutDev, aPoint, aSize, &aAttributes);
}
void RenderBitmapPrimitive2D_BitmapEx(
@@ -110,13 +109,13 @@ namespace drawinglayer
// prepare dest coor. Necessary to expand since vcl's DrawBitmapEx draws one pix less
basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
aOutlineRange.transform(rTransform);
- const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
- const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
- const Rectangle aDestRectPixel(
- basegfx::fround(aOutlineRange.getMinX()),
- basegfx::fround(aOutlineRange.getMinY()),
- nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
- nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
+ // prepare dest coordinates
+ const Point aPoint(
+ basegfx::fround(aOutlineRange.getMinX()),
+ basegfx::fround(aOutlineRange.getMinY()));
+ const Size aSize(
+ basegfx::fround(aOutlineRange.getWidth()),
+ basegfx::fround(aOutlineRange.getHeight()));
// decompose matrix to check for shear, rotate and mirroring
basegfx::B2DVector aScale, aTranslate;
@@ -142,7 +141,7 @@ namespace drawinglayer
}
// draw bitmap
- rOutDev.DrawBitmapEx(aDestRectPixel.TopLeft(), aDestRectPixel.GetSize(), aContent);
+ rOutDev.DrawBitmapEx(aPoint, aSize, aContent);
}
void RenderBitmapPrimitive2D_self(
@@ -153,13 +152,11 @@ namespace drawinglayer
// process self with free transformation (containing shear and rotate). Get dest rect in pixels.
basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
aOutlineRange.transform(rTransform);
- const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
- const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
const Rectangle aDestRectLogic(
basegfx::fround(aOutlineRange.getMinX()),
basegfx::fround(aOutlineRange.getMinY()),
- nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
- nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
+ basegfx::fround(aOutlineRange.getMaxX()),
+ basegfx::fround(aOutlineRange.getMaxY()));
const Rectangle aDestRectPixel(rOutDev.LogicToPixel(aDestRectLogic));
// #i96708# check if Metafile is recorded
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index d53bfcf1aaf2..83f0ab6c54e8 100644..100755
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -853,7 +853,7 @@
#include "vcl/cursor.hxx"
#include "vcl/decoview.hxx"
#include "vcl/dndhelp.hxx"
-#include "vcl/fldunit.hxx"
+#include "tools/fldunit.hxx"
#include "vcl/fntstyle.hxx"
#include "unotools/fontcvt.hxx"
#include "vcl/gdimtf.hxx"
@@ -872,7 +872,7 @@
#include "vcl/unohelp.hxx"
#include "vcl/unohelp2.hxx"
#include "vcl/wall.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "vos/mutex.hxx"
#include "vos/ref.hxx"
#include "vos/refernce.hxx"
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 3d360245f1ea..2a56a0acb52a 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -165,7 +165,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange
void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
{
// TODO: may be needs interaction handler to detect wherether the object state
- // can be changed even after errors
+ // can be changed even after errors
if ( m_nObjectState == embed::EmbedStates::LOADED )
{
@@ -485,14 +485,19 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState )
{
if ( nOldState != m_nObjectState )
// notify listeners that the object has changed the state
- StateChangeNotification_Impl( sal_False, nOldState, m_nObjectState ,aGuard);
+ StateChangeNotification_Impl( sal_False, nOldState, m_nObjectState, aGuard );
throw;
}
}
// notify listeners that the object has changed the state
- StateChangeNotification_Impl( sal_False, nOldState, nNewState,aGuard );
+ StateChangeNotification_Impl( sal_False, nOldState, nNewState, aGuard );
+
+ // let the object window be shown
+ if ( nNewState == embed::EmbedStates::UI_ACTIVE || nNewState == embed::EmbedStates::INPLACE_ACTIVE )
+ PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ),
+ uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
}
}
@@ -501,7 +506,6 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -517,7 +521,6 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -538,7 +541,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID )
{
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" );
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ResettableMutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -561,7 +564,10 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID )
// TODO/LATER: check if the verb is a supported one and if it is produce related operation
}
else
+ {
+ aGuard.clear();
changeState( nNewState );
+ }
}
//----------------------------------------------
@@ -569,7 +575,6 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -606,7 +611,6 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
@@ -659,7 +663,6 @@ sal_Int64 SAL_CALL OCommonEmbeddedObject::getStatus( sal_Int64 )
throw ( embed::WrongStateException,
uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index e0ff1266921a..f4c0c90162ed 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -342,7 +342,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName,
aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) );
// For now all the events are sent as object events
// aEvent.Source = ( xSource.is() ? xSource
- // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) );
+ // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) );
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
{
@@ -476,9 +476,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getImplementationId()
uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
- throw lang::DisposedException(); // TODO
+ throw lang::DisposedException();
return m_aClassID;
}
@@ -487,9 +486,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
::rtl::OUString SAL_CALL OCommonEmbeddedObject::getClassName()
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
- throw lang::DisposedException(); // TODO
+ throw lang::DisposedException();
return m_aClassName;
}
@@ -521,9 +519,9 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent(
}
// if ( m_bWaitSaveCompleted )
- // throw embed::WrongStateException(
- // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ),
- // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) );
+ // throw embed::WrongStateException(
+ // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ),
+ // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) );
return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY );
}
diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx
index 21839554aefc..c203924f6e51 100644
--- a/fpicker/source/office/OfficeFilePicker.hxx
+++ b/fpicker/source/office/OfficeFilePicker.hxx
@@ -42,7 +42,7 @@
#endif
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include "commonpicker.hxx"
#include "pickercallbacks.hxx"
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index 509c22d3477d..3848ab081186 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -1445,7 +1445,7 @@ uno::Sequence<sal_Int16> SAL_CALL SalGtkFilePicker::getSupportedImageFormats() t
OSL_ASSERT( m_pDialog != NULL );
// TODO return m_pImpl->getSupportedImageFormats();
- return 0;
+ return uno::Sequence<sal_Int16>();
}
sal_Int32 SAL_CALL SalGtkFilePicker::getTargetColorDepth() throw( uno::RuntimeException )
diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk
index 33d8959a474e..013fe5bbf56c 100644
--- a/framework/Library_fwe.mk
+++ b/framework/Library_fwe.mk
@@ -105,11 +105,24 @@ $(eval $(call gb_Library_add_linked_libs,fwe,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwe,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwe,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# TODO: visibility
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwi.mk b/framework/Library_fwi.mk
index 568f0a1eb22a..8512b3a874fe 100644
--- a/framework/Library_fwi.mk
+++ b/framework/Library_fwi.mk
@@ -84,6 +84,21 @@ $(eval $(call gb_Library_add_linked_libs,fwi,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwi,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ msvcrt \
+ unicows \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwi,\
advapi32 \
kernel32 \
@@ -93,5 +108,6 @@ $(eval $(call gb_Library_add_linked_libs,fwi,\
uwinapi \
))
endif
+endif
# TODO: visibility
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk
index 50c16b83b42a..1df0c931e564 100644
--- a/framework/Library_fwk.mk
+++ b/framework/Library_fwk.mk
@@ -190,10 +190,23 @@ $(eval $(call gb_Library_add_linked_libs,fwk,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwk,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwk,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwl.mk b/framework/Library_fwl.mk
index d2002115eaf0..b8b5290f1749 100644
--- a/framework/Library_fwl.mk
+++ b/framework/Library_fwl.mk
@@ -90,10 +90,23 @@ $(eval $(call gb_Library_add_linked_libs,fwl,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwl,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwl,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwm.mk b/framework/Library_fwm.mk
index 9ff49719148a..e67c2a627091 100644
--- a/framework/Library_fwm.mk
+++ b/framework/Library_fwm.mk
@@ -72,10 +72,23 @@ $(eval $(call gb_Library_add_linked_libs,fwm,\
))
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fwm,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ kernel32 \
+ msvcrt \
+))
+else
$(eval $(call gb_Library_add_linked_libs,fwm,\
kernel32 \
msvcrt \
uwinapi \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/framework/inc/pch/precompiled_framework.hxx b/framework/inc/pch/precompiled_framework.hxx
index 45919a31047b..b4afb017ebab 100644
--- a/framework/inc/pch/precompiled_framework.hxx
+++ b/framework/inc/pch/precompiled_framework.hxx
@@ -463,7 +463,7 @@
#include "vcl/keycod.hxx"
#include "vcl/keycodes.hxx"
#include "vcl/lstbox.hxx"
-#include "vcl/mapunit.hxx"
+#include "tools/mapunit.hxx"
#include "vcl/menu.hxx"
#include "vcl/mnemonic.hxx"
#include "vcl/morebtn.hxx"
@@ -482,7 +482,7 @@
#include "vcl/timer.hxx"
#include "vcl/wall.hxx"
#include "vcl/window.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "vos/mutex.hxx"
#include "vos/process.hxx"
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index 0110a0b40b9e..e6a638c654e9 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -85,7 +85,7 @@
#include <cppuhelper/implbase8.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <comphelper/propertycontainer.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <svtools/miscopt.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/timer.hxx>
diff --git a/framework/prj/build.lst b/framework/prj/build.lst
index 2c847918fee4..3a2eb98457f7 100644
--- a/framework/prj/build.lst
+++ b/framework/prj/build.lst
@@ -1,2 +1,3 @@
fr framework : LIBXSLT:libxslt l10n svtools NULL
fr framework\prj nmake - all fr_all NULL
+fr framework\qa\unoapi nmake - all fr_qa_unoapi NULL
diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..38a6cf7cced8
--- /dev/null
+++ b/framework/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = framework
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/framework/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index a71c5263455b..67c047dfefd4 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -61,7 +61,7 @@
#include <vcl/syswin.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
//_________________________________________________________________________________________________________________
// namespace
diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx
index dda5aa352a08..722ca164f2b5 100755..100644
--- a/framework/source/layoutmanager/uielement.cxx
+++ b/framework/source/layoutmanager/uielement.cxx
@@ -132,24 +132,27 @@ namespace framework
UIElement& UIElement::operator= ( const UIElement& rUIElement )
{
- m_aType = rUIElement.m_aType;
- m_aName = rUIElement.m_aName;
- m_aUIName = rUIElement.m_aUIName;
- m_xUIElement = rUIElement.m_xUIElement;
- m_bFloating = rUIElement.m_bFloating;
- m_bVisible = rUIElement.m_bVisible;
- m_bUserActive = rUIElement.m_bUserActive;
- m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0;
- m_bDeactiveHide = rUIElement.m_bDeactiveHide;
- m_bMasterHide = rUIElement.m_bMasterHide;
- m_bContextSensitive = rUIElement.m_bContextSensitive;
- m_bContextActive = rUIElement.m_bContextActive;
- m_bNoClose = rUIElement.m_bNoClose;
- m_bSoftClose = rUIElement.m_bSoftClose;
- m_bStateRead = rUIElement.m_bStateRead;
- m_nStyle = rUIElement.m_nStyle;
- m_aDockedData = rUIElement.m_aDockedData;
- m_aFloatingData = rUIElement.m_aFloatingData;
+ if (&rUIElement != this)
+ {
+ m_aType = rUIElement.m_aType;
+ m_aName = rUIElement.m_aName;
+ m_aUIName = rUIElement.m_aUIName;
+ m_xUIElement = rUIElement.m_xUIElement;
+ m_bFloating = rUIElement.m_bFloating;
+ m_bVisible = rUIElement.m_bVisible;
+ m_bUserActive = rUIElement.m_bUserActive;
+ m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0;
+ m_bDeactiveHide = rUIElement.m_bDeactiveHide;
+ m_bMasterHide = rUIElement.m_bMasterHide;
+ m_bContextSensitive = rUIElement.m_bContextSensitive;
+ m_bContextActive = rUIElement.m_bContextActive;
+ m_bNoClose = rUIElement.m_bNoClose;
+ m_bSoftClose = rUIElement.m_bSoftClose;
+ m_bStateRead = rUIElement.m_bStateRead;
+ m_nStyle = rUIElement.m_nStyle;
+ m_aDockedData = rUIElement.m_aDockedData;
+ m_aFloatingData = rUIElement.m_aFloatingData;
+ }
return *this;
}
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index af7e98e8ec23..c14957be7b7d 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -51,7 +51,7 @@
#ifndef _VCL_MENU_HXX_
#include <vcl/menu.hxx>
#endif
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#ifndef _VCL_SVAPP_HXX_
#include <vcl/svapp.hxx>
#endif
diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 5c735744104b..2616566225b9 100755..100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -1698,7 +1698,7 @@
<value xml:lang="es">.uno:Bold</value>
</prop>
</node>
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
</prop>
@@ -1893,7 +1893,7 @@
</node>
</node>
<node oor:name="com.sun.star.presentation.PresentationDocument" oor:op="replace">
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command">
<value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
@@ -2739,7 +2739,7 @@
<value xml:lang="es">.uno:Bold</value>
</prop>
</node>
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
</prop>
@@ -3374,7 +3374,7 @@
<value xml:lang="es">.uno:Bold</value>
</prop>
</node>
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
</prop>
@@ -3979,7 +3979,7 @@
<value xml:lang="es">.uno:Bold</value>
</prop>
</node>
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
</prop>
@@ -4589,7 +4589,7 @@
<value xml:lang="es">.uno:Bold</value>
</prop>
</node>
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
</prop>
@@ -5204,7 +5204,7 @@
<value xml:lang="es">.uno:Bold</value>
</prop>
</node>
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
</prop>
@@ -5567,7 +5567,7 @@
</node>
</node>
<node oor:name="com.sun.star.drawing.DrawingDocument" oor:op="replace">
- <node oor:name="N_MOD1_MOD2" oor:op="replace">
+ <node oor:name="C_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command">
<value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:InsertAnnotation</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 46611715f998..7b83b162338e 100755
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -3412,7 +3412,7 @@
</node>
<node oor:name=".uno:BmpMask" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Eyedropper</value>
+ <value xml:lang="en-US">Color ~Replacer</value>
</prop>
</node>
<node oor:name=".uno:GoLeftBlock" oor:op="replace">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 9bc07c592f0f..ae171230dd13 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2600,39 +2600,6 @@
</constraints>
<value>100</value>
</prop>
- <prop oor:name="LookAndFeel" oor:type="xs:short">
- <!-- OldPath: General/View -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Tools Options - General View [Section] Display -->
- <info>
- <author>PB</author>
- <desc>Determines the look and feel of the application.</desc>
- <label>Look &amp; Feel</label>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Standard</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Macintosh</desc>
- </info>
- </enumeration>
- <enumeration oor:value="2">
- <info>
- <desc>X Window</desc>
- </info>
- </enumeration>
- <enumeration oor:value="3">
- <info>
- <desc>OS/2</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
<group oor:name="NewDocumentHandling">
<info>
<author>CD</author>
@@ -2714,17 +2681,6 @@
</info>
<value>true</value>
</prop>
- <prop oor:name="ColoredTab" oor:type="xs:boolean">
- <!-- OldPath: General/View -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Tools Options - General View [Section] Options -->
- <info>
- <author>PB</author>
- <desc>Specifies TabDialogs with colored tab control (True)</desc>
- <label>Colored tab controls</label>
- </info>
- <value>false</value>
- </prop>
<prop oor:name="MousePositioning" oor:type="xs:short">
<!-- OldPath: General/View -->
<!-- OldLocation: soffice.cfg -->
@@ -2780,17 +2736,6 @@
</constraints>
<value>1</value>
</prop>
- <prop oor:name="SingleLineTab" oor:type="xs:boolean">
- <!-- OldPath: General/View -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Tools Options - General View [Section] Options -->
- <info>
- <author>PB</author>
- <desc>Specifies TabDialogs with single line tab control (True).</desc>
- <label>Single line tab controls</label>
- </info>
- <value>false</value>
- </prop>
</group>
<group oor:name="Localisation">
<info>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
index e133b7a5a957..6dd518250d4a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
@@ -282,7 +282,7 @@
<desc>Indicates whether moving while holding the Control key makes a copy of the moved object.</desc>
<label>Copy while moving</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="ObjectMoveable" oor:type="xs:boolean">
<!-- OldPath: Draw/Other -->
@@ -410,7 +410,7 @@
<desc>Indicates whether a simple click on a text object changes it to edit mode.</desc>
<label>Allow quick editing</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="Selectable" oor:type="xs:boolean">
<!-- OldPath: Draw/Other/Text_Objects -->
@@ -824,7 +824,7 @@
<desc>Specifies the number of points between two grid points on the X axis.</desc>
<label>X Axis Subdivision</label>
</info>
- <value>1</value>
+ <value>9</value>
</prop>
<prop oor:name="YAxis" oor:type="xs:double">
<!-- OldPath: Draw/Grid/Subdivision -->
@@ -836,7 +836,7 @@
<desc>Specifies the number of points between two grid points on the Y axis.</desc>
<label>Y Axis Subdivision</label>
</info>
- <value>1</value>
+ <value>9</value>
</prop>
</group>
<group oor:name="SnapGrid">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index 8317e3e0082d..871c5c2c1494 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -331,7 +331,7 @@
<desc>Indicates whether moving while holding the Control key makes a copy of the moved object.</desc>
<label>Copy while moving</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="ObjectMoveable" oor:type="xs:boolean">
<!-- OldPath: Impress/Other -->
@@ -371,7 +371,7 @@
<desc>Indicates whether a double-click on an object activates the rotation mode.</desc>
<label>Rotation Mode after clicking object</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="Preview" oor:type="xs:double">
<!-- OldPath: Impress/Other -->
@@ -426,7 +426,7 @@
<desc>Indicates whether to show big (true) or small (false) handles.</desc>
<label>Big Handles</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="ModifyWithAttributes" oor:type="xs:boolean">
<!-- OldPath: Impress/Other -->
@@ -537,6 +537,29 @@
</info>
<value>0</value>
</prop>
+ <prop oor:name="PenColor" oor:type="xs:int">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: slide show context menu -->
+ <info>
+ <author>CL</author>
+ <desc>Color of the pen during slideshow.</desc>
+ <label>Pen Color</label>
+ </info>
+ <value>16711680</value>
+ </prop>
+ <prop oor:name="PenWidth" oor:type="xs:double">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: slide show context menu -->
+ <info>
+ <author>CL</author>
+ <desc>Width of the pen during slideshow.</desc>
+ <label>Pen Width</label>
+ </info>
+ <value>150</value>
+ </prop>
+
<group oor:name="TextObject">
<info>
<desc>Contains text editing related configuration items.</desc>
@@ -679,7 +702,7 @@
<desc>Indicates whether to snap at snap lines.</desc>
<label>Snap lines</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="PageMargin" oor:type="xs:boolean">
<!-- OldPath: Impress/Snap/Objects -->
@@ -699,7 +722,7 @@
<desc>Indicates whether to justify the outline of an object to that of an adjacent object.</desc>
<label>Object frame</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="ObjectPoint" oor:type="xs:boolean">
<!-- OldPath: Impress/Snap/Objects -->
@@ -871,14 +894,14 @@
<desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc>
<label/>
</info>
- <value>1000</value>
+ <value>2000</value>
</prop>
<prop oor:name="NonMetric" oor:type="xs:int">
<info>
<desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc>
<label/>
</info>
- <value>1270</value>
+ <value>2540</value>
</prop>
</group>
<group oor:name="YAxis">
@@ -895,14 +918,14 @@
<desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc>
<label/>
</info>
- <value>1000</value>
+ <value>2000</value>
</prop>
<prop oor:name="NonMetric" oor:type="xs:int">
<info>
<desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc>
<label/>
</info>
- <value>1270</value>
+ <value>2540</value>
</prop>
</group>
</group>
@@ -919,7 +942,7 @@
<desc>Specifies the number of points between two adjacent grid points on the X axis.</desc>
<label>X Axis Subdivision</label>
</info>
- <value>1</value>
+ <value>9</value>
</prop>
<prop oor:name="YAxis" oor:type="xs:double">
<!-- OldPath: Impress/Grid/Subdivision -->
@@ -930,7 +953,7 @@
<desc>Specifies the number of intervals between two adjacent grid points on the Y axis</desc>
<label>Y Axis Subdivision</label>
</info>
- <value>1</value>
+ <value>9</value>
</prop>
</group>
<group oor:name="SnapGrid">
@@ -961,7 +984,7 @@
<desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc>
<label/>
</info>
- <value>1000</value>
+ <value>100</value>
</prop>
<prop oor:name="NonMetric" oor:type="xs:int">
<info>
@@ -985,7 +1008,7 @@
<desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc>
<label/>
</info>
- <value>1000</value>
+ <value>100</value>
</prop>
<prop oor:name="NonMetric" oor:type="xs:int">
<info>
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index aa3270e08a07..ad1419add42a 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -63,8 +63,11 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/passwd.src \
sfx2/source/dialog/printopt.src \
sfx2/source/dialog/recfloat.src \
+ sfx2/source/dialog/securitypage.src \
sfx2/source/dialog/srchdlg.src \
+ sfx2/source/dialog/taskpane.src \
sfx2/source/dialog/templdlg.src \
+ sfx2/source/dialog/titledockwin.src \
sfx2/source/dialog/versdlg.src \
sfx2/source/doc/doc.src \
sfx2/source/doc/doctdlg.src \
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index ed941d5b9a9f..3c3ebe85294e 100755
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -285,6 +285,25 @@ $(eval $(call gb_Library_add_cxxobjects,sfx,\
, $(gb_LinkTarget_EXCEPTIONFLAGS) -nologo -UPRECOMPILED_HEADERS \
))
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,sfx,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ advapi32 \
+ gdi32 \
+ kernel32 \
+ msvcrt \
+ ole32 \
+ shell32 \
+ user32 \
+ uuid \
+))
+else
$(eval $(call gb_Library_add_linked_libs,sfx,\
advapi32 \
gdi32 \
@@ -297,6 +316,7 @@ $(eval $(call gb_Library_add_linked_libs,sfx,\
uuid \
uwinapi \
))
+endif
else
$(eval $(call gb_Library_add_cxxobjects,sfx,\
sfx2/source/appl/shutdowniconw32 \
diff --git a/sfx2/inc/frmload.hxx b/sfx2/inc/frmload.hxx
index c89c40b5470d..437f3bf07439 100644
--- a/sfx2/inc/frmload.hxx
+++ b/sfx2/inc/frmload.hxx
@@ -113,7 +113,7 @@ private:
const ::rtl::OUString& i_rFactoryURL
) const;
- SfxObjectShellLock impl_findObjectShell(
+ SfxObjectShellRef impl_findObjectShell(
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel2 >& i_rxDocument
) const;
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 1d4003fa44e6..45755cdd8799 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -654,7 +654,7 @@
#include "vcl/stdtext.hxx"
#include "vcl/timer.hxx"
#include "vcl/unohelp.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "vos/diagnose.hxx"
#include "vos/module.hxx"
#include "vos/mutex.hxx"
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 04239a7a1b56..87e62aef5b63 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -75,7 +75,6 @@ class SvStringsDtor;
#define OWEAKOBJECT ::cppu::OWeakObject
#define REFERENCE ::com::sun::star::uno::Reference
#define XINTERFACE ::com::sun::star::uno::XInterface
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define EXCEPTION ::com::sun::star::uno::Exception
#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
#define ANY ::com::sun::star::uno::Any
diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx
index fa15b4e85e9d..d24a38be0deb 100644
--- a/sfx2/inc/sfx2/event.hxx
+++ b/sfx2/inc/sfx2/event.hxx
@@ -119,7 +119,6 @@ public:
SfxObjectShell* GetObjShell() const { return _pObjShell; }
};
-class PrintDialog;
class Printer;
class SfxPrintingHint : public SfxHint
{
diff --git a/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx
index 092a53825a2e..d54dafd6e0b2 100644
--- a/sfx2/inc/sfx2/mnumgr.hxx
+++ b/sfx2/inc/sfx2/mnumgr.hxx
@@ -32,7 +32,7 @@
#ifndef _MENU_HXX //autogen //wg. MENU_APPEND !!!!
#include <vcl/menu.hxx>
#endif
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <tools/link.hxx>
#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <com/sun/star/uno/Sequence.hxx>
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
index 76c8b92ba2a9..f944b29c18da 100644
--- a/sfx2/inc/sfx2/module.hxx
+++ b/sfx2/inc/sfx2/module.hxx
@@ -33,7 +33,7 @@
#include <sfx2/shell.hxx>
#include <sfx2/imgdef.hxx>
#include <sal/types.h>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
class ImageList;
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 724f5b7a2722..4a0dbfaf12f9 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -158,11 +158,6 @@ typedef sal_uInt32 SfxObjectShellFlags;
//--------------------------------------------------------------------
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define OUSTRING ::rtl::OUString
-
-//--------------------------------------------------------------------
-
#define HIDDENINFORMATION_RECORDEDCHANGES 0x0001
#define HIDDENINFORMATION_NOTES 0x0002
#define HIDDENINFORMATION_DOCUMENTVERSIONS 0x0004
@@ -209,6 +204,7 @@ class SFX2_DLLPUBLIC SfxObjectShell :
public ::comphelper::IEmbeddedHelper, public ::sfx2::IXmlIdRegistrySupplier
{
friend struct ModifyBlocker_Impl;
+friend class SfxObjectShellLock;
private:
struct SfxObjectShell_Impl* pImp; // interne Daten
@@ -617,7 +613,7 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetBaseModel() const;
// Nur uebergangsweise fuer die Applikationen !!!
- virtual SEQUENCE< OUSTRING > GetEventNames();
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames();
Window* GetDialogParent( SfxMedium* pMedium=0 );
String UpdateTitle( SfxMedium* pMed=NULL, sal_uInt16 nDocViewNo=0 );
@@ -831,7 +827,6 @@ public:
//#endif
//--------------------------------------------------------------------
-
#ifndef SFX_DECL_OBJECTSHELL_DEFINED
#define SFX_DECL_OBJECTSHELL_DEFINED
SV_DECL_REF(SfxObjectShell)
@@ -840,8 +835,6 @@ SV_DECL_LOCK(SfxObjectShell)
SV_IMPL_LOCK(SfxObjectShell)
SV_IMPL_REF(SfxObjectShell)
-SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& rName, sal_Bool bWriting );
-
//#if 0 // _SOLAR__PRIVATE
//--------------------------------------------------------------------
class AutoReloadTimer_Impl : public Timer
diff --git a/sfx2/inc/sfx2/printer.hxx b/sfx2/inc/sfx2/printer.hxx
index 14d418fcb98e..53b2e87d5fa8 100644
--- a/sfx2/inc/sfx2/printer.hxx
+++ b/sfx2/inc/sfx2/printer.hxx
@@ -34,60 +34,11 @@
#include <vcl/print.hxx>
#endif
-class SfxFont;
class SfxTabPage;
class SfxItemSet;
struct SfxPrinter_Impl;
-#define SFX_RANGE_NOTSET ((sal_uInt16)0xFFFF)
-
-// class SfxFontSizeInfo -------------------------------------------------
-
-class SfxFontSizeInfo
-{
-private:
- static sal_uInt16 pStaticSizes[];
- Size* pSizes;
- sal_uInt16 nSizes;
- sal_Bool bScalable;
-
-public:
- SfxFontSizeInfo( const SfxFont& rFont, const OutputDevice& rDevice );
- ~SfxFontSizeInfo();
-
- sal_Bool HasSize(const Size &rSize) const;
- sal_Bool IsScalable() const { return bScalable; }
-
- sal_uInt16 SizeCount() const { return nSizes; }
- const Size& GetSize( sal_uInt16 nNo ) const
- { return pSizes[nNo]; }
-};
-
-// class SfxFont ---------------------------------------------------------
-
-class SFX2_DLLPUBLIC SfxFont
-{
-private:
- String aName;
- FontFamily eFamily;
- FontPitch ePitch;
- CharSet eCharSet;
-
- SfxFont& operator=(const SfxFont& rFont); // not implemented
-
-public:
- SfxFont( const FontFamily eFam,
- const String& aName,
- const FontPitch eFontPitch = PITCH_DONTKNOW,
- const CharSet eFontCharSet = RTL_TEXTENCODING_DONTKNOW );
- // ZugriffsMethoden:
- inline const String& GetName() const { return aName; }
- inline FontFamily GetFamily() const { return eFamily; }
- inline FontPitch GetPitch() const { return ePitch; }
- inline CharSet GetCharSet() const { return eCharSet; }
-};
-
// class SfxPrinter ------------------------------------------------------
class SFX2_DLLPUBLIC SfxPrinter : public Printer
@@ -125,19 +76,8 @@ public:
const SfxItemSet& GetOptions() const { return *pOptions; }
void SetOptions( const SfxItemSet &rNewOptions );
- void EnableRange( sal_uInt16 nRange );
- void DisableRange( sal_uInt16 nRange );
- sal_Bool IsRangeEnabled( sal_uInt16 nRange ) const;
-
sal_Bool IsKnown() const { return bKnown; }
sal_Bool IsOriginal() const { return bKnown; }
-
- using OutputDevice::GetFont;
- sal_uInt16 GetFontCount();
- const SfxFont* GetFont( sal_uInt16 nNo ) const;
- const SfxFont* GetFontByName( const String &rFontName );
-
- sal_Bool InitJob( Window* pUIParent, sal_Bool bAskAboutTransparentObjects );
};
#endif
diff --git a/sfx2/inc/sfx2/sfxbasecontroller.hxx b/sfx2/inc/sfx2/sfxbasecontroller.hxx
index a48b638d15a4..4cc7d0321da3 100644
--- a/sfx2/inc/sfx2/sfxbasecontroller.hxx
+++ b/sfx2/inc/sfx2/sfxbasecontroller.hxx
@@ -66,7 +66,6 @@
// Some defines to write better code :-)
#define REFERENCE ::com::sun::star::uno::Reference
#define ANY ::com::sun::star::uno::Any
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define XDISPATCH ::com::sun::star::frame::XDispatch
#define DISPATCHDESCRIPTOR ::com::sun::star::frame::DispatchDescriptor
#define XMODEL ::com::sun::star::frame::XModel
@@ -304,7 +303,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
//____________________________________________________________________________________________________
// XControllerBorder
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index 26122419e661..d0978ebc1e5f 100644
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -161,7 +161,6 @@
#define EVENTOBJECT ::com::sun::star::lang::EventObject
#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define MUTEX ::osl::Mutex
#define OUSTRING ::rtl::OUString
#define UNOTYPE ::com::sun::star::uno::Type
@@ -385,7 +384,7 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual SEQUENCE< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
/**___________________________________________________________________________________________________
@short get implementation id
@@ -401,7 +400,7 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual SEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
//____________________________________________________________________________________________________
@@ -580,7 +579,7 @@ public:
*/
virtual sal_Bool SAL_CALL attachResource( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& aArgs )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aArgs )
throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@@ -611,7 +610,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -861,7 +860,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -876,7 +875,7 @@ public:
@onerror -
*/
- virtual void SAL_CALL setPrinter( const SEQUENCE< PROPERTYVALUE >& seqPrinter )
+ virtual void SAL_CALL setPrinter( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqPrinter )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -891,14 +890,14 @@ public:
@onerror -
*/
- virtual void SAL_CALL print( const SEQUENCE< PROPERTYVALUE >& seqOptions )
+ virtual void SAL_CALL print( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqOptions )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XStorable2
//____________________________________________________________________________________________________
- virtual void SAL_CALL storeSelf( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ virtual void SAL_CALL storeSelf( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
@@ -979,7 +978,7 @@ public:
*/
virtual void SAL_CALL storeAsURL( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) ;
/**___________________________________________________________________________________________________
@@ -996,7 +995,7 @@ public:
*/
virtual void SAL_CALL storeToURL( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
@@ -1037,7 +1036,7 @@ public:
@onerror -
*/
- virtual void SAL_CALL load( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ virtual void SAL_CALL load( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::frame::DoubleInitializationException,
::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException,
@@ -1058,7 +1057,7 @@ public:
//____________________________________________________________________________________________________
virtual void SAL_CALL loadFromStorage( const REFERENCE< XSTORAGE >& xStorage,
- const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
throw ( ILLEGALARGUMENTEXCEPTION,
DOUBLEINITIALIZATIONEXCEPTION,
IOEXCEPTION,
@@ -1066,7 +1065,7 @@ public:
RUNTIMEEXCEPTION );
virtual void SAL_CALL storeToStorage( const REFERENCE< XSTORAGE >& xStorage,
- const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
throw ( ILLEGALARGUMENTEXCEPTION,
IOEXCEPTION,
EXCEPTION,
@@ -1164,7 +1163,7 @@ public:
*/
- virtual SEQUENCE< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
+ virtual ::com::sun::star::uno::Sequence< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@@ -1544,7 +1543,7 @@ private:
SAL_DLLPRIVATE ::rtl::OUString GetMediumFilterName_Impl();
SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments ,
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments ,
sal_Bool bSaveTo ) ;
SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() );
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 3209a791b8e0..6c643da7b978 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -59,7 +59,6 @@ class SfxItemPool;
class SfxTabPage;
class SfxPrintMonitor;
class SfxFrameSetDescriptor;
-class PrintDialog;
class Printer;
class SfxPrinter;
class SfxProgress;
@@ -239,15 +238,11 @@ public:
void AdjustVisArea(const Rectangle& rRect);
// Printing Interface
- virtual void PreparePrint( PrintDialog *pPrintDialog = 0 );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI );
- virtual sal_uInt16 Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog = 0 );
- virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
- virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=sal_False );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = FALSE );
+ virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=FALSE );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual PrintDialog* CreatePrintDialog( Window *pParent );
- void LockPrinter( sal_Bool bLock = sal_True );
- sal_Bool IsPrinterLocked() const;
+ void LockPrinter( BOOL bLock = TRUE );
+ sal_Bool IsPrinterLocked() const;
virtual JobSetup GetJobSetup() const;
Printer* GetActivePrinter() const;
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index f8fddef145a6..76f87fa844c8 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,7 +1,8 @@
sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL
sf sfx2 usr1 - all sf_mkout NULL
sf sfx2\prj nmake - all sf_prj NULL
-
+sf sfx2\qa\cppunit nmake - all sf_qa_cppunit NULL
+sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL
# fails on unxsoli4
# sf sfx2\qa\complex\standalonedocumentinfo nmake - all sf_qa_complex_standalonedocumentinfo sf_util NULL
diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk
new file mode 100644
index 000000000000..b53a04ec43f9
--- /dev/null
+++ b/sfx2/qa/cppunit/makefile.mk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ=../..
+PRJNAME=sfx2
+TARGET=qa_cppunit
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+DLLPRE = # no leading "lib" on .so files
+
+# --- Libs ---------------------------------------------------------
+
+SHL1OBJS= \
+ $(SLO)/test_metadatable.obj \
+
+
+SHL1STDLIBS= \
+ $(CPPUNITLIB) \
+ $(SALLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(VCLLIB) \
+ $(SFXLIB) \
+
+
+SHL1TARGET= test_metadatable
+SHL1RPATH = NONE
+SHL1IMPLIB= i$(SHL1TARGET)
+# SHL1DEF= $(MISC)/$(SHL1TARGET).def
+DEF1NAME=$(SHL1TARGET)
+# DEF1EXPORTFILE= export.exp
+SHL1VERSIONMAP= version.map
+
+# --- All object files ---------------------------------------------
+
+SLOFILES= \
+ $(SHL1OBJS) \
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : _cppunit.mk
+
+.END
diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..ea91ba4d1c44
--- /dev/null
+++ b/sfx2/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = sfx2
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/sfx2/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index f97fc6b4b495..583dc915b192 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -375,6 +375,8 @@ SfxApplication::SfxApplication()
SfxApplication::~SfxApplication()
{
+ OSL_ENSURE( GetObjectShells_Impl().Count() == 0, "Memory leak: some object shells were not removed!" );
+
Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
SfxModule::DestroyModules_Impl();
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
index 546b6b1c6558..1bde50fec224 100644
--- a/sfx2/source/appl/appmain.cxx
+++ b/sfx2/source/appl/appmain.cxx
@@ -116,21 +116,6 @@ void SfxApplication::Init
<SfxApplication::OpenClients()>
*/
{
-#ifdef DDE_AVAILABLE
-#ifndef DBG_UTIL
- InitializeDde();
-#else
- if( !InitializeDde() )
- {
- ByteString aStr( "Kein DDE-Service moeglich. Fehler: " );
- if( GetDdeService() )
- aStr += GetDdeService()->GetError();
- else
- aStr += '?';
- DBG_ASSERT( sal_False, aStr.GetBuffer() )
- }
-#endif
-#endif
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/config/config.hrc b/sfx2/source/config/config.hrc
deleted file mode 100644
index 582a2972f913..000000000000
--- a/sfx2/source/config/config.hrc
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SFX_CONFIG_HRC
-#define _SFX_CONFIG_HRC
-
-#include <sfx2/sfx.hrc>
-
-// #defines *****************************************************************
-
-#define BTN_OK 2
-#define BTN_CANCEL 3
-#define FT_OK 4
-#define FT_CANCEL 5
-
-#endif
-
diff --git a/sfx2/source/config/config.src b/sfx2/source/config/config.src
deleted file mode 100644
index cb3259e09ad0..000000000000
--- a/sfx2/source/config/config.src
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-//#include "config.hrc"
-//#include "sfxlocal.hrc"
-#include <sfx2/sfx.hrc>
-
-String STR_FILTERNAME_CFG
-{
- Text [ en-US ] = "Configuration" ;
-};
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 2cfada18d224..7039fc44f648 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -34,7 +34,7 @@
#include <basic/sbmod.hxx>
#include <tools/urlobj.hxx>
#include <basic/sbx.hxx>
- #include <sot/storage.hxx>
+#include <sot/storage.hxx>
#include <unotools/securityoptions.hxx>
#include <rtl/ustring.h>
@@ -47,7 +47,6 @@
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/dispatch.hxx>
-#include "config.hrc"
#include "sfx2/sfxresid.hxx"
#include "eventsupplier.hxx"
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index a45c9daff789..5b9b03f4b673 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -137,7 +137,11 @@ namespace DocTempl {
class DocTempl_EntryData_Impl
{
RegionData_Impl* mpParent;
+
+ // the following member must be SfxObjectShellLock since it controlls that SfxObjectShell lifetime by design
+ // and users of this class expect it to be so.
SfxObjectShellLock mxObjShell;
+
OUString maTitle;
OUString maOwnURL;
OUString maTargetURL;
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index aa4053818e02..9b67da63ab74 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -546,6 +546,9 @@ sal_Bool SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, sal_Bool bSelect
return SvTreeListBox::Select(pEntry,bSelect);
Path aPath(this, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
GetObjectShell(aPath)->TriggerHelpPI(
aPath[nLevel+1], aPath[nLevel+2], aPath[nLevel+3]);
return SvTreeListBox::Select(pEntry,bSelect);
@@ -691,10 +694,12 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
sal_Bool bRemovedFromSource = sal_False;
Path aSource(pSourceBox, pSource);
Path aTarget(this, pTarget);
- SfxObjectShellRef aSourceDoc =
- ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
+ SfxObjectShellRef aSourceDoc = ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
SfxObjectShellRef aTargetDoc = GetObjectShell(aTarget);
+
const sal_uInt16 nSLevel =
((SfxOrganizeListBox_Impl *)pSourceBox)->GetDocLevel();
const sal_uInt16 nTLevel = GetDocLevel();
@@ -1210,6 +1215,9 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
{
const sal_uInt16 nDocLevel = GetDocLevel();
Path aPath(this, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = GetObjectShell(aPath);
if(aRef.Is())
{
@@ -1887,6 +1895,9 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
if(!QueryDelete_Impl(pDialog, STR_DELETE_TEMPLATE, pFocusBox->GetEntryText(pEntry)))
return 1;
Path aPath(pFocusBox, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = pFocusBox->GetObjectShell(aPath);
if(aRef.Is() &&
aRef->Remove(aPath[1+pFocusBox->GetDocLevel()],
@@ -1953,6 +1964,9 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
if ( !pEntry )
return 1;
Path aPath( pFocusBox, pEntry );
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = pFocusBox->GetObjectShell( aPath );
if ( aRef.Is() )
{
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index a208c7ac1d74..b389f980185d 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -1088,60 +1088,10 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
//REPLACE pInfo->Save(xDocStor);
}
}
-/*
- SfxConfigManager *pCfgMgr = SFX_CFGMANAGER();
- {
- SfxConfigManager *pTemplCfg = new SfxConfigManager(aTemplStor, pCfgMgr);
- SetConfigManager(pTemplCfg);
- SetTemplateConfig(sal_True);
-
- // Falls der gerade zerst"orte CfgMgr des Dokuments der
- // aktive war, pCfgMgr lieber neu holen
- pCfgMgr = SFX_CFGMANAGER();
-
- // ggf. den neuen ConfigManager aktivieren
- if ( this == SfxObjectShell::Current() )
- pTemplCfg->Activate(pCfgMgr);
- }
-*/
- // Template und Template-DocInfo werden nicht mehr gebraucht
-// delete pTemplInfo;
}
}
}
-SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& aTargetURL, sal_Bool bForWriting )
-{
- // check for own format
- SfxObjectShellRef xDoc;
- StreamMode nMode = bForWriting ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY;
- SfxMedium *pMed = new SfxMedium( aTargetURL, nMode, sal_False, 0 );
- const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(sal_True);
- if( SFX_APP()->GetFilterMatcher().GuessFilter( *pMed, &pFilter ) == ERRCODE_NONE && pFilter && pFilter->IsOwnFormat() )
- {
- // create document
- xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
- if ( xDoc.Is() )
- {
- // partially load, so don't use DoLoad!
- xDoc->DoInitNew(0);
- // TODO/LATER: make sure that we don't use binary templates!
- if( xDoc->LoadFrom( *pMed ) )
- {
- // connect to storage, abandon temp. storage
- xDoc->DoSaveCompleted( pMed );
- }
- else
- xDoc.Clear();
- }
- }
- else
- delete pMed;
-
- return xDoc;
-}
-
sal_Bool SfxObjectShell::IsHelpDocument() const
{
const SfxFilter* pFilter = GetMedium()->GetFilter();
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 148123d5c31a..4255e9bd2939 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -172,12 +172,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
SfxObjectShell::SetCurrentComponent( Reference< XInterface >() );
}
- if ( mpDoc->Get_Impl()->bHiddenLockedByAPI )
- {
- mpDoc->Get_Impl()->bHiddenLockedByAPI = sal_False;
- mpDoc->OwnerLock(sal_False);
- }
- else if ( !mpDoc->Get_Impl()->bClosing )
+ if ( !mpDoc->Get_Impl()->bClosing )
// GCC stuerzt ab, wenn schon im dtor, also vorher Flag abfragen
mpDoc->DoClose();
}
@@ -835,22 +830,6 @@ void SfxObjectShell::InitBasicManager_Impl()
}
//--------------------------------------------------------------------
-#if 0 //(mba)
-SotObjectRef SfxObjectShell::CreateAggObj( const SotFactory* pFact )
-{
- // SvDispatch?
- SotFactory* pDispFact = SvDispatch::ClassFactory();
- if( pFact == pDispFact )
- return( (SfxShellObject*)GetSbxObject() );
-
- // sonst unbekannte Aggregation
- DBG_ERROR("unkekannte Factory");
- SotObjectRef aSvObjectRef;
- return aSvObjectRef;
-}
-#endif
-
-//--------------------------------------------------------------------
sal_uInt16 SfxObjectShell::Count()
{
@@ -873,7 +852,7 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
//--------------------------------------------------------------------
-SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames()
+uno::Sequence< ::rtl::OUString > SfxObjectShell::GetEventNames()
{
static uno::Sequence< ::rtl::OUString >* pEventNameContainer = NULL;
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 3d3462eea389..8bf97ba5b435 100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -53,7 +53,6 @@
#include <ucbhelper/content.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <vos/mutex.hxx>
-#include <svtools/printdlg.hxx>
#include <cppuhelper/implbase1.hxx>
#include <sfx2/viewfrm.hxx>
@@ -345,7 +344,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
// Name-Property?
if ( rProp.Name.compareToAscii( "Name" ) == 0 )
{
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if ( ( rProp.Value >>= sTemp ) == sal_False )
throw ::com::sun::star::lang::IllegalArgumentException();
@@ -619,9 +618,9 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
if ( rProp.Name.compareToAscii( "FileName" ) == 0 )
{
// unpack th URL and check for a valid and well known protocol
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if (
- ( rProp.Value.getValueType()!=::getCppuType((const OUSTRING*)0)) ||
+ ( rProp.Value.getValueType()!=::getCppuType((const ::rtl::OUString*)0)) ||
(!(rProp.Value>>=sTemp))
)
{
@@ -718,7 +717,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// Pages-Property
else if ( rProp.Name.compareToAscii( "Pages" ) == 0 )
{
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if( rProp.Value >>= sTemp )
{
aCheckedArgs[nProps].Name = rProp.Name;
@@ -799,81 +798,8 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
{
if ( !m_xPrintJob.is() )
m_xPrintJob = new SfxPrintJob_Impl( this );
-/*
- PrintDialog* pDlg = pPrintHint->GetPrintDialog();
- Printer* pPrinter = pPrintHint->GetPrinter();
- ::rtl::OUString aPrintFile ( ( pPrinter && pPrinter->IsPrintFileEnabled() ) ? pPrinter->GetPrintFile() : String() );
- ::rtl::OUString aRangeText ( ( pDlg && pDlg->IsRangeChecked(PRINTDIALOG_RANGE) ) ? pDlg->GetRangeText() : String() );
- sal_Bool bSelectionOnly = ( ( pDlg && pDlg->IsRangeChecked(PRINTDIALOG_SELECTION) ) ? sal_True : sal_False );
-
- sal_Int32 nArgs = 2;
- if ( aPrintFile.getLength() )
- nArgs++;
- if ( aRangeText.getLength() )
- nArgs++;
- else if ( bSelectionOnly )
- nArgs++;
-
- m_aPrintOptions.realloc(nArgs);
- m_aPrintOptions[0].Name = DEFINE_CONST_UNICODE("CopyCount");
- m_aPrintOptions[0].Value <<= (sal_Int16) (pPrinter ? pPrinter->GetCopyCount() : 1 );
- m_aPrintOptions[1].Name = DEFINE_CONST_UNICODE("Collate");
- m_aPrintOptions[1].Value <<= (sal_Bool) (pDlg ? pDlg->IsCollateChecked() : sal_False );
-
- if ( bSelectionOnly )
- {
- m_aPrintOptions[2].Name = DEFINE_CONST_UNICODE("Selection");
- m_aPrintOptions[2].Value <<= bSelectionOnly;
- }
- else if ( aRangeText.getLength() )
- {
- m_aPrintOptions[2].Name = DEFINE_CONST_UNICODE("Pages");
- m_aPrintOptions[2].Value <<= aRangeText;
- }
-
- if ( aPrintFile.getLength() )
- {
- m_aPrintOptions[nArgs-1].Name = DEFINE_CONST_UNICODE("FileName");
- m_aPrintOptions[nArgs-1].Value <<= aPrintFile;
- }
-*/
m_aPrintOptions = pPrintHint->GetOptions();
}
-/*
- else if ( pPrintHint->GetWhich() == -3 ) // -3 : AdditionalPrintOptions
- {
- uno::Sequence < beans::PropertyValue >& lOldOpts = m_aPrintOptions;
- const uno::Sequence < beans::PropertyValue >& lNewOpts = pPrintHint->GetAdditionalOptions();
- sal_Int32 nOld = lOldOpts.getLength();
- sal_Int32 nAdd = lNewOpts.getLength();
- lOldOpts.realloc( nOld + nAdd );
-
- // assume that all new elements are overwriting old ones and so don't need to be added
- sal_Int32 nTotal = nOld;
- for ( sal_Int32 n=0; n<nAdd; n++ )
- {
- sal_Int32 m;
- for ( m=0; m<nOld; m++ )
- if ( lNewOpts[n].Name == lOldOpts[m].Name )
- // new option overwrites old one
- break;
-
- if ( m == nOld )
- {
- // this is a new option, so add it to the resulting sequence - counter must be incremented
- lOldOpts[nTotal].Name = lNewOpts[n].Name;
- lOldOpts[nTotal++].Value = lNewOpts[n].Value;
- }
- else
- // overwrite old option with new value, counter stays unmodified
- lOldOpts[m].Value = lNewOpts[n].Value;
- }
-
- if ( nTotal != lOldOpts.getLength() )
- // at least one new options has overwritten an old one, so we allocated too much
- lOldOpts.realloc( nTotal );
- }
-*/
else if ( pPrintHint->GetWhich() != -2 ) // -2 : CancelPrintJob
{
view::PrintJobEvent aEvent;
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 1a578643e443..958f37f12916 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -263,25 +263,6 @@ sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const sal_uInt16 _
}
// --------------------------------------------------------------------------------------------------------------------
-void SfxFrameLoader_Impl::impl_lockHiddenDocument( SfxObjectShell& i_rDocument, const ::comphelper::NamedValueCollection& i_rDescriptor ) const
-{
- const sal_Bool bHidden = i_rDescriptor.getOrDefault( "Hidden", sal_False );
- if ( !bHidden )
- return;
-
- const SfxViewFrame* pExistingViewFrame = SfxViewFrame::GetFirst( &i_rDocument );
- if ( pExistingViewFrame )
- return;
-
- // the document is to be loaded hidden, and it is not yet displayed in any other frame
- // To prevent it from being closed when the loader returns, increase its OwnerLock
- // (the OwnerLock is normally increased by every frame in which the document is displayed, and by this loader)
- i_rDocument.RestoreNoDelete();
- i_rDocument.OwnerLock( sal_True );
- i_rDocument.Get_Impl()->bHiddenLockedByAPI = sal_True;
-}
-
-// --------------------------------------------------------------------------------------------------------------------
void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollection& io_rDescriptor ) const
{
const ::rtl::OUString sURL = io_rDescriptor.getOrDefault( "URL", ::rtl::OUString() );
@@ -331,7 +312,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
}
// --------------------------------------------------------------------------------------------------------------------
-SfxObjectShellLock SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
+SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
{
for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, sal_False ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, sal_False ) )
{
@@ -635,15 +616,12 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
// tell the doc its (current) load args.
impl_removeLoaderArguments( aDescriptor );
xModel->attachResource( xModel->getURL(), aDescriptor.getPropertyValues() );
- // TODO: not sure this is correct. The original, pre-refactoring code did it this way. However, I could
- // imagine scenarios where it is *not* correct to overrule the *existing* model args (XModel::getArgs)
- // with the ones passed to the loader here. For instance, what about the MacroExecutionMode? The document
- // might have a mode other than the one passed to the loader, and we always overwrite the former with
- // the latter.
}
// get the SfxObjectShell (still needed at the moment)
- const SfxObjectShellLock xDoc = impl_findObjectShell( xModel );
+ // SfxObjectShellRef is used here ( instead of ...Lock ) since the model is closed below if necessary
+ // SfxObjectShellLock would be even dangerous here, since the lifetime control should be done outside in case of success
+ const SfxObjectShellRef xDoc = impl_findObjectShell( xModel );
ENSURE_OR_THROW( xDoc.Is(), "no SfxObjectShell for the given model" );
// ensure the ID of the to-be-created view is in the descriptor, if possible
@@ -651,16 +629,6 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
const sal_Int16 nViewNo = xDoc->GetFactory().GetViewNo_Impl( nViewId, 0 );
const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetAPIViewName() );
- // if the document is created hidden, prevent it from being deleted until it is shown or disposed
- impl_lockHiddenDocument( *xDoc, aDescriptor );
- // TODO; if we wouldn't use a SfxObjectShellLock instance for xDoc, but a simple SfxObjectShellRef,
- // then this would not be necessary, /me thinks. That is, the *Lock classes inc/dec a "Lock" counter
- // (additional to the ref counter) in their ctor/dtor, and if the lock counter goes to 0, the
- // object is closed (DoClose). The impl_lockHiddenDocument is to prevent exactly that premature
- // closing. However, a *Ref object wouldn't close, anyway. And in case of unsuccessfull loading, the
- // code at the very end of this method cares for closing the XModel, which should also close the
- // ObjectShell.
-
// plug the document into the frame
impl_createDocumentView( xModel, _rTargetFrame, aViewCreationArgs, sViewName );
bLoadSuccess = sal_True;
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index d0c899ff06e1..470b96106184 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -30,7 +30,6 @@
#include <vcl/virdev.hxx>
#include <vcl/metric.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/printdlg.hxx>
#include <unotools/printwarningoptions.hxx>
#include <svtools/printoptions.hxx>
#include <vector>
@@ -47,54 +46,23 @@
#include "sfx2/sfxresid.hxx"
#include "view.hrc"
-#ifdef MSC
-// der ist buggy
-#define NEW_OBJECTS(Class, nCount) ((Class*) new char[ sizeof(Class) * (nCount) ])
-#else
-#define NEW_OBJECTS(Class, nCount) (new Class[nCount])
-#endif
-
-
-sal_uInt16 SfxFontSizeInfo::pStaticSizes[] =
-{
- 60,
- 80,
- 100,
- 120,
- 140,
- 180,
- 240,
- 360,
- 480,
- 600,
- 720
-};
-
-//--------------------------------------------------------------------
-
-SV_DECL_PTRARR_DEL(SfxFontArr_Impl,SfxFont*,10,5)
-
// struct SfxPrinter_Impl ------------------------------------------------
struct SfxPrinter_Impl
{
- SfxFontArr_Impl* mpFonts;
- sal_Bool mbAll;
- sal_Bool mbSelection;
- sal_Bool mbFromTo;
- sal_Bool mbRange;
+ sal_Bool mbAll;
+ sal_Bool mbSelection;
+ sal_Bool mbFromTo;
+ sal_Bool mbRange;
SfxPrinter_Impl() :
- mpFonts ( NULL ),
mbAll ( sal_True ),
mbSelection ( sal_True ),
mbFromTo ( sal_True ),
mbRange ( sal_True ) {}
- ~SfxPrinter_Impl() { delete mpFonts; }
+ ~SfxPrinter_Impl() {}
};
-#define FONTS() pImpl->mpFonts
-
struct SfxPrintOptDlg_Impl
{
sal_Bool mbHelpDisabled;
@@ -103,98 +71,6 @@ struct SfxPrintOptDlg_Impl
mbHelpDisabled ( sal_False ) {}
};
-//--------------------------------------------------------------------
-
-SfxFontSizeInfo::SfxFontSizeInfo( const SfxFont &rFont,
- const OutputDevice &rDevice ) :
-
- pSizes(0),
- nSizes(0),
- bScalable(sal_True)
-
-{
- if ( 0 == rDevice.GetDevFontCount() )
- bScalable = sal_False;
- else
- {
- OutputDevice &rDev = (OutputDevice&) rDevice;
- Font aFont(rFont.GetName(), Size(0,12));
- aFont.SetFamily(rFont.GetFamily());
- aFont.SetPitch(rFont.GetPitch());
- aFont.SetCharSet(rFont.GetCharSet());
-
- // verfuegbare Groessen in die Liste eintragen, Groesse in 10tel Punkt
- int nSizeCount = rDev.GetDevFontSizeCount(aFont);
- pSizes = NEW_OBJECTS(Size, nSizeCount);
- const MapMode aOldMapMode = rDev.GetMapMode();
- MapMode aMap(aOldMapMode);
- aMap.SetMapUnit(MAP_POINT);
- const Fraction aTen(1, 10);
- aMap.SetScaleX(aTen);
- aMap.SetScaleY(aTen);
- rDev.SetMapMode(aMap);
-
- // Es gibt Fonts mit Bitmaps und skalierbaren Groessen
- // In diesem Fall wird der Fonts als skalierbar behandelt.
- sal_Bool bFoundScalable = sal_False;
- for ( int i = 0; i < nSizeCount; ++i )
- {
- const Size aSize( rDev.GetDevFontSize(aFont, i) );
- if ( aSize.Height() != 0 )
- pSizes[nSizes++] = aSize;
- else
- bFoundScalable |= sal_True;
- }
- if( !bFoundScalable )
- bScalable = sal_False;
- else
- {
- // statische Font-Sizes verwenden
- delete [] pSizes;
- nSizes = 0;
- }
- rDev.SetMapMode(aOldMapMode);
- }
-
- if ( 0 == nSizes )
- {
- nSizes = sizeof(pStaticSizes) / sizeof(sal_uInt16);
- pSizes = NEW_OBJECTS(Size, nSizes);
- for ( sal_uInt16 nPos = 0; nPos <nSizes; ++nPos )
- pSizes[nPos] = Size( 0, pStaticSizes[nPos] );
- }
-}
-
-//--------------------------------------------------------------------
-
-SfxFontSizeInfo::~SfxFontSizeInfo()
-{
- delete [] pSizes;
-}
-
-//--------------------------------------------------------------------
-
-sal_Bool SfxFontSizeInfo::HasSize(const Size &rSize) const
-{
- if ( bScalable )
- return sal_True;
- for ( sal_uInt16 i = 0; i < nSizes; ++i)
- if ( pSizes[i] == rSize )
- return sal_True;
- return sal_False;
-}
-
-//--------------------------------------------------------------------
-
-SfxFont::SfxFont( const FontFamily eFontFamily, const String& aFontName,
- const FontPitch eFontPitch, const CharSet eFontCharSet ):
- aName( aFontName ),
- eFamily( eFontFamily ),
- ePitch( eFontPitch ),
- eCharSet( eFontCharSet )
-{
-}
-
// class SfxPrinter ------------------------------------------------------
SfxPrinter* SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions )
@@ -335,194 +211,6 @@ void SfxPrinter::SetOptions( const SfxItemSet &rNewOptions )
//--------------------------------------------------------------------
-void SfxPrinter::EnableRange( sal_uInt16 nRange )
-{
- PrintDialogRange eRange = (PrintDialogRange)nRange;
-
- if ( eRange == PRINTDIALOG_ALL )
- pImpl->mbAll = sal_True;
- else if ( eRange == PRINTDIALOG_SELECTION )
- pImpl->mbSelection = sal_True;
- else if ( eRange == PRINTDIALOG_FROMTO )
- pImpl->mbFromTo = sal_True;
- else if ( eRange == PRINTDIALOG_RANGE )
- pImpl->mbRange = sal_True;
-}
-
-//--------------------------------------------------------------------
-
-void SfxPrinter::DisableRange( sal_uInt16 nRange )
-{
- PrintDialogRange eRange = (PrintDialogRange)nRange;
-
- if ( eRange == PRINTDIALOG_ALL )
- pImpl->mbAll = sal_False;
- else if ( eRange == PRINTDIALOG_SELECTION )
- pImpl->mbSelection = sal_False;
- else if ( eRange == PRINTDIALOG_FROMTO )
- pImpl->mbFromTo = sal_False;
- else if ( eRange == PRINTDIALOG_RANGE )
- pImpl->mbRange = sal_False;
-}
-
-//--------------------------------------------------------------------
-
-sal_Bool SfxPrinter::IsRangeEnabled( sal_uInt16 nRange ) const
-{
- PrintDialogRange eRange = (PrintDialogRange)nRange;
- sal_Bool bRet = sal_False;
-
- if ( eRange == PRINTDIALOG_ALL )
- bRet = pImpl->mbAll;
- else if ( eRange == PRINTDIALOG_SELECTION )
- bRet = pImpl->mbSelection;
- else if ( eRange == PRINTDIALOG_FROMTO )
- bRet = pImpl->mbFromTo;
- else if ( eRange == PRINTDIALOG_RANGE )
- bRet = pImpl->mbRange;
-
- return bRet;
-}
-
-//--------------------------------------------------------------------
-
-SV_IMPL_PTRARR(SfxFontArr_Impl,SfxFont*)
-
-//--------------------------------------------------------------------
-
-const SfxFont* SfxFindFont_Impl( const SfxFontArr_Impl& rArr,
- const String& rName )
-{
- const sal_uInt16 nCount = rArr.Count();
- for ( sal_uInt16 i = 0; i < nCount; ++i )
- {
- const SfxFont *pFont = rArr[i];
- if ( pFont->GetName() == rName )
- return pFont;
- }
- return NULL;
-}
-
-//--------------------------------------------------------------------
-
-void SfxPrinter::UpdateFonts_Impl()
-{
- VirtualDevice *pVirDev = 0;
- const OutputDevice *pOut = this;
-
- // falls kein Drucker gefunden werden konnte, ein
- // temp. Device erzeugen fuer das Erfragen der Fonts
- if( !IsValid() )
- pOut = pVirDev = new VirtualDevice;
-
- int nCount = pOut->GetDevFontCount();
- FONTS() = new SfxFontArr_Impl((sal_uInt8)nCount);
-
- std::vector< Font > aNonRegularFonts;
- for(int i = 0;i < nCount;++i)
- {
- Font aFont(pOut->GetDevFont(i));
- if ( (aFont.GetItalic() != ITALIC_NONE) ||
- (aFont.GetWeight() != WEIGHT_MEDIUM) )
- {
- // First: Don't add non-regular fonts. The font name is not unique so we have
- // to filter the device font list.
- aNonRegularFonts.push_back( aFont );
- }
- else if ( FONTS()->Count() == 0 ||
- (*FONTS())[FONTS()->Count()-1]->GetName() != aFont.GetName() )
- {
- DBG_ASSERT(0 == SfxFindFont_Impl(*FONTS(), aFont.GetName()), "Doppelte Fonts vom SV-Device!");
- SfxFont* pTmp = new SfxFont( aFont.GetFamily(), aFont.GetName(),
- aFont.GetPitch(), aFont.GetCharSet() );
- FONTS()->C40_INSERT(SfxFont, pTmp, FONTS()->Count());
- }
- }
- delete pVirDev;
-
- // Try to add all non-regular fonts. It could be that there was no regular font
- // with the same name added.
- std::vector< Font >::const_iterator pIter;
- for ( pIter = aNonRegularFonts.begin(); pIter != aNonRegularFonts.end(); pIter++ )
- {
- if ( SfxFindFont_Impl( *FONTS(), pIter->GetName() ) == 0 )
- {
- SfxFont* pTmp = new SfxFont( pIter->GetFamily(), pIter->GetName(),
- pIter->GetPitch(), pIter->GetCharSet() );
- FONTS()->C40_INSERT( SfxFont, pTmp, FONTS()->Count() );
- }
- }
-}
-
-//--------------------------------------------------------------------
-
-sal_uInt16 SfxPrinter::GetFontCount()
-{
- if ( !FONTS() )
- UpdateFonts_Impl();
- return FONTS()->Count();
-}
-
-//--------------------------------------------------------------------
-
-const SfxFont* SfxPrinter::GetFont( sal_uInt16 nNo ) const
-{
- DBG_ASSERT( FONTS(), "bitte erst GetFontCount() abfragen!" );
- return (*FONTS())[ nNo ];
-}
-
-//--------------------------------------------------------------------
-
-const SfxFont* SfxPrinter::GetFontByName( const String &rFontName )
-{
- if ( !FONTS() )
- UpdateFonts_Impl();
- return SfxFindFont_Impl(*FONTS(), rFontName);
-}
-
-//--------------------------------------------------------------------
-
-sal_Bool SfxPrinter::InitJob( Window* pUIParent, sal_Bool bAskAboutTransparentObjects )
-{
- const SvtPrinterOptions aPrinterOpt;
- const SvtPrintFileOptions aPrintFileOpt;
- const SvtBasePrintOptions* pPrinterOpt = &aPrinterOpt;
- const SvtBasePrintOptions* pPrintFileOpt = &aPrintFileOpt;
- PrinterOptions aNewPrinterOptions;
- sal_Bool bRet = sal_True;
-
- ( ( IsPrintFileEnabled() && GetPrintFile().Len() ) ? pPrintFileOpt : pPrinterOpt )->GetPrinterOptions( aNewPrinterOptions );
-
- if( bAskAboutTransparentObjects && !aNewPrinterOptions.IsReduceTransparency() )
- {
- if ( !Application::IsHeadlessModeEnabled() )
- {
- SvtPrintWarningOptions aWarnOpt;
-
- if( aWarnOpt.IsTransparency() )
- {
- TransparencyPrintWarningBox aWarnBox( pUIParent );
- const sal_uInt16 nRet = aWarnBox.Execute();
-
- if( nRet == RET_CANCEL )
- bRet = sal_False;
- else
- {
- aNewPrinterOptions.SetReduceTransparency( nRet != RET_NO );
- aWarnOpt.SetTransparency( !aWarnBox.IsNoWarningChecked() );
- }
- }
- }
- }
-
- if( bRet )
- SetPrinterOptions( aNewPrinterOptions );
-
- return bRet;
-}
-
-//--------------------------------------------------------------------
-
SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
SfxViewShell *pViewShell,
const SfxItemSet *pSet ) :
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index e334095d85e4..b3a7bea50946 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -734,7 +734,7 @@ ANY SfxBaseController::getViewData() throw( ::com::sun::star::uno::RuntimeExcept
if ( m_pData->m_pViewShell )
{
m_pData->m_pViewShell->WriteUserData( sData1 ) ;
- OUSTRING sData( sData1 );
+ ::rtl::OUString sData( sData1 );
aAny <<= sData ;
}
@@ -750,7 +750,7 @@ void SAL_CALL SfxBaseController::restoreViewData( const ANY& aValue ) throw( ::c
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pData->m_pViewShell )
{
- OUSTRING sData;
+ ::rtl::OUString sData;
aValue >>= sData ;
m_pData->m_pViewShell->ReadUserData( sData ) ;
}
@@ -781,7 +781,7 @@ REFERENCE< XMODEL > SAL_CALL SfxBaseController::getModel() throw( ::com::sun::st
//________________________________________________________________________________________________________
REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOURL& aURL ,
- const OUSTRING& sTargetFrameName,
+ const ::rtl::OUString& sTargetFrameName,
sal_Int32 eSearchFlags ) throw( RUNTIMEEXCEPTION )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -938,12 +938,12 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
// SfxBaseController -> XDispatchProvider
//________________________________________________________________________________________________________
-SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
+uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const uno::Sequence< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
{
// Create return list - which must have same size then the given descriptor
// It's not allowed to pack it!
sal_Int32 nCount = seqDescripts.getLength();
- SEQUENCE< REFERENCE< XDISPATCH > > lDispatcher( nCount );
+ uno::Sequence< REFERENCE< XDISPATCH > > lDispatcher( nCount );
for( sal_Int32 i=0; i<nCount; ++i )
{
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 9f244a1c303d..515149c5a2d3 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -34,7 +34,6 @@
#include <svl/itempool.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/printdlg.hxx>
#include <svtools/prnsetup.hxx>
#include <svl/flagitem.hxx>
#include <svl/stritem.hxx>
@@ -352,30 +351,6 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
}
}
-// -----------------------------------------------------------------------
-
-void DisableRanges( PrintDialog& rDlg, SfxPrinter* pPrinter )
-
-/* [Beschreibung]
-
- Mit dieser Funktion werden die nicht verf"ugbaren Ranges
- vom Printer zum PrintDialog geforwarded.
-*/
-
-{
- if ( !pPrinter )
- return;
-
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_ALL ) )
- rDlg.DisableRange( PRINTDIALOG_ALL );
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_SELECTION ) )
- rDlg.DisableRange( PRINTDIALOG_SELECTION );
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_FROMTO ) )
- rDlg.DisableRange( PRINTDIALOG_FROMTO );
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_RANGE ) )
- rDlg.DisableRange( PRINTDIALOG_RANGE );
-}
-
//====================================================================
class SfxDialogExecutor_Impl
@@ -392,7 +367,6 @@ class SfxDialogExecutor_Impl
{
private:
SfxViewShell* _pViewSh;
- PrintDialog* _pPrintParent;
PrinterSetupDialog* _pSetupParent;
SfxItemSet* _pOptions;
sal_Bool _bModified;
@@ -401,7 +375,6 @@ private:
DECL_LINK( Execute, void * );
public:
- SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrintDialog* pParent );
SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSetupDialog* pParent );
~SfxDialogExecutor_Impl() { delete _pOptions; }
@@ -412,22 +385,9 @@ public:
//--------------------------------------------------------------------
-SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrintDialog* pParent ) :
-
- _pViewSh ( pViewSh ),
- _pPrintParent ( pParent ),
- _pSetupParent ( NULL ),
- _pOptions ( NULL ),
- _bModified ( sal_False ),
- _bHelpDisabled ( sal_False )
-
-{
-}
-
SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSetupDialog* pParent ) :
_pViewSh ( pViewSh ),
- _pPrintParent ( NULL ),
_pSetupParent ( pParent ),
_pOptions ( NULL ),
_bModified ( sal_False ),
@@ -443,27 +403,13 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
// Options lokal merken
if ( !_pOptions )
{
- DBG_ASSERT( _pPrintParent || _pSetupParent, "no dialog parent" );
- if( _pPrintParent )
- _pOptions = ( (SfxPrinter*)_pPrintParent->GetPrinter() )->GetOptions().Clone();
- else if( _pSetupParent )
+ DBG_ASSERT( _pSetupParent, "no dialog parent" );
+ if( _pSetupParent )
_pOptions = ( (SfxPrinter*)_pSetupParent->GetPrinter() )->GetOptions().Clone();
}
- if ( _pOptions && _pPrintParent && _pPrintParent->IsSheetRangeAvailable() )
- {
- SfxItemState eState = _pOptions->GetItemState( SID_PRINT_SELECTEDSHEET );
- if ( eState != SFX_ITEM_UNKNOWN )
- {
- PrintSheetRange eRange = _pPrintParent->GetCheckedSheetRange();
- sal_Bool bValue = ( PRINTSHEETS_ALL != eRange );
- _pOptions->Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, bValue ) );
- }
- }
-
// Dialog ausf"uhren
- SfxPrintOptionsDialog* pDlg = new SfxPrintOptionsDialog( _pPrintParent ? static_cast<Window*>(_pPrintParent)
- : static_cast<Window*>(_pSetupParent),
+ SfxPrintOptionsDialog* pDlg = new SfxPrintOptionsDialog( static_cast<Window*>(_pSetupParent),
_pViewSh, _pOptions );
if ( _bHelpDisabled )
pDlg->DisableHelp();
@@ -472,15 +418,6 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
delete _pOptions;
_pOptions = pDlg->GetOptions().Clone();
- if ( _pOptions && _pPrintParent && _pPrintParent->IsSheetRangeAvailable() )
- {
- const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == _pOptions->GetItemState( SID_PRINT_SELECTEDSHEET, sal_False , &pItem ) )
- {
- _pPrintParent->CheckSheetRange( ( (const SfxBoolItem*)pItem )->GetValue()
- ? PRINTSHEETS_SELECTED_SHEETS : PRINTSHEETS_ALL );
- }
- }
}
delete pDlg;
@@ -687,7 +624,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
sal_uInt16 nDialogRet = RET_CANCEL;
// sal_Bool bCollate=sal_False;
SfxPrinter* pPrinter = 0;
- PrintDialog* pPrintDlg = 0;
SfxDialogExecutor_Impl* pExecutor = 0;
bool bSilent = false;
sal_Bool bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
@@ -895,16 +831,12 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// forget new printer, it was taken over (as pPrinter) or deleted
pDlgPrinter = NULL;
- /* Now lets reset the Dialog printer, since its freed */
- if (pPrintDlg)
- pPrintDlg->SetPrinter (pPrinter);
}
else
{
// PrinterDialog is used to transfer information on printing,
// so it will only be deleted here if dialog was cancelled
DELETEZ( pDlgPrinter );
- DELETEZ( pPrintDlg );
rReq.Ignore();
if ( SID_PRINTDOC == nId )
rReq.SetReturnValue(SfxBoolItem(0,sal_False));
@@ -923,80 +855,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
//--------------------------------------------------------------------
-PrintDialog* SfxViewShell::CreatePrintDialog( Window* /*pParent*/ )
-
-/* [Beschreibung]
-
- Diese Methode kann "uberladen werden, um einen speziellen PrintDialog
- zu erzeugen. Dies ist z.B. notwendig wenn spezielle <StarView> Features
- wie drucken von Seitenbereichen.
-*/
-
-{
- #if 0
- PrintDialog *pDlg = new PrintDialog( pParent, false );
- pDlg->SetFirstPage( 1 );
- pDlg->SetLastPage( 9999 );
- pDlg->EnableCollate();
- return pDlg;
- #else
- return NULL;
- #endif
-}
-
-//--------------------------------------------------------------------
-
-void SfxViewShell::PreparePrint( PrintDialog * )
-{
-}
-
-//--------------------------------------------------------------------
-
-
-ErrCode SfxViewShell::DoPrint( SfxPrinter* /*pPrinter*/,
- PrintDialog* /*pPrintDlg*/,
- sal_Bool /*bSilent*/, sal_Bool /*bIsAPI*/ )
-{
- #if 0
- // Printer-Dialogbox waehrend des Ausdrucks mu\s schon vor
- // StartJob erzeugt werden, da SV bei einem Quit-Event h"angt
- SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
- SfxPrinter *pDocPrinter = GetPrinter(sal_True);
- if ( !pPrinter )
- pPrinter = pDocPrinter;
- else if ( pDocPrinter != pPrinter )
- {
- pProgress->RestoreOnEndPrint( pDocPrinter->Clone() );
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- }
- pProgress->SetWaitMode(sal_False);
-
- // Drucker starten
- PreparePrint( pPrintDlg );
- SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
- if ( pPrinter->StartJob(pObjShell->GetTitle(0)) )
- {
- // Drucken
- Print( *pProgress, bIsAPI, pPrintDlg );
- pProgress->Stop();
- pProgress->DeleteOnEndPrint();
- pPrinter->EndJob();
- }
- else
- {
- // Printer konnte nicht gestartet werden
- delete pProgress;
- }
-
- return pPrinter->GetError();
- #else
- DBG_ERROR( "DoPrint called, dead code !" );
- return ERRCODE_IO_NOTSUPPORTED;
- #endif
-}
-
-//--------------------------------------------------------------------
-
sal_Bool SfxViewShell::IsPrinterLocked() const
{
return pImp->m_nPrinterLocks > 0;
@@ -1026,13 +884,6 @@ void SfxViewShell::LockPrinter( sal_Bool bLock)
//--------------------------------------------------------------------
-sal_uInt16 SfxViewShell::Print( SfxProgress& /*rProgress*/, sal_Bool /*bIsAPI*/, PrintDialog* /*pDlg*/ )
-{
- return 0;
-}
-
-//--------------------------------------------------------------------
-
SfxPrinter* SfxViewShell::GetPrinter( sal_Bool /*bCreate*/ )
{
return 0;
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 59d156f82018..f6c1a594fdd5 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -919,7 +919,7 @@
#include "vcl/cursor.hxx"
#include "vcl/decoview.hxx"
#include "vcl/dndhelp.hxx"
-#include "vcl/fldunit.hxx"
+#include "tools/fldunit.hxx"
#include "vcl/fntstyle.hxx"
#include "unotools/fontcvt.hxx"
#include "vcl/gdimtf.hxx"
@@ -938,7 +938,7 @@
#include "vcl/unohelp.hxx"
#include "vcl/unohelp2.hxx"
#include "vcl/wall.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "vos/mutex.hxx"
#include "vos/ref.hxx"
#include "vos/refernce.hxx"
diff --git a/svx/inc/svx/fmgridif.hxx b/svx/inc/svx/fmgridif.hxx
index 886db3280d60..df21245bc99b 100644
--- a/svx/inc/svx/fmgridif.hxx
+++ b/svx/inc/svx/fmgridif.hxx
@@ -49,7 +49,7 @@
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <toolkit/controls/unocontrol.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <comphelper/uno3.hxx>
diff --git a/svx/inc/svx/fmtools.hxx b/svx/inc/svx/fmtools.hxx
index b39f46e85d14..f98919fe47d8 100644
--- a/svx/inc/svx/fmtools.hxx
+++ b/svx/inc/svx/fmtools.hxx
@@ -71,7 +71,7 @@
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <cppuhelper/weakref.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
diff --git a/svx/inc/svx/unoshtxt.hxx b/svx/inc/svx/unoshtxt.hxx
index 29cb220e9e88..e7c678a8a358 100644
--- a/svx/inc/svx/unoshtxt.hxx
+++ b/svx/inc/svx/unoshtxt.hxx
@@ -90,6 +90,8 @@ public:
void ChangeModel( SdrModel* pNewModel );
+ void UpdateOutliner();
+
private:
SVX_DLLPRIVATE SvxTextEditSource( SvxTextEditSourceImpl* pImpl );
diff --git a/svx/inc/svx/xdef.hxx b/svx/inc/svx/xdef.hxx
index 963e4935c617..dd0fbd802291 100644
--- a/svx/inc/svx/xdef.hxx
+++ b/svx/inc/svx/xdef.hxx
@@ -36,7 +36,8 @@
|*
\************************************************************************/
-#define COL_DEFAULT_SHAPE_FILLING RGB_COLORDATA( 153, 204, 255 ) // blue 8
+#define COL_DEFAULT_SHAPE_FILLING RGB_COLORDATA( 0xCF, 0xE7, 0xE5 )
+#define COL_DEFAULT_SHAPE_STROKE RGB_COLORDATA( 128, 128, 128 )
#define XATTR_START 1000
diff --git a/svx/prj/makefile.mk b/svx/prj/makefile.mk
deleted file mode 100644
index 2a0b99e72fd5..000000000000
--- a/svx/prj/makefile.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-all:
- cd .. && make -srj9
diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src
index a9cd2fe60b2f..7823007dbe7c 100644
--- a/svx/source/dialog/bmpmask.src
+++ b/svx/source/dialog/bmpmask.src
@@ -289,7 +289,7 @@ DockingWindow RID_SVXDLG_BMPMASK
ImageBitmap = Bitmap { File = "sc10350.bmp" ; };
MASKCOLOR
};
- Text [ en-US ] = "Eyedropper" ;
+ Text [ en-US ] = "Pipette" ;
};
};
};
@@ -300,7 +300,7 @@ DockingWindow RID_SVXDLG_BMPMASK
Pos = MAP_APPFONT ( 22 , 6 ) ;
Size = MAP_APPFONT ( 43 , 14 ) ;
};
- Text [ en-US ] = "Eyedropper" ;
+ Text [ en-US ] = "Color Replacer" ;
Image IMG_PIPETTE
{
diff --git a/svx/source/dialog/contdlg.src b/svx/source/dialog/contdlg.src
index bf587b3b1fda..989bdd93d336 100644
--- a/svx/source/dialog/contdlg.src
+++ b/svx/source/dialog/contdlg.src
@@ -170,7 +170,7 @@ FloatingWindow RID_SVXDLG_CONTOUR
{
Identifier = TBI_PIPETTE ;
HelpId = HID_CONTDLG_PIPETTE ;
- Text [ en-US ] = "Eyedropper" ;
+ Text [ en-US ] = "Pipette" ;
AutoCheck = TRUE ;
};
};
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index d1774dcb4870..83d8206111f8 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -276,8 +276,8 @@ sal_Bool SvxGridTabPage::FillItemSet( SfxItemSet& rCoreSet )
aGridItem.nFldDrawX = (sal_uInt32) nX;
aGridItem.nFldDrawY = (sal_uInt32) nY;
- aGridItem.nFldDivisionX = static_cast<long>(aNumFldDivisionX.GetValue());
- aGridItem.nFldDivisionY = static_cast<long>(aNumFldDivisionY.GetValue());
+ aGridItem.nFldDivisionX = static_cast<long>(aNumFldDivisionX.GetValue()-1);
+ aGridItem.nFldDivisionY = static_cast<long>(aNumFldDivisionY.GetValue()-1);
rCoreSet.Put( aGridItem );
}
@@ -303,12 +303,8 @@ void SvxGridTabPage::Reset( const SfxItemSet& rSet )
SetMetricValue( aMtrFldDrawX , pGridAttr->nFldDrawX, eUnit );
SetMetricValue( aMtrFldDrawY , pGridAttr->nFldDrawY, eUnit );
-// sal_uInt32 nFineX = pGridAttr->nFldDivisionX;
-// sal_uInt32 nFineY = pGridAttr->nFldDivisionY;
-// aNumFldDivisionX.SetValue( nFineX ? (pGridAttr->nFldDrawX / nFineX - 1) : 0 );
-// aNumFldDivisionY.SetValue( nFineY ? (pGridAttr->nFldDrawY / nFineY - 1) : 0 );
- aNumFldDivisionX.SetValue( pGridAttr->nFldDivisionX );
- aNumFldDivisionY.SetValue( pGridAttr->nFldDivisionY );
+ aNumFldDivisionX.SetValue( pGridAttr->nFldDivisionX+1 );
+ aNumFldDivisionY.SetValue( pGridAttr->nFldDivisionY+1 );
}
ChangeGridsnapHdl_Impl( &aCbxUseGridsnap );
diff --git a/svx/source/dialog/optgrid.src b/svx/source/dialog/optgrid.src
index 2bc7b430f807..0d65c63f5d2f 100644
--- a/svx/source/dialog/optgrid.src
+++ b/svx/source/dialog/optgrid.src
@@ -140,6 +140,7 @@ TabPage RID_SVXPAGE_GRID
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
+ Minimum = 1 ;
Maximum = 99 ;
Last = 99 ;
StrictFormat = TRUE ;
@@ -149,7 +150,7 @@ TabPage RID_SVXPAGE_GRID
{
Pos = MAP_APPFONT ( 223 , 56 ) ;
Size = MAP_APPFONT ( 29 , 8 ) ;
- Text [ en-US ] = "point(s)" ;
+ Text [ en-US ] = "space(s)" ;
};
NumericField NUM_FLD_DIVISION_Y
{
@@ -160,6 +161,7 @@ TabPage RID_SVXPAGE_GRID
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
+ Minimum = 1 ;
Maximum = 99 ;
Last = 99 ;
StrictFormat = TRUE ;
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 374000f68068..c33c1f94e1c2 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1653,11 +1653,14 @@ DbCheckBox::DbCheckBox( DbGridColumn& _rColumn )
namespace
{
- void setCheckBoxStyle( Window* _pWindow, sal_uInt16 nStyle )
+ void setCheckBoxStyle( Window* _pWindow, bool bMono )
{
AllSettings aSettings = _pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- aStyleSettings.SetCheckBoxStyle( nStyle );
+ if( bMono )
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO );
+ else
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() & (~STYLE_OPTION_MONO) );
aSettings.SetStyleSettings( aStyleSettings );
_pWindow->SetSettings( aSettings );
}
@@ -1683,8 +1686,8 @@ void DbCheckBox::Init( Window& rParent, const Reference< XRowSet >& xCursor )
sal_Int16 nStyle = awt::VisualEffect::LOOK3D;
OSL_VERIFY( xModel->getPropertyValue( FM_PROP_VISUALEFFECT ) >>= nStyle );
- setCheckBoxStyle( m_pWindow, nStyle == awt::VisualEffect::FLAT ? STYLE_CHECKBOX_MONO : STYLE_CHECKBOX_WIN );
- setCheckBoxStyle( m_pPainter, nStyle == awt::VisualEffect::FLAT ? STYLE_CHECKBOX_MONO : STYLE_CHECKBOX_WIN );
+ setCheckBoxStyle( m_pWindow, nStyle == awt::VisualEffect::FLAT );
+ setCheckBoxStyle( m_pPainter, nStyle == awt::VisualEffect::FLAT );
sal_Bool bTristate = sal_True;
OSL_VERIFY( xModel->getPropertyValue( FM_PROP_TRISTATE ) >>= bTristate );
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 154999333296..b8b4055ef5de 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -481,6 +481,7 @@ namespace svxform
if ( m_bDisposed )
return;
+ // SfxObjectShellRef is good here since the model controls the lifetime of the object
SfxObjectShellRef xObjectShell = m_rFormModel.GetObjectShell();
if( !xObjectShell.Is() )
return;
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 35dc652b9330..eee61c5c2dee 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -130,6 +130,8 @@ private:
{
Reference< XMultiComponentFactory > xMFac(
xCtx->getServiceManager(), UNO_QUERY );
+
+ // SfxObjectShellRef is good here since the model controls the lifetime of the shell
SfxObjectShellRef xObjSh = pModel->GetObjectShell();
Reference< XMultiServiceFactory > xDocFac;
if ( xObjSh.Is() )
@@ -150,6 +152,7 @@ private:
{
try
{
+ // SfxObjectShellRef is good here since the model controls the lifetime of the shell
SfxObjectShellRef xObjSh = pModel->GetObjectShell();
if ( xObjSh.Is() && m_vbaListener.is() )
{
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index eab2546e5e91..eee9f46953c4 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -626,7 +626,7 @@ sal_Bool Gallery::CreateTheme( const String& rThemeName, sal_uInt32 nNumFrom )
if( !HasTheme( rThemeName ) && ( GetUserURL().GetProtocol() != INET_PROT_NOT_VALID ) )
{
- nLastFileNumber=nNumFrom > nLastFileNumber ? nNumFrom : ++nLastFileNumber;
+ nLastFileNumber = nNumFrom > nLastFileNumber ? nNumFrom : nLastFileNumber + 1;
GalleryThemeEntry* pNewEntry = new GalleryThemeEntry( GetUserURL(), rThemeName,
nLastFileNumber,
sal_False, sal_False, sal_True, 0, sal_False );
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index c2e49401cfc8..b6d24a16ee55 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -60,7 +60,7 @@ size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustom
return (size_t)r1.first.hashCode() + r1.second.hashCode();
};
-TYPEINIT1_FACTORY( SdrCustomShapeGeometryItem, SfxPoolItem , new SdrCustomShapeGeometryItem(0));
+TYPEINIT1_FACTORY( SdrCustomShapeGeometryItem, SfxPoolItem , new SdrCustomShapeGeometryItem);
SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem()
: SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )
{}
diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
index e24aa1c29de7..5d4e6d71fbe9 100644
--- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
+++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
@@ -121,7 +121,7 @@ namespace sdr
aViewRange,
GetXDrawPageForSdrPage(const_cast< SdrPage* >(mpProcessedPage)),
0.0,
- 0);
+ com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>());
updateViewInformation2D(aNewViewInformation2D);
// collect primitive data in a sequence; this will already use the updated ViewInformation2D
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index d2264e219c48..d804cce575a1 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -241,7 +241,7 @@ namespace sdr
aViewRange,
GetXDrawPageForSdrPage(GetSdrPage()),
fCurrentTime,
- 0);
+ uno::Sequence<beans::PropertyValue>());
updateViewInformation2D(aNewViewInformation2D);
// get whole Primitive2DSequence; this will already make use of updated ViewInformation2D
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 48e0e5b1e349..1ba774ba378f 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -296,7 +296,7 @@ namespace sdr
// decompose immediately with neutral ViewInformation. This will
// layout the text to more simple TextPrimitives from drawinglayer
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(
xRetval,
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index f52205d88e45..93e3b03d072d 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -138,7 +138,7 @@ namespace sdr
mnStripeLengthPixel(5),
maDrawinglayerOpt(),
maViewTransformation(),
- maViewInformation2D(0),
+ maViewInformation2D(),
mfDiscreteOne(0.0)
{
// set Property 'ReducedDisplayQuality' to true to allow simpler interaction
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 84d3d56a5edf..afbb6d0b4066 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -902,6 +902,9 @@ void SdrDragMovHdl::TakeSdrDragComment(XubString& rStr) const
bool SdrDragMovHdl::BeginSdrDrag()
{
+ if( !GetDragHdl() )
+ return false;
+
DragStat().Ref1()=GetDragHdl()->GetPos();
DragStat().SetShown(!DragStat().IsShown());
SdrHdlKind eKind=GetDragHdl()->GetKind();
@@ -931,7 +934,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
{
Point aPnt(rNoSnapPnt);
- if (DragStat().CheckMinMoved(rNoSnapPnt))
+ if ( GetDragHdl() && DragStat().CheckMinMoved(rNoSnapPnt))
{
if (GetDragHdl()->GetKind()==HDL_MIRX)
{
@@ -1042,22 +1045,25 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
bool SdrDragMovHdl::EndSdrDrag(bool /*bCopy*/)
{
- switch (GetDragHdl()->GetKind())
+ if( GetDragHdl() )
{
- case HDL_REF1:
- Ref1()=DragStat().GetNow();
- break;
+ switch (GetDragHdl()->GetKind())
+ {
+ case HDL_REF1:
+ Ref1()=DragStat().GetNow();
+ break;
- case HDL_REF2:
- Ref2()=DragStat().GetNow();
- break;
+ case HDL_REF2:
+ Ref2()=DragStat().GetNow();
+ break;
- case HDL_MIRX:
- Ref1()+=DragStat().GetNow()-DragStat().GetStart();
- Ref2()+=DragStat().GetNow()-DragStat().GetStart();
- break;
+ case HDL_MIRX:
+ Ref1()+=DragStat().GetNow()-DragStat().GetStart();
+ Ref2()+=DragStat().GetNow()-DragStat().GetStart();
+ break;
- default: break;
+ default: break;
+ }
}
return true;
@@ -1066,7 +1072,11 @@ bool SdrDragMovHdl::EndSdrDrag(bool /*bCopy*/)
void SdrDragMovHdl::CancelSdrDrag()
{
Hide();
- GetDragHdl()->SetPos(DragStat().GetRef1());
+
+ SdrHdl* pHdl = GetDragHdl();
+ if( pHdl )
+ pHdl->SetPos(DragStat().GetRef1());
+
SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX);
if(pHM)
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index c82a367e9a5b..81ff5005d0f6 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -940,7 +940,7 @@ void SdrObject::RecalcBoundRect()
if(xPrimitives.hasElements())
{
// use neutral ViewInformation and get the range of the primitives
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
const basegfx::B2DRange aRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xPrimitives, aViewInformation2D));
if(!aRange.isEmpty())
@@ -1202,7 +1202,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
if(xSequence.hasElements())
{
// use neutral ViewInformation
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
// create extractor, process and get result
drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D);
@@ -2431,7 +2431,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, sal_Bool bForceLin
if(xSequence.hasElements())
{
// use neutral ViewInformation
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
// create extractor, process and get result
drawinglayer::processor2d::LineGeometryExtractor2D aExtractor(aViewInformation2D);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index b8cc6f51413a..7c0d7e6568af 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1430,8 +1430,6 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint
FASTBOOL bContourFrame=IsContourTextFrame();
- ImpSetupDrawOutlinerForPaint( bContourFrame, rOutl, aTextRect, aAnchorRect, rPaintRect, aFitXKorreg );
-
if( GetModel() )
{
MapMode aMapMode(GetModel()->GetScaleUnit(), Point(0,0),
@@ -1439,6 +1437,8 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint
GetModel()->GetScaleFraction());
rOutl.SetRefMapMode(aMapMode);
}
+
+ ImpSetupDrawOutlinerForPaint( bContourFrame, rOutl, aTextRect, aAnchorRect, rPaintRect, aFitXKorreg );
}
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 3e7f5434b14e..6f129affcbba 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -354,7 +354,7 @@ SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const
if(xSequence.hasElements())
{
// create an extractor with neutral ViewInformation
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
drawinglayer::processor2d::TextAsPolygonExtractor2D aExtractor(aViewInformation2D);
// extract text as polygons
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 4063d0bfe83d..acfaf12ae8d6 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -988,8 +988,6 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
if ((IsDraggingPoints() || IsDraggingGluePoints()) && IsMouseHideWhileDraggingPoints())
return Pointer(POINTER_NULL);
- OSL_TRACE("SdrView::GetPreferedPointer(%lx) %lx\n", this, mpCurrentSdrDragMethod);
-
return mpCurrentSdrDragMethod->GetSdrDragPointer();
}
if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsEncirclement() || IsSetPageOrg()) return Pointer(POINTER_ARROW);
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 134176859447..a4abc4e23d88 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/media/ZoomLevel.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
#include <tools/shl.hxx>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 078acc3b3701..2d82868512c5 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -122,7 +122,6 @@ private:
SvxDrawOutlinerViewForwarder* CreateViewForwarder();
void SetupOutliner();
- void UpdateOutliner();
sal_Bool HasView() const { return mpView ? sal_True : sal_False; }
sal_Bool IsEditMode() const
@@ -168,6 +167,8 @@ public:
virtual void ObjectInDestruction(const SdrObject& rObject);
void ChangeModel( SdrModel* pNewModel );
+
+ void UpdateOutliner();
};
//------------------------------------------------------------------------
@@ -1147,3 +1148,8 @@ void SvxTextEditSource::ChangeModel( SdrModel* pNewModel )
{
mpImpl->ChangeModel( pNewModel );
}
+
+void SvxTextEditSource::UpdateOutliner()
+{
+ mpImpl->UpdateOutliner();
+}
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
index 642dbecaa876..305b181a65a2 100644
--- a/svx/source/xoutdev/xpool.cxx
+++ b/svx/source/xoutdev/xpool.cxx
@@ -52,8 +52,8 @@ XOutdevItemPool::XOutdevItemPool(
const XubString aNullStr;
const Bitmap aNullBmp;
const basegfx::B2DPolyPolygon aNullPol;
- const Color aNullLineCol(RGB_Color(COL_BLACK));
- const Color aNullFillCol(RGB_Color(COL_DEFAULT_SHAPE_FILLING)); // "Blue 8"
+ const Color aNullLineCol(RGB_Color(COL_DEFAULT_SHAPE_STROKE));
+ const Color aNullFillCol(RGB_Color(COL_DEFAULT_SHAPE_FILLING));
const Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY));
const XDash aNullDash;
const XGradient aNullGrad(aNullLineCol, RGB_Color(COL_WHITE));
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index bc7273432c66..c1489cd13704 100755
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -42,7 +42,7 @@
#include "tools/solar.h" // sal_uInt16
#include "tools/errcode.hxx" // ErrCode
#include "tools/rc.hxx" // Resource
-#include "vcl/wintypes.hxx" // WinBits
+#include "tools/wintypes.hxx" // WinBits
namespace com { namespace sun { namespace star {
namespace awt {
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index cf6d655ff353..bddd756f6836 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -311,8 +311,8 @@ void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const u
if ( !xModel.is() )
xModel = getCurrentDocument();
- VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( xModel ), aMacroName );
- if( aMacroInfo.IsResolved() )
+ MacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( xModel ), aMacroName );
+ if( aMacroInfo.mbFound )
{
// handle the arguments
const uno::Any* aArgsPtrArray[] = { &varg1, &varg2, &varg3, &varg4, &varg5, &varg6, &varg7, &varg8, &varg9, &varg10, &varg11, &varg12, &varg13, &varg14, &varg15, &varg16, &varg17, &varg18, &varg19, &varg20, &varg21, &varg22, &varg23, &varg24, &varg25, &varg26, &varg27, &varg28, &varg29, &varg30 };
@@ -338,7 +338,7 @@ void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const u
uno::Any aRet;
uno::Any aDummyCaller;
- executeMacro( aMacroInfo.MacroDocContext(), aMacroInfo.ResolvedMacro(), aArgs, aRet, aDummyCaller );
+ executeMacro( aMacroInfo.mpDocContext, aMacroInfo.msResolvedMacro, aArgs, aRet, aDummyCaller );
}
else
{
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index 56b89c27bb5b..157d54eca7d5 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -78,10 +78,10 @@ ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (u
{
// get the current model
uno::Reference< frame::XModel > xModel( pCBarHelper->getModel() );
- VBAMacroResolvedInfo aResolvedMacro = ooo::vba::resolveVBAMacro( getSfxObjShell( xModel ), _onaction, true );
- if ( aResolvedMacro.IsResolved() )
+ MacroResolvedInfo aResolvedMacro = ooo::vba::resolveVBAMacro( getSfxObjShell( xModel ), _onaction, true );
+ if ( aResolvedMacro.mbFound )
{
- rtl::OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.ResolvedMacro() );
+ rtl::OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.msResolvedMacro );
OSL_TRACE(" ScVbaCommandBarControl::setOnAction: %s", rtl::OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("CommandURL"), uno::makeAny( aCommandURL ) );
ApplyChange();
diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
index b88086cd6d1d..8000a7cdf66e 100755
--- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
+++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
@@ -196,8 +196,8 @@ const VbaEventsHelperBase::EventHandlerInfo& VbaEventsHelperBase::getEventHandle
append( sal_Unicode( '.' ) ).append( rInfo.maMacroName ).makeStringAndClear();
break;
}
- VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( mpShell, aMacroName, false );
- return aMacroInfo.IsResolved() ? ::rtl::OUString( aMacroInfo.ResolvedMacro() ) : ::rtl::OUString();
+ MacroResolvedInfo aMacroInfo = resolveVBAMacro( mpShell, aMacroName, false );
+ return aMacroInfo.mbFound ? ::rtl::OUString( aMacroInfo.msResolvedMacro ) : ::rtl::OUString();
}
void VbaEventsHelperBase::stopListening()
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index f1113c1e114f..d798f6c42f81 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -42,6 +42,7 @@
#include <string.h>
// Extensible help
+#include "com/sun/star/deployment/ExtensionManager.hpp"
#include "com/sun/star/deployment/thePackageManagerFactory.hpp"
#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -1587,10 +1588,9 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack
if( !m_bUserPackagesLoaded )
{
- Reference< XPackageManager > xUserManager =
- thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("user") );
- m_aUserPackagesSeq = xUserManager->getDeployedPackages
- ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
+ Reference< XExtensionManager > xExtensionManager = ExtensionManager::get(m_xContext);
+ m_aUserPackagesSeq = xExtensionManager->getDeployedExtensions
+ ( rtl::OUString::createFromAscii("user"), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
m_bUserPackagesLoaded = true;
}
@@ -1616,10 +1616,9 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa
if( !m_bSharedPackagesLoaded )
{
- Reference< XPackageManager > xSharedManager =
- thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("shared") );
- m_aSharedPackagesSeq = xSharedManager->getDeployedPackages
- ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
+ Reference< XExtensionManager > xExtensionManager = ExtensionManager::get(m_xContext);
+ m_aSharedPackagesSeq = xExtensionManager->getDeployedExtensions
+ ( rtl::OUString::createFromAscii("shared"), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
m_bSharedPackagesLoaded = true;
}
@@ -1645,10 +1644,9 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP
if( !m_bBundledPackagesLoaded )
{
- Reference< XPackageManager > xBundledManager =
- thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("bundled") );
- m_aBundledPackagesSeq = xBundledManager->getDeployedPackages
- ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
+ Reference< XExtensionManager > xExtensionManager = ExtensionManager::get(m_xContext);
+ m_aBundledPackagesSeq = xExtensionManager->getDeployedExtensions
+ ( rtl::OUString::createFromAscii("bundled"), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
m_bBundledPackagesLoaded = true;
}
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index 2e335b4175c4..ddd7a21c8fb4 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ -390,6 +390,20 @@ $(eval $(call gb_Library_add_linked_libs,xo,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,xo,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,xo,\
kernel32 \
msvcrt \
@@ -398,4 +412,5 @@ $(eval $(call gb_Library_add_linked_libs,xo,\
uwinapi \
))
endif
+endif
# vim: set noet ts=4 sw=4:
diff --git a/xmloff/Library_xof.mk b/xmloff/Library_xof.mk
index 6880eb1a1fd9..e809935d12ba 100644
--- a/xmloff/Library_xof.mk
+++ b/xmloff/Library_xof.mk
@@ -101,6 +101,20 @@ $(eval $(call gb_Library_add_linked_libs,xof,\
endif
ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,xof,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
$(eval $(call gb_Library_add_linked_libs,xof,\
kernel32 \
msvcrt \
@@ -109,4 +123,5 @@ $(eval $(call gb_Library_add_linked_libs,xof,\
uwinapi \
))
endif
+endif
# vim: set noet ts=4 sw=4:
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 358cb023199c..3b28fb4839bd 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1598,6 +1598,21 @@ void SchXMLExportHelper_Impl::exportTable()
// table element
// -------------
mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, msTableName );
+
+ try
+ {
+ bool bProtected = false;
+ Reference< beans::XPropertySet > xProps( mrExport.GetModel(), uno::UNO_QUERY_THROW );
+ if ( ( xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bProtected ) &&
+ bProtected )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_PROTECTED, XML_TRUE );
+ }
+ }
+ catch ( uno::Exception& )
+ {
+ }
+
SvXMLElementExport aTable( mrExport, XML_NAMESPACE_TABLE, XML_TABLE, sal_True, sal_True );
bool bHasOwnData = false;
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 957ff7b225fc..2f32682ba835 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -375,12 +375,19 @@ void SchXMLTableContext::StartElement( const uno::Reference< xml::sax::XAttribut
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
-
- if( nPrefix == XML_NAMESPACE_TABLE &&
- IsXMLToken( aLocalName, XML_NAME ) )
+ if ( nPrefix == XML_NAMESPACE_TABLE )
{
- mrTable.aTableNameOfFile = xAttrList->getValueByIndex( i );
- break; // we only need this attribute
+ if ( IsXMLToken( aLocalName, XML_NAME ) )
+ {
+ mrTable.aTableNameOfFile = xAttrList->getValueByIndex( i );
+ }
+ else if ( IsXMLToken( aLocalName, XML_PROTECTED ) )
+ {
+ if ( IsXMLToken( xAttrList->getValueByIndex( i ), XML_TRUE ) )
+ {
+ mrTable.bProtected = true;
+ }
+ }
}
}
}
@@ -928,6 +935,19 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
xDataAccess->setComplexRowDescriptions( aComplexRowDescriptions );
if( rTable.bHasHeaderRow )
xDataAccess->setComplexColumnDescriptions( aComplexColumnDescriptions );
+
+ if ( rTable.bProtected )
+ {
+ try
+ {
+ Reference< beans::XPropertySet > xProps( xChartDoc, uno::UNO_QUERY_THROW );
+ xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ), uno::makeAny( sal_True ) );
+ xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ), uno::makeAny( sal_True ) );
+ }
+ catch ( uno::Exception& )
+ {
+ }
+ }
}
void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx
index 27c8850e2b81..599741dfe273 100644
--- a/xmloff/source/chart/transporttypes.hxx
+++ b/xmloff/source/chart/transporttypes.hxx
@@ -87,12 +87,15 @@ struct SchXMLTable
::std::vector< sal_Int32 > aHiddenColumns;
+ bool bProtected;
+
SchXMLTable() : nRowIndex( -1 ),
nColumnIndex( -1 ),
nMaxColumnIndex( -1 ),
nNumberOfColsEstimate( 0 ),
bHasHeaderRow( false ),
- bHasHeaderColumn( false )
+ bHasHeaderColumn( false ),
+ bProtected( false )
{}
};