summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-11-25 20:59:45 +0100
committerJan Holesovsky <kendy@suse.cz>2010-11-25 20:59:45 +0100
commit942df6544106661aba8c23e37a19cec8b188a5fb (patch)
tree25931191ac3c06b6dff9044697e360dfc15dffb5
parente29dff1571e059c443cf2c7d6118e5e4a2747801 (diff)
parentdd1ebc46c5487e76c81cc6dec17b20796e110e08 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/libs-core
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.cxx1
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.hxx11
-rw-r--r--desktop/source/deployment/registry/script/dp_lib_container.cxx6
-rw-r--r--desktop/source/deployment/registry/script/dp_lib_container.h17
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx159
-rw-r--r--desktop/source/migration/cfgfilter.cxx102
-rw-r--r--desktop/source/migration/migration.cxx33
-rw-r--r--desktop/source/migration/migration_impl.hxx5
-rw-r--r--scripting/source/stringresource/stringresource.cxx2
-rw-r--r--sfx2/source/appl/makefile.mk4
-rw-r--r--sfx2/source/appl/shutdownicon.cxx26
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx50
-rw-r--r--sfx2/source/doc/doctemplates.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx4
-rw-r--r--svx/source/svdraw/svdpntv.cxx104
-rw-r--r--ucb/source/ucp/file/filtask.hxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx12
-rw-r--r--xmloff/source/draw/animationexport.cxx20
20 files changed, 319 insertions, 249 deletions
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index 0e67097df5..dff464b829 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -113,9 +113,7 @@ namespace
::rtl::OUStringBuffer buf;
buf.append( StrOperatingSystem::get() );
buf.append( static_cast<sal_Unicode>('_') );
- OUString arch( RTL_CONSTASCII_USTRINGPARAM("$_ARCH") );
- ::rtl::Bootstrap::expandMacros( arch );
- buf.append( arch );
+ buf.append( StrCPU::get() );
return buf.makeStringAndClear();
}
};
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
index c3b0c092c0..9da7756929 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
-#include "rtl/string.h"
#include "rtl/bootstrap.hxx"
#include "cppuhelper/exc_hlp.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.hxx b/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
index ac57bd794e..f25203193a 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
@@ -26,13 +26,14 @@
*
************************************************************************/
-
#if ! defined INCLUDED_DP_EXTBACKENDDB_HXX
#define INCLUDED_DP_EXTBACKENDDB_HXX
-#include "rtl/ustring.hxx"
-#include "rtl/string.hxx"
+#include <utility>
#include <vector>
+
+#include "rtl/ustring.hxx"
+
#include "dp_backenddb.hxx"
namespace css = ::com::sun::star;
@@ -74,11 +75,9 @@ public:
::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString> > items;
typedef ::std::vector<
::std::pair< ::rtl::OUString, ::rtl::OUString> >::const_iterator ITC_ITEMS;
-
};
public:
-
ExtensionBackendDb( css::uno::Reference<css::uno::XComponentContext> const & xContext,
::rtl::OUString const & url);
@@ -88,8 +87,6 @@ public:
};
-
-
}
}
}
diff --git a/desktop/source/deployment/registry/script/dp_lib_container.cxx b/desktop/source/deployment/registry/script/dp_lib_container.cxx
index 4dc71b7fd9..ccc2b29874 100644
--- a/desktop/source/deployment/registry/script/dp_lib_container.cxx
+++ b/desktop/source/deployment/registry/script/dp_lib_container.cxx
@@ -29,11 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+
#include "dp_script.hrc"
#include "dp_resource.h"
#include "dp_xml.h"
#include "dp_lib_container.h"
+
+#include "rtl/ustring.hxx"
#include "ucbhelper/content.hxx"
+#include "xmlscript/xmllib_imexp.hxx"
using namespace ::dp_misc;
diff --git a/desktop/source/deployment/registry/script/dp_lib_container.h b/desktop/source/deployment/registry/script/dp_lib_container.h
index b0f29c1e80..009846a3c0 100644
--- a/desktop/source/deployment/registry/script/dp_lib_container.h
+++ b/desktop/source/deployment/registry/script/dp_lib_container.h
@@ -29,11 +29,20 @@
#if ! defined INCLUDED_DP_LIB_CONTAINER_H
#define INCLUDED_DP_LIB_CONTAINER_H
-#include "rtl/ustring.hxx"
-#include "xmlscript/xmllib_imexp.hxx"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+#include <com/sun/star/uno/Reference.hxx>
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ }
+ namespace ucb {
+ class XCommandEnvironment;
+ }
+}}}
+
+namespace rtl {
+ class OUString;
+}
namespace css = ::com::sun::star;
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index 4d65cc6b9b..31b30271a9 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -41,7 +41,6 @@
#include "svl/inettype.hxx"
#include "com/sun/star/util/XUpdatable.hpp"
#include "com/sun/star/script/XLibraryContainer3.hpp"
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <memory>
@@ -62,7 +61,6 @@ namespace {
typedef ::cppu::ImplInheritanceHelper1<
::dp_registry::backend::PackageRegistryBackend, util::XUpdatable > t_helper;
-//==============================================================================
class BackendImpl : public t_helper
{
class PackageImpl : public ::dp_registry::backend::Package
@@ -84,7 +82,7 @@ class BackendImpl : public t_helper
bool startup,
::rtl::Reference<AbortChannel> const & abortChannel,
Reference<XCommandEnvironment> const & xCmdEnv );
-
+
public:
PackageImpl(
::rtl::Reference<BackendImpl> const & myBackend,
@@ -105,11 +103,6 @@ class BackendImpl : public t_helper
void deleteDataFromDb(OUString const & url);
bool isRegisteredInDb(OUString const & url);
-
-
-// Reference< ucb::XSimpleFileAccess > getFileAccess( void );
-// Reference< ucb::XSimpleFileAccess > m_xSFA;
-
const Reference<deployment::XPackageTypeInfo> m_xBasicLibTypeInfo;
const Reference<deployment::XPackageTypeInfo> m_xDialogLibTypeInfo;
Sequence< Reference<deployment::XPackageTypeInfo> > m_typeInfos;
@@ -310,15 +303,13 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
}
return pBackend;
}
-//______________________________________________________________________________
+
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::PackageImpl::isRegistered_(
- ::osl::ResettableMutexGuard &,
- ::rtl::Reference<AbortChannel> const &,
- Reference<XCommandEnvironment> const & xCmdEnv )
+ ::osl::ResettableMutexGuard & /* guard */,
+ ::rtl::Reference<AbortChannel> const & /* abortChannel */,
+ Reference<XCommandEnvironment> const & /* xCmdEnv */ )
{
- (void)xCmdEnv;
-
BackendImpl * that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
@@ -328,16 +319,67 @@ BackendImpl::PackageImpl::isRegistered_(
beans::Ambiguous<sal_Bool>( registered, false /* IsAmbiguous */ ) );
}
-//______________________________________________________________________________
+void
+lcl_maybeRemoveScript(
+ bool const bExists,
+ OUString const& rName,
+ OUString const& rScriptURL,
+ Reference<css::script::XLibraryContainer3> const& xScriptLibs)
+{
+ if (bExists && xScriptLibs.is() && xScriptLibs->hasByName(rName))
+ {
+ const OUString sScriptUrl = xScriptLibs->getOriginalLibraryLinkURL(rName);
+ if (sScriptUrl.equals(rScriptURL))
+ xScriptLibs->removeLibrary(rName);
+ }
+}
+
+bool
+lcl_maybeAddScript(
+ bool const bExists,
+ OUString const& rName,
+ OUString const& rScriptURL,
+ Reference<css::script::XLibraryContainer3> const& xScriptLibs)
+{
+ if (bExists && xScriptLibs.is())
+ {
+ bool bCanAdd = true;
+ if (xScriptLibs->hasByName(rName))
+ {
+ const OUString sOriginalUrl = xScriptLibs->getOriginalLibraryLinkURL(rName);
+ //We assume here that library names in extensions are unique, which may not be the case
+ //ToDo: If the script exist in another extension, then both extensions must have the
+ //same id
+ if (sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"))
+ || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"))
+ || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$BUNDLED_EXTENSIONS")))
+ {
+ xScriptLibs->removeLibrary(rName);
+ bCanAdd = true;
+ }
+ else
+ {
+ bCanAdd = false;
+ }
+ }
+
+ if (bCanAdd)
+ {
+ xScriptLibs->createLibraryLink(rName, rScriptURL, false);
+ return xScriptLibs->hasByName(rName);
+ }
+ }
+
+ return false;
+}
+
void BackendImpl::PackageImpl::processPackage_(
- ::osl::ResettableMutexGuard &,
+ ::osl::ResettableMutexGuard & /* guard */,
bool doRegisterPackage,
bool startup,
- ::rtl::Reference<AbortChannel> const &,
- Reference<XCommandEnvironment> const & xCmdEnv )
+ ::rtl::Reference<AbortChannel> const & /* abortChannel */,
+ Reference<XCommandEnvironment> const & /* xCmdEnv */ )
{
- (void)xCmdEnv;
-
BackendImpl * that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
@@ -386,19 +428,8 @@ void BackendImpl::PackageImpl::processPackage_(
//we also prevent and live deployment at startup
if (!isRemoved() && !startup)
{
- if (bScript && xScriptLibs.is() && xScriptLibs->hasByName(m_name))
- {
- const OUString sScriptUrl = xScriptLibs->getOriginalLibraryLinkURL(m_name);
- if (sScriptUrl.equals(m_scriptURL))
- xScriptLibs->removeLibrary(m_name);
- }
-
- if (bDialog && xDialogLibs.is() && xDialogLibs->hasByName(m_dialogName))
- {
- const OUString sDialogUrl = xDialogLibs->getOriginalLibraryLinkURL(m_dialogName);
- if (sDialogUrl.equals(m_dialogURL))
- xDialogLibs->removeLibrary(m_dialogName);
- }
+ lcl_maybeRemoveScript(bScript, m_name, m_scriptURL, xScriptLibs);
+ lcl_maybeRemoveScript(bDialog, m_dialogName, m_dialogURL, xDialogLibs);
}
getMyBackend()->deleteDataFromDb(getURL());
return;
@@ -409,72 +440,14 @@ void BackendImpl::PackageImpl::processPackage_(
// Update LibraryContainer
bool bScriptSuccess = false;
- const bool bReadOnly = false;
-
bool bDialogSuccess = false;
if (!startup)
{
//If there is a bundled extension, and the user installes the same extension
//then the script from the bundled extension must be removed. If this does not work
//then live deployment does not work for scripts.
- if (bScript && xScriptLibs.is())
- {
- bool bCanAdd = true;
- if (xScriptLibs->hasByName(m_name))
- {
- const OUString sOriginalUrl = xScriptLibs->getOriginalLibraryLinkURL(m_name);
- //We assume here that library names in extensions are unique, which may not be the case
- //ToDo: If the script exist in another extension, then both extensions must have the
- //same id
- if (sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$BUNDLED_EXTENSIONS")))
- {
- xScriptLibs->removeLibrary(m_name);
- bCanAdd = true;
- }
- else
- {
- bCanAdd = false;
- }
- }
-
- if (bCanAdd)
- {
- xScriptLibs->createLibraryLink( m_name, m_scriptURL, bReadOnly );
- bScriptSuccess = xScriptLibs->hasByName( m_name );
- }
- }
-
-
- if (bDialog && xDialogLibs.is())
- {
- bool bCanAdd = true;
- if (xDialogLibs->hasByName(m_dialogName))
- {
- const OUString sOriginalUrl = xDialogLibs->getOriginalLibraryLinkURL(m_dialogName);
- //We assume here that library names in extensions are unique, which may not be the case
- //ToDo: If the script exist in another extension, then both extensions must have the
- //same id
- if (sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$BUNDLED_EXTENSIONS")))
- {
- xDialogLibs->removeLibrary(m_dialogName);
- bCanAdd = true;
- }
- else
- {
- bCanAdd = false;
- }
- }
-
- if (bCanAdd)
- {
- xDialogLibs->createLibraryLink( m_dialogName, m_dialogURL, bReadOnly );
- bDialogSuccess = xDialogLibs->hasByName(m_dialogName);
- }
- }
+ bScriptSuccess = lcl_maybeAddScript(bScript, m_name, m_scriptURL, xScriptLibs);
+ bDialogSuccess = lcl_maybeAddScript(bDialog, m_dialogName, m_dialogURL, xDialogLibs);
}
bool bSuccess = bScript || bDialog; // Something must have happened
if( bRunning && !startup)
diff --git a/desktop/source/migration/cfgfilter.cxx b/desktop/source/migration/cfgfilter.cxx
index 5220965edb..5928ad8ce7 100644
--- a/desktop/source/migration/cfgfilter.cxx
+++ b/desktop/source/migration/cfgfilter.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -45,15 +45,15 @@ namespace desktop {
CConfigFilter::CConfigFilter(const strings_v* include, const strings_v* exclude)
: m_pvInclude(include)
- , m_pvExclude(exclude)
+ , m_pvExclude(exclude)
{
-}
+}
void SAL_CALL CConfigFilter::initialize(const Sequence< Any >& seqArgs)
throw (Exception)
{
NamedValue nv;
- for (sal_Int32 i=0; i < seqArgs.getLength(); i++)
+ for (sal_Int32 i=0; i < seqArgs.getLength(); ++i)
{
if (seqArgs[i] >>= nv)
{
@@ -65,7 +65,7 @@ void SAL_CALL CConfigFilter::initialize(const Sequence< Any >& seqArgs)
}
if (m_aCurrentComponent.getLength() == 0)
m_aCurrentComponent = OUString(RTL_CONSTASCII_USTRINGPARAM("unknown.component"));
-
+
if (!m_xSourceLayer.is()) {
throw Exception();
}
@@ -79,7 +79,7 @@ void CConfigFilter::pushElement(rtl::OUString aName, sal_Bool bUse)
if (!m_elementStack.empty()) {
aPath = m_elementStack.top().path; // or use base path
aPath += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- }
+ }
aPath += aName;
// create element
@@ -106,25 +106,25 @@ sal_Bool CConfigFilter::checkElement(rtl::OUString aName)
aFullPath = m_elementStack.top().path + OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aFullPath += aName;
-
+
// check whether any include patterns patch this path
for (strings_v::const_iterator i_in = m_pvInclude->begin();
- i_in != m_pvInclude->end(); i_in++)
+ i_in != m_pvInclude->end(); ++i_in)
{
// pattern is beginning of path
// or path is a begiing for pattern
- if (i_in->match(aFullPath.copy(0, i_in->getLength()>aFullPath.getLength()
- ? aFullPath.getLength() : i_in->getLength()), 0))
+ if (i_in->match(aFullPath.copy(0, i_in->getLength()>aFullPath.getLength()
+ ? aFullPath.getLength() : i_in->getLength()), 0))
{
bResult = sal_True;
break; // one match is enough
- }
+ }
}
// if match is found, check for exclusion
if (bResult)
{
for (strings_v::const_iterator i_ex = m_pvExclude->begin();
- i_ex != m_pvExclude->end(); i_ex++)
+ i_ex != m_pvExclude->end(); ++i_ex)
{
if (aFullPath.match(*i_ex, 0)) // pattern is beginning of path
{
@@ -142,13 +142,13 @@ void CConfigFilter::popElement()
}
-void SAL_CALL CConfigFilter::readData(
+void SAL_CALL CConfigFilter::readData(
const Reference< configuration::backend::XLayerHandler >& layerHandler)
throw (
com::sun::star::lang::NullPointerException, lang::WrappedTargetException,
com::sun::star::configuration::backend::MalformedDataException)
{
- // when readData is called, the submitted handler will be stored
+ // when readData is called, the submitted handler will be stored
// in m_xLayerHandler. we will then submit ourself as a handler to
// the SourceLayer in m_xSourceLayer.
// when the source calls our handler functions we will use the patterns that
@@ -165,23 +165,23 @@ void SAL_CALL CConfigFilter::readData(
}
// XLayerHandler
-void SAL_CALL CConfigFilter::startLayer()
+void SAL_CALL CConfigFilter::startLayer()
throw(::com::sun::star::lang::WrappedTargetException)
{
m_xLayerHandler->startLayer();
}
-void SAL_CALL CConfigFilter::endLayer()
- throw(
+void SAL_CALL CConfigFilter::endLayer()
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
m_xLayerHandler->endLayer();
}
-void SAL_CALL CConfigFilter::overrideNode(
- const OUString& aName,
- sal_Int16 aAttributes,
+void SAL_CALL CConfigFilter::overrideNode(
+ const OUString& aName,
+ sal_Int16 aAttributes,
sal_Bool bClear)
throw(
::com::sun::star::configuration::backend::MalformedDataException,
@@ -191,15 +191,15 @@ void SAL_CALL CConfigFilter::overrideNode(
{
m_xLayerHandler->overrideNode(aName, aAttributes, bClear);
pushElement(aName);
- }
+ }
else
pushElement(aName, sal_False);
}
void SAL_CALL CConfigFilter::addOrReplaceNode(
- const OUString& aName,
- sal_Int16 aAttributes)
- throw(
+ const OUString& aName,
+ sal_Int16 aAttributes)
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -212,10 +212,10 @@ void SAL_CALL CConfigFilter::addOrReplaceNode(
pushElement(aName, sal_False);
}
-void SAL_CALL CConfigFilter::addOrReplaceNodeFromTemplate(
+void SAL_CALL CConfigFilter::addOrReplaceNodeFromTemplate(
const OUString& aName,
const com::sun::star::configuration::backend::TemplateIdentifier& aTemplate,
- sal_Int16 aAttributes )
+ sal_Int16 aAttributes )
throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
@@ -229,21 +229,21 @@ void SAL_CALL CConfigFilter::addOrReplaceNodeFromTemplate(
pushElement(aName, sal_False);
}
-void SAL_CALL CConfigFilter::endNode()
- throw(
+void SAL_CALL CConfigFilter::endNode()
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
if (checkCurrentElement())
{
- m_xLayerHandler->endNode();
+ m_xLayerHandler->endNode();
}
popElement();
}
-void SAL_CALL CConfigFilter::dropNode(
- const OUString& aName )
- throw(
+void SAL_CALL CConfigFilter::dropNode(
+ const OUString& aName )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -254,12 +254,12 @@ void SAL_CALL CConfigFilter::dropNode(
}
}
-void SAL_CALL CConfigFilter::overrideProperty(
+void SAL_CALL CConfigFilter::overrideProperty(
const OUString& aName,
sal_Int16 aAttributes,
const Type& aType,
- sal_Bool bClear )
- throw(
+ sal_Bool bClear )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -271,9 +271,9 @@ void SAL_CALL CConfigFilter::overrideProperty(
pushElement(aName, sal_False);
}
-void SAL_CALL CConfigFilter::setPropertyValue(
- const Any& aValue )
- throw(
+void SAL_CALL CConfigFilter::setPropertyValue(
+ const Any& aValue )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -281,10 +281,10 @@ void SAL_CALL CConfigFilter::setPropertyValue(
m_xLayerHandler->setPropertyValue(aValue);
}
-void SAL_CALL CConfigFilter::setPropertyValueForLocale(
+void SAL_CALL CConfigFilter::setPropertyValueForLocale(
const Any& aValue,
- const OUString& aLocale )
- throw(
+ const OUString& aLocale )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -292,8 +292,8 @@ void SAL_CALL CConfigFilter::setPropertyValueForLocale(
m_xLayerHandler->setPropertyValueForLocale(aValue, aLocale);
}
-void SAL_CALL CConfigFilter::endProperty()
- throw(
+void SAL_CALL CConfigFilter::endProperty()
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -305,30 +305,30 @@ void SAL_CALL CConfigFilter::endProperty()
}
-void SAL_CALL CConfigFilter::addProperty(
+void SAL_CALL CConfigFilter::addProperty(
const rtl::OUString& aName,
sal_Int16 aAttributes,
const Type& aType )
- throw(
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
- if (checkElement(aName))
+ if (checkElement(aName))
m_xLayerHandler->addProperty(aName, aAttributes, aType);
}
-void SAL_CALL CConfigFilter::addPropertyWithValue(
+void SAL_CALL CConfigFilter::addPropertyWithValue(
const rtl::OUString& aName,
sal_Int16 aAttributes,
- const Any& aValue )
- throw(
+ const Any& aValue )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
// add property with value doesn't push the property
- if (checkElement(aName))
+ if (checkElement(aName))
m_xLayerHandler->addPropertyWithValue(aName, aAttributes, aValue);
-
+
}
} // namespace desktop
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 2c1d6d69e0..e66d1269ea 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -85,6 +85,7 @@ static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL(RTL_CONSTASCII_USTRINGPARAM("
static const ::rtl::OUString MENU_SEPERATOR(RTL_CONSTASCII_USTRINGPARAM(" | "));
static const ::rtl::OUString MENU_SUBMENU(RTL_CONSTASCII_USTRINGPARAM("..."));
+static const ::rtl::OUString MIGRATION_STAMP_NAME(RTL_CONSTASCII_USTRINGPARAM("/MIGRATED"));
::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier)
{
@@ -194,15 +195,31 @@ static const ::rtl::OUString MENU_SUBMENU(RTL_CONSTASCII_USTRINGPARAM("..."));
return sIdentifier;
}
-sal_Bool MigrationImpl::initializeMigration()
+bool MigrationImpl::alreadyMigrated()
{
- sal_Bool bRet = sal_False;
+ rtl::OUString aStr = m_aInfo.userdata + MIGRATION_STAMP_NAME;
+ File aFile(aStr);
+ // create migration stamp, and/or check its existence
+ bool bRet = aFile.open (osl_File_OpenFlag_Write | osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock) == FileBase::E_EXIST;
+ OSL_TRACE( "File '%s' exists? %d\n",
+ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr(),
+ bRet );
+ return bRet;
+}
+
+bool MigrationImpl::initializeMigration()
+{
+ bool bRet = false;
if (!checkMigrationCompleted()) {
readAvailableMigrations(m_vMigrationsAvailable);
sal_Int32 nIndex = findPreferedMigrationProcess(m_vMigrationsAvailable);
- if ( nIndex >= 0 )
+ // m_aInfo is now set to the preferred migration source
+ if ( nIndex >= 0 ) {
+ if (alreadyMigrated())
+ return false;
m_vrMigrations = readMigrationSteps(m_vMigrationsAvailable[nIndex].name);
+ }
bRet = m_aInfo.userdata.getLength() > 0;
}
@@ -358,7 +375,7 @@ void MigrationImpl::setMigrationCompleted()
}
}
-sal_Bool MigrationImpl::checkMigrationCompleted()
+bool MigrationImpl::checkMigrationCompleted()
{
sal_Bool bMigrationCompleted = sal_False;
try {
@@ -367,15 +384,17 @@ sal_Bool MigrationImpl::checkMigrationCompleted()
aPropertySet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("MigrationCompleted"))) >>= bMigrationCompleted;
- static const char* pEnv = getenv("SAL_DISABLE_USERMIGRATION" );
- if( !bMigrationCompleted && pEnv != NULL )
+ if( !bMigrationCompleted && getenv("SAL_DISABLE_USERMIGRATION" ) )
{
// migration prevented - fake it's success
setMigrationCompleted();
+ bMigrationCompleted = sal_True;
}
} catch (Exception&) {
// just return false...
}
+ OSL_TRACE( "Migration %s", bMigrationCompleted ? "already completed" : "not done" );
+
return bMigrationCompleted;
}
@@ -1210,7 +1229,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat
for (; i<nCount; ++i)
{
::rtl::OUString sCmd;
- uno::Sequence< beans::PropertyValue > aTempPropSeq;
+ uno::Sequence< beans::PropertyValue > aTempPropSeq;
xTemp->getByIndex(i) >>= aTempPropSeq;
for (sal_Int32 j=0; j<aTempPropSeq.getLength(); ++j)
{
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index 835194f32e..d66cabad94 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -207,6 +207,7 @@ private:
// functions to control the migration process
bool readAvailableMigrations(migrations_available&);
+ bool alreadyMigrated();
migrations_vr readMigrationSteps(const ::rtl::OUString& rMigrationName);
sal_Int32 findPreferedMigrationProcess(const migrations_available&);
install_info findInstallation(const strings_v& rVersions);
@@ -235,12 +236,12 @@ private:
void refresh();
void setMigrationCompleted();
- sal_Bool checkMigrationCompleted();
+ bool checkMigrationCompleted();
public:
MigrationImpl(const NS_UNO::Reference< NS_CSS::lang::XMultiServiceFactory >&);
~MigrationImpl();
- sal_Bool initializeMigration();
+ bool initializeMigration();
sal_Bool doMigration();
rtl::OUString getOldVersionName();
};
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 4aa17a73d3..f923348f62 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1518,7 +1518,7 @@ public:
Reference< io::XInputStream > getInputStreamForSection( sal_Int32 nSize );
void seek( sal_Int32 nPos );
- sal_Int32 getPosition( void )
+ sal_Int32 getPosition( void ) const
{ return m_nCurPos; }
sal_Int16 readInt16( void );
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
index 72ac94a9b3..a5831022d3 100644
--- a/sfx2/source/appl/makefile.mk
+++ b/sfx2/source/appl/makefile.mk
@@ -53,6 +53,10 @@ CFLAGS+=-DENABLE_QUICKSTART_APPLET
CDEFS+=-DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST)
.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
PKGCONFIG_MODULES=gtk+-2.0
+.IF "$(ENABLE_GIO)"!=""
+ PKGCONFIG_MODULES+=gio-2.0
+ CDEFS+=-DENABLE_GIO
+.ENDIF
.INCLUDE: pkg_config.mk
CFLAGS+=$(PKGCONFIG_CFLAGS)
CFLAGS+=-DENABLE_QUICKSTART_APPLET
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 4cd45e6153..85e366fab7 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -182,6 +182,9 @@ bool ShutdownIcon::LoadModule( osl::Module **pModule,
return true;
}
+// These two timeouts are necessary to avoid there being
+// plugin frames still on the stack, after unloading that
+// code, causing a crash during disabling / termination.
class IdleUnloader : Timer
{
::osl::Module *m_pModule;
@@ -199,6 +202,22 @@ public:
}
};
+class IdleTerminate : Timer
+{
+ Reference< XDesktop > m_xDesktop;
+public:
+ IdleTerminate (Reference< XDesktop > xDesktop)
+ {
+ m_xDesktop = xDesktop;
+ Start();
+ }
+ virtual void Timeout()
+ {
+ m_xDesktop->terminate();
+ delete this;
+ }
+};
+
void ShutdownIcon::initSystray()
{
if (m_bInitialized)
@@ -576,11 +595,8 @@ void ShutdownIcon::terminateDesktop()
if ( xSupplier.is() )
{
Reference< XIndexAccess > xTasks ( xSupplier->getFrames(), UNO_QUERY );
- if( xTasks.is() )
- {
- if( xTasks->getCount() < 1 )
- xDesktop->terminate();
- }
+ if( xTasks.is() && xTasks->getCount() < 1 )
+ new IdleTerminate( xDesktop );
}
// remove the instance pointer
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index e31c32f9d3..db0f232e19 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -19,6 +19,10 @@
#include "shutdownicon.hxx"
#endif
+#ifdef ENABLE_GIO
+#include <gio/gio.h>
+#endif
+
// Cut/paste from vcl/inc/svids.hrc
#define SV_ICON_SMALL_START 25000
@@ -39,6 +43,9 @@ static EggTrayIcon *pTrayIcon;
static GtkWidget *pExitMenuItem = NULL;
static GtkWidget *pOpenMenuItem = NULL;
static GtkWidget *pDisableMenuItem = NULL;
+#ifdef ENABLE_GIO
+GFileMonitor* pMonitor = NULL;
+#endif
static void open_url_cb( GtkWidget *, gpointer data )
{
@@ -358,6 +365,22 @@ extern "C" {
}
}
+#ifdef ENABLE_GIO
+/*
+ * See rhbz#610103. If the quickstarter is running, then LibreOffice is
+ * upgraded, then the old quickstarter is still running, but is now unreliable
+ * as the old install has been deleted. A fairly intractable problem but we
+ * can avoid much of the pain if we turn off the quickstarter if we detect
+ * that it has been physically deleted.
+*/
+static void notify_file_changed(GFileMonitor * /*gfilemonitor*/, GFile * /*arg1*/,
+ GFile * /*arg2*/, GFileMonitorEvent event_type, gpointer /*user_data*/)
+{
+ if (event_type == G_FILE_MONITOR_EVENT_DELETED)
+ exit_quickstarter_cb(GTK_WIDGET(pTrayIcon));
+}
+#endif
+
void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray()
{
::SolarMutexGuard aGuard;
@@ -403,6 +426,20 @@ void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray()
g_signal_connect(GTK_WIDGET(pTrayIcon), "destroy",
G_CALLBACK(exit_quickstarter_cb), NULL);
+
+#ifdef ENABLE_GIO
+ GFile* pFile = NULL;
+ rtl::OUString sLibraryFileUrl;
+ if (osl::Module::getUrlFromAddress(plugin_init_sys_tray, sLibraryFileUrl))
+ pFile = g_file_new_for_uri(rtl::OUStringToOString(sLibraryFileUrl, RTL_TEXTENCODING_UTF8).getStr());
+
+ if (pFile)
+ {
+ if ((pMonitor = g_file_monitor_file(pFile, G_FILE_MONITOR_NONE, NULL, NULL)))
+ g_signal_connect(pMonitor, "changed", (GCallback)notify_file_changed, NULL);
+ g_object_unref(pFile);
+ }
+#endif
}
void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
@@ -411,6 +448,17 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
if( !pTrayIcon )
return;
+#ifdef ENABLE_GIO
+ if (pMonitor)
+ {
+ g_signal_handlers_disconnect_by_func(pMonitor,
+ (void*)notify_file_changed, pMonitor);
+ g_file_monitor_cancel(pMonitor);
+ g_object_unref(pMonitor);
+ pMonitor = NULL;
+ }
+#endif
+
/* we have to set pTrayIcon to NULL now, because gtk_widget_destroy
* causes calling exit_quickstarter_cb (which then calls this func.)
* again -> crash.
@@ -419,7 +467,7 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
*/
GtkWidget* const pIcon = GTK_WIDGET( pTrayIcon );
pTrayIcon = NULL;
- gtk_widget_destroy( pIcon );
+ gtk_widget_destroy( pIcon );
pExitMenuItem = NULL;
pOpenMenuItem = NULL;
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index ea9f3c9905..ffcfe78a65 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -375,8 +375,8 @@ public:
void setHierarchyURL( const OUString& rURL ) { maHierarchyURL = rURL; }
void setTargetURL( const OUString& rURL ) { maTargetURL = rURL; }
- sal_Bool getInUse() { return mbInUse; }
- sal_Bool getInHierarchy() { return mbInHierarchy; }
+ sal_Bool getInUse() const { return mbInUse; }
+ sal_Bool getInHierarchy() const { return mbInHierarchy; }
const OUString& getHierarchyURL() const { return maHierarchyURL; }
const OUString& getTargetURL() const { return maTargetURL; }
const OUString& getTitle() const { return maTitle; }
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 5b0dc7c4a4..a2a7e07cac 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -272,7 +272,7 @@ public:
::comphelper::SequenceAsHashMap& GetMediaDescr() { return m_aMediaDescrHM; }
- sal_Bool IsRecommendReadOnly() { return m_bRecommendReadOnly; }
+ sal_Bool IsRecommendReadOnly() const { return m_bRecommendReadOnly; }
const ::comphelper::SequenceAsHashMap& GetDocProps();
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index 76d7d1e65f..c144dbbda5 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -396,8 +396,8 @@ namespace /* private */ {
uri_(uri)
{}
- bool operator() (const recently_used_item* item)
- { return (item->uri_ == uri_); }
+ bool operator() (const recently_used_item* item) const
+ { return (item->uri_ == uri_); }
private:
string_t uri_;
};
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 734b123583..6b746d8b09 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -146,7 +146,7 @@ void ImplEncirclementOverlay::SetSecondPosition(const basegfx::B2DPoint& rNewPos
SdrPaintWindow* SdrPaintView::FindPaintWindow(const OutputDevice& rOut) const
{
- for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); a++)
+ for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); ++a)
{
if(&((*a)->GetOutputDevice()) == &rOut)
{
@@ -188,7 +188,7 @@ SdrPaintWindow* SdrPaintView::RemovePaintWindow(SdrPaintWindow& rOld)
}
OutputDevice* SdrPaintView::GetFirstOutputDevice() const
-{
+{
if(PaintWindowCount())
{
return &(GetPaintWindow(0)->GetOutputDevice());
@@ -280,7 +280,7 @@ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut)
pMod=pModel1;
ImpClearVars();
- if(pOut)
+ if(pOut)
{
AddWindowToPaintView(pOut);
}
@@ -302,7 +302,7 @@ SdrPaintView::~SdrPaintView()
ClearPageView();
#ifdef DBG_UTIL
- if(pItemBrowser)
+ if(pItemBrowser)
{
delete pItemBrowser;
}
@@ -344,9 +344,9 @@ void __EXPORT SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
}
if (eKind==HINT_PAGEORDERCHG) {
const SdrPage* pPg=pSdrHint->GetPage();
-
- if(pPg && !pPg->IsInserted())
- {
+
+ if(pPg && !pPg->IsInserted())
+ {
if(mpPageView && mpPageView->GetPage() == pPg)
{
HideSdrPage();
@@ -399,7 +399,7 @@ void SdrPaintView::ModelHasChanged()
}
#ifdef DBG_UTIL
- if(pItemBrowser)
+ if(pItemBrowser)
{
pItemBrowser->SetDirty();
}
@@ -415,7 +415,7 @@ BOOL SdrPaintView::IsAction() const
void SdrPaintView::MovAction(const Point& rPnt)
{
- if (IsEncirclement())
+ if (IsEncirclement())
{
MovEncirclement(rPnt);
}
@@ -423,7 +423,7 @@ void SdrPaintView::MovAction(const Point& rPnt)
void SdrPaintView::EndAction()
{
- if(IsEncirclement())
+ if(IsEncirclement())
{
EndEncirclement();
}
@@ -441,7 +441,7 @@ void SdrPaintView::BrkAction()
void SdrPaintView::TakeActionRect(Rectangle& rRect) const
{
- if(IsEncirclement())
+ if(IsEncirclement())
{
rRect = Rectangle(aDragStat.GetStart(),aDragStat.GetNow());
}
@@ -465,7 +465,7 @@ SdrPageView* SdrPaintView::GetTextEditPageView() const
USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const
{
if (nMinMov>=0) return USHORT(nMinMov);
- if (pOut==NULL)
+ if (pOut==NULL)
{
pOut = GetFirstOutputDevice();
}
@@ -479,7 +479,7 @@ USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut)
USHORT SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const
{
if (nHitTol>=0) return USHORT(nHitTol);
- if (pOut==NULL)
+ if (pOut==NULL)
{
pOut = GetFirstOutputDevice();
}
@@ -521,7 +521,7 @@ void SdrPaintView::BegEncirclement(const Point& rPnt)
void SdrPaintView::MovEncirclement(const Point& rPnt)
{
- if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt))
+ if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt))
{
aDragStat.NextMove(rPnt);
@@ -537,10 +537,10 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify)
if(IsEncirclement())
{
- if(aDragStat.IsMinMoved())
+ if(aDragStat.IsMinMoved())
{
aRetval = Rectangle(aDragStat.GetStart(), aDragStat.GetNow());
-
+
if(!bNoJustify)
{
aRetval.Justify();
@@ -556,7 +556,7 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify)
void SdrPaintView::BrkEncirclement()
{
- if(IsEncirclement())
+ if(IsEncirclement())
{
DBG_ASSERT(mpEncirclementOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
delete mpEncirclementOverlay;
@@ -617,7 +617,7 @@ void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin)
}
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL)
+ if (pItemBrowser!=NULL)
pItemBrowser->ForceParent();
#endif
}
@@ -639,7 +639,7 @@ void SdrPaintView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
}
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL)
+ if (pItemBrowser!=NULL)
pItemBrowser->ForceParent();
#endif
}
@@ -688,7 +688,7 @@ bool SdrPaintView::IsLayerLocked(const XubString& rName) const
{
return mpPageView->IsLayerLocked(rName);
}
-
+
return false;
}
@@ -759,11 +759,11 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c
#endif // SVX_REPAINT_TIMER_TEST
// #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
- // rReg may be made more granular (fine) with using it. Normally, rReg
- // does come from Window::Paint() anyways and thus is based on a single
+ // rReg may be made more granular (fine) with using it. Normally, rReg
+ // does come from Window::Paint() anyways and thus is based on a single
// rectangle which was derived from exactly that repaint region
Region aOptimizedRepaintRegion(rReg);
-
+
if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType())
{
Window* pWindow = (Window*)pOut;
@@ -781,7 +781,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c
{
RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects());
Rectangle aRegionRectangle;
-
+
while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
{
pWindow->SetLineColor(COL_LIGHTGREEN);
@@ -957,11 +957,11 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region&
if(pKnownTarget)
{
// #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
- // rReg may be made more granular (fine) with using it. Normally, rReg
- // does come from Window::Paint() anyways and thus is based on a single
+ // rReg may be made more granular (fine) with using it. Normally, rReg
+ // does come from Window::Paint() anyways and thus is based on a single
// rectangle which was derived from exactly that repaint region
Region aOptimizedRepaintRegion(rReg);
-
+
// #i76114# Intersecting the region with the Window's paint region is disabled
// for print preview in Calc, because the intersection can be empty (if the paint
// region is outside of the table area of the page), and then no clip region
@@ -983,7 +983,7 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region&
{
RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects());
Rectangle aRegionRectangle;
-
+
while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
{
pWindow->SetLineColor(COL_LIGHTGREEN);
@@ -1076,7 +1076,7 @@ void SdrPaintView::GlueInvalidate() const
{
SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum);
- if(pPaintWindow->OutputToWindow())
+ if(pPaintWindow->OutputToWindow())
{
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
@@ -1104,7 +1104,7 @@ void SdrPaintView::InvalidateAllWin()
{
SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
- if(pPaintWindow->OutputToWindow())
+ if(pPaintWindow->OutputToWindow())
{
InvalidateOneWin((Window&)pPaintWindow->GetOutputDevice());
}
@@ -1119,12 +1119,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix)
{
SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
- if(pPaintWindow->OutputToWindow())
+ if(pPaintWindow->OutputToWindow())
{
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
Rectangle aRect(rRect);
- if(bPlus1Pix)
+ if(bPlus1Pix)
{
Size aPixSiz(1,1);
Size aSiz(rOutDev.PixelToLogic(aPixSiz));
@@ -1133,12 +1133,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix)
aRect.Right ()+=aSiz.Width();
aRect.Bottom()+=aSiz.Height();
}
-
+
Point aOrg(rOutDev.GetMapMode().GetOrigin());
aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y();
Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
-
- if (aRect.IsOver(aOutRect))
+
+ if (aRect.IsOver(aOutRect))
{
InvalidateOneWin((Window&)rOutDev, aRect);
}
@@ -1381,16 +1381,16 @@ void SdrPaintView::DoConnect(SdrOle2Obj* /*pOleObj*/)
{
}
-void SdrPaintView::SetAnimationEnabled( BOOL bEnable )
-{
- SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE );
+void SdrPaintView::SetAnimationEnabled( BOOL bEnable )
+{
+ SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE );
}
-void SdrPaintView::SetAnimationPause( bool bSet )
-{
+void SdrPaintView::SetAnimationPause( bool bSet )
+{
if((bool)bAnimationPause != bSet)
{
- bAnimationPause = bSet;
+ bAnimationPause = bSet;
if(mpPageView)
{
@@ -1409,9 +1409,9 @@ void SdrPaintView::SetAnimationPause( bool bSet )
}
}
-void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode )
-{
- eAnimationMode = eMode;
+void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode )
+{
+ eAnimationMode = eMode;
}
void SdrPaintView::VisAreaChanged(const OutputDevice* pOut)
@@ -1482,8 +1482,8 @@ void SdrPaintView::SetApplicationDocumentColor(Color aDocumentColor)
}
// #114898#
-bool SdrPaintView::IsBufferedOutputAllowed() const
-{
+bool SdrPaintView::IsBufferedOutputAllowed() const
+{
return (mbBufferedOutputAllowed && maDrawinglayerOpt.IsPaintBuffer());
}
@@ -1496,8 +1496,8 @@ void SdrPaintView::SetBufferedOutputAllowed(bool bNew)
}
}
-bool SdrPaintView::IsBufferedOverlayAllowed() const
-{
+bool SdrPaintView::IsBufferedOverlayAllowed() const
+{
return (mbBufferedOverlayAllowed && maDrawinglayerOpt.IsOverlayBuffer());
}
@@ -1509,9 +1509,9 @@ void SdrPaintView::SetBufferedOverlayAllowed(bool bNew)
}
}
-sal_Bool SdrPaintView::IsPagePaintingAllowed() const
-{
- return mbPagePaintingAllowed;
+sal_Bool SdrPaintView::IsPagePaintingAllowed() const
+{
+ return mbPagePaintingAllowed;
}
void SdrPaintView::SetPagePaintingAllowed(bool bNew)
diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx
index a3487619a1..0b499c98bf 100644
--- a/ucb/source/ucp/file/filtask.hxx
+++ b/ucb/source/ucp/file/filtask.hxx
@@ -93,7 +93,7 @@ namespace fileaccess
m_bHandled = true;
}
- bool isHandled()
+ bool isHandled() const
{
return true;
}
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 134adbdeea..0018ad5565 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -99,12 +99,12 @@ namespace chelp {
~StaticModuleInformation() { }
- rtl::OUString get_title() { return m_aTitle; }
- rtl::OUString get_id() { return m_aStartId; }
- rtl::OUString get_program() { return m_aProgramSwitch; }
- rtl::OUString get_heading() { return m_aHeading; }
- rtl::OUString get_fulltext() { return m_aFulltext; }
- int get_order() { return m_nOrder; }
+ rtl::OUString get_title() const { return m_aTitle; }
+ rtl::OUString get_id() const { return m_aStartId; }
+ rtl::OUString get_program() const { return m_aProgramSwitch; }
+ rtl::OUString get_heading() const { return m_aHeading; }
+ rtl::OUString get_fulltext() const { return m_aFulltext; }
+ int get_order() const { return m_nOrder; }
}; // end class StaticModuleInformation
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 590042d680..a91de9760f 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -526,11 +526,11 @@ public:
Reference< XInterface > getParagraphTarget( const ParagraphTarget* pTarget ) const;
- void convertPath( OUStringBuffer& sTmp, const Any& rPath );
- void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue );
- void convertTiming( OUStringBuffer& sTmp, const Any& rTiming );
- void convertSource( OUStringBuffer& sTmp, const Any& rSource );
- void convertTarget( OUStringBuffer& sTmp, const Any& rTarget );
+ void convertPath( OUStringBuffer& sTmp, const Any& rPath ) const;
+ void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const;
+ void convertTiming( OUStringBuffer& sTmp, const Any& rTiming ) const;
+ void convertSource( OUStringBuffer& sTmp, const Any& rSource ) const;
+ void convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const;
void prepareValue( const Any& rValue );
@@ -1437,7 +1437,7 @@ Reference< XInterface > AnimationsExporterImpl::getParagraphTarget( const Paragr
return xRef;
}
-void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath )
+void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath ) const
{
OUString aStr;
rPath >>= aStr;
@@ -1445,7 +1445,7 @@ void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath
sTmp = aStr;
}
-void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue )
+void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const
{
if( !rValue.hasValue() )
return;
@@ -1581,7 +1581,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString
*/
}
-void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rValue )
+void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rValue ) const
{
if( !rValue.hasValue() )
return;
@@ -1648,12 +1648,12 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
}
}
-void AnimationsExporterImpl::convertSource( OUStringBuffer& sTmp, const Any& rSource )
+void AnimationsExporterImpl::convertSource( OUStringBuffer& sTmp, const Any& rSource ) const
{
convertTarget( sTmp, rSource );
}
-void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget )
+void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const
{
if( !rTarget.hasValue() )
return;