[Libreoffice-commits] .: desktop/source

2012-04-23 Thread Stephan Bergmann
 desktop/source/deployment/registry/dp_backend.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 6a80adb094d87cddc103d84d5616e1ecae899889
Author: Stephan Bergmann 
Date:   Mon Apr 23 16:22:53 2012 +0200

Unused sDataFolderURL

diff --git a/desktop/source/deployment/registry/dp_backend.cxx 
b/desktop/source/deployment/registry/dp_backend.cxx
index fef95a8..7b654d3 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -233,7 +233,6 @@ OUString PackageRegistryBackend::createFolder(
 ucbhelper::Content dataContent;
 ::dp_misc::create_folder(&dataContent, sDataFolder, xCmdEnv);
 
-const OUString sDataFolderURL = dp_misc::expandUnoRcUrl(sDataFolder);
 const String baseDir(sDataFolder);
 const ::utl::TempFile aTemp(&baseDir, sal_True);
 const OUString url = aTemp.GetURL();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-04-18 Thread Stephan Bergmann
 desktop/source/deployment/registry/component/dp_component.cxx |  137 +-
 1 file changed, 73 insertions(+), 64 deletions(-)

New commits:
commit fcc9611770e55b0c6ff0f23d2345f3e4f0ef7838
Author: Stephan Bergmann 
Date:   Wed Apr 18 14:58:51 2012 +0200

Do all of componentLiveInsertion/Removal at the root context

diff --git a/desktop/source/deployment/registry/component/dp_component.cxx 
b/desktop/source/deployment/registry/component/dp_component.cxx
index 7a97fbb..8bfcbd5 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -354,6 +354,8 @@ class BackendImpl : public 
::dp_registry::backend::PackageRegistryBackend
 
 void componentLiveRemoval(ComponentBackendDb::Data const & data);
 
+css::uno::Reference< css::uno::XComponentContext > getRootContext() const;
+
 public:
 BackendImpl( Sequence const & args,
  Reference const & xComponentContext );
@@ -1252,8 +1254,10 @@ void BackendImpl::componentLiveInsertion(
 std::vector< css::uno::Reference< css::uno::XInterface > > const &
 factories)
 {
+css::uno::Reference< css::uno::XComponentContext > rootContext(
+getRootContext());
 css::uno::Reference< css::container::XSet > set(
-getComponentContext()->getServiceManager(), css::uno::UNO_QUERY_THROW);
+rootContext->getServiceManager(), css::uno::UNO_QUERY_THROW);
 std::vector< css::uno::Reference< css::uno::XInterface > >::const_iterator
 factory(factories.begin());
 for (t_stringlist::const_iterator i(data.implementationNames.begin());
@@ -1268,54 +1272,49 @@ void BackendImpl::componentLiveInsertion(
 }
 }
 if (!data.singletons.empty()) {
-css::uno::Reference< css::container::XNameContainer >
-rootContext(
-getComponentContext()->getValueByName(
-rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_root"))),
-css::uno::UNO_QUERY);
-if (rootContext.is()) {
-for (t_stringpairvec::const_iterator i(data.singletons.begin());
- i != data.singletons.end(); ++i)
-{
-rtl::OUString name(
-rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/")) 
+
-i->first);
-try {
-rootContext->removeByName(
-name +
-rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("/arguments")));
-} catch (const container::NoSuchElementException &) {}
-try {
-rootContext->insertByName(
-(name +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("/service"))),
-css::uno::Any(i->second));
-} catch (const container::ElementExistException &) {
-rootContext->replaceByName(
-(name +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("/service"))),
-css::uno::Any(i->second));
-}
-try {
-rootContext->insertByName(name, css::uno::Any());
-} catch (const container::ElementExistException &) {
-OSL_TRACE(
-"singleton %s already registered",
-rtl::OUStringToOString(
-i->first, RTL_TEXTENCODING_UTF8).getStr());
-rootContext->replaceByName(name, css::uno::Any());
-}
+css::uno::Reference< css::container::XNameContainer > cont(
+rootContext, css::uno::UNO_QUERY_THROW);
+for (t_stringpairvec::const_iterator i(data.singletons.begin());
+ i != data.singletons.end(); ++i)
+{
+rtl::OUString name(
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/")) +
+i->first);
+//TODO: Update should be atomic:
+try {
+cont->removeByName(
+name +
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/arguments")));
+} catch (const container::NoSuchElementException &) {}
+try {
+cont->insertByName(
+(name +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/service"))),
+css::uno::Any(i->second));
+} catch (const container::ElementExistException &) {
+cont->replaceByName(
+(name +
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/service"))),
+css::uno::Any(i->second));
+}
+try {
+cont->insertByName(name, css::uno::Any());
+} catch (const container::E

[Libreoffice-commits] .: desktop/source

2012-04-18 Thread Stephan Bergmann
 desktop/source/deployment/registry/component/dp_component.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c2c2a056aa49f49236c3260aeda88a6da747240a
Author: Stephan Bergmann 
Date:   Wed Apr 18 14:53:03 2012 +0200

Improved debug output

diff --git a/desktop/source/deployment/registry/component/dp_component.cxx 
b/desktop/source/deployment/registry/component/dp_component.cxx
index 1d4b86a..7a97fbb 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1408,7 +1408,7 @@ Reference raise_uno_process(
 // jar typelibs
 
 ::std::vector args;
-#if OSL_DEBUG_LEVEL <= 1
+#if OSL_DEBUG_LEVEL == 0
 args.push_back( OUSTR("--quiet") );
 #endif
 args.push_back( OUSTR("--singleaccept") );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-04-18 Thread Stephan Bergmann
 desktop/source/deployment/registry/component/dp_compbackenddb.hxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 5553dfe2060cb4a02a827c9774a60e4408d20c33
Author: Stephan Bergmann 
Date:   Wed Apr 18 14:45:13 2012 +0200

Improved comment

diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.hxx 
b/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
index 2e0e39e..610e952 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
@@ -94,9 +94,8 @@ public:
 Data(): javaTypeLibrary(false) {};
 
 ::std::list< ::rtl::OUString> implementationNames;
-/* every singleton has a key and a value
- */
 ::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString> 
>singletons;
+// map from singleton names to implementation names
 bool javaTypeLibrary;
 };
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source framework/source jvmfwk/source package/source

2012-04-05 Thread Julien Nabet
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx  |2 +-
 desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx |2 +-
 desktop/source/deployment/manager/dp_extensionmanager.cxx|2 +-
 desktop/source/deployment/manager/dp_properties.cxx  |2 +-
 desktop/source/deployment/registry/dp_backenddb.cxx  |2 +-
 desktop/source/deployment/registry/package/dp_package.cxx|4 ++--
 framework/source/uielement/toolbarsmenucontroller.cxx|2 +-
 jvmfwk/source/elements.cxx   |2 +-
 package/source/xstor/ohierarchyholder.cxx|2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 7d2508572a0389bcb1c803911024296f411af653
Author: Julien Nabet 
Date:   Thu Apr 5 21:15:13 2012 +0200

Fix Prefer prefix ++/-- operators

Includes too replacement < by != for comparison between current and end 
iterators

diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 96c5b1c..03bf3cb 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -337,7 +337,7 @@ void ExtensionBox_Impl::select( const rtl::OUString & sName 
)
 const ::osl::MutexGuard aGuard( m_entriesMutex );
 typedef ::std::vector< TEntry_Impl >::const_iterator It;
 
-for ( It iIter = m_vEntries.begin(); iIter < m_vEntries.end(); iIter++ )
+for ( It iIter = m_vEntries.begin(); iIter != m_vEntries.end(); ++iIter )
 {
 if ( sName.equals( (*iIter)->m_sTitle ) )
 {
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx 
b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 8852e93..8023678 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -424,7 +424,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
 //Construct a string of all messages contained in the 
exceptions plus the respective download URLs
 ::rtl::OUStringBuffer buf(256);
 typedef ::std::vector< ::std::pair >::const_iterator CIT;
-for (CIT j = vecExceptions.begin(); j != 
vecExceptions.end(); j++)
+for (CIT j = vecExceptions.begin(); j != 
vecExceptions.end(); ++j)
 {
 if (j != vecExceptions.begin())
 buf.appendAscii("\n");
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx 
b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index d7654b6..b5822ec 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -1181,7 +1181,7 @@ uno::Sequence< uno::Sequence 
> >
   citVecVec = vecExtensions.begin();
 sal_Int32 j = 0;
 uno::Sequence< uno::Sequence > > 
seqSeq(vecExtensions.size());
-for (;citVecVec != vecExtensions.end(); citVecVec++, j++)
+for (;citVecVec != vecExtensions.end(); ++citVecVec, j++)
 {
 seqSeq[j] = comphelper::containerToSequence(*citVecVec);
 }
diff --git a/desktop/source/deployment/manager/dp_properties.cxx 
b/desktop/source/deployment/manager/dp_properties.cxx
index ec8120f..160e8a5 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.cxx
@@ -69,7 +69,7 @@ ExtensionProperties::ExtensionProperties(
 dp_misc::readProperties(props, contentProps);
 
 typedef ::std::list< ::std::pair< OUString, OUString> >::const_iterator CI;
-for (CI i = props.begin(); i != props.end(); i++)
+for (CI i = props.begin(); i != props.end(); ++i)
 {
 if (i->first.equals(OUSTR(PROP_SUPPRESS_LICENSE)))
 m_prop_suppress_license = i->second;
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx 
b/desktop/source/deployment/registry/dp_backenddb.cxx
index a219f13..1d06860 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -311,7 +311,7 @@ void BackendDb::writeVectorOfPair(
 Reference(
 vectorNode, css::uno::UNO_QUERY_THROW));
 typedef ::std::vector< ::std::pair< OUString, OUString > 
>::const_iterator CIT;
-for (CIT i = vecPairs.begin(); i != vecPairs.end(); i++)
+for (CIT i = vecPairs.begin(); i != vecPairs.end(); ++i)
 {
 const Reference pairNode(
 doc->createElementNS(sNameSpace, sPrefix + sPairTagName));
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx 
b/desktop/source/deployment/registry/package/dp_package.cxx
index 997fef4..23f583e 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/dep

[Libreoffice-commits] .: desktop/source

2012-04-02 Thread David Tardon
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit c4c6b52a214b474353013f9b1b03d56a5d9a0380
Author: David Tardon 
Date:   Mon Apr 2 12:46:43 2012 +0200

fdo#47963 do not increase height of checkboxes

Especially as it is obvious the grow is unbounded .-)

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 5e94e31..0450159 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1247,19 +1247,16 @@ void ExtMgrDialog::Resize()
 long nWidth = m_aBundledCbx.GetCtrlTextWidth( m_aBundledCbx.GetText() );
 Size aBCBSize(m_aBundledCbx.GetSizePixel());
 aBCBSize.Width() = nWidth + 30;
-aBCBSize.Height() += 3;
 m_aBundledCbx.SetSizePixel( aBCBSize );
 
 nWidth = m_aSharedCbx.GetCtrlTextWidth( m_aSharedCbx.GetText() );
 Size aSCBSize(m_aSharedCbx.GetSizePixel());
 aSCBSize.Width() = nWidth + 30;
-aSCBSize.Height() += 3;
 m_aSharedCbx.SetSizePixel( aSCBSize );
 
 nWidth = m_aUserCbx.GetCtrlTextWidth( m_aUserCbx.GetText() );
 Size aUCBSize(m_aUserCbx.GetSizePixel());
 aUCBSize.Width() = nWidth + 30;
-aUCBSize.Height() += 3;
 m_aUserCbx.SetSizePixel( aUCBSize );
 
 offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*RSC_SP_CTRL_GROUP_X - aBCBSize.Width() - 
aSCBSize.Width() - aUCBSize.Width() );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source editeng/inc editeng/source

2012-03-30 Thread Takeshi Abe
 desktop/source/app/appinit.cxx   |1 -
 desktop/source/app/officeipcthread.cxx   |1 -
 desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx |3 ---
 desktop/source/deployment/manager/dp_manager.cxx |1 -
 editeng/inc/editeng/unotext.hxx  |3 ---
 editeng/source/editeng/editdoc.cxx   |1 -
 editeng/source/editeng/editview.cxx  |3 ---
 editeng/source/editeng/eerdll.cxx|2 --
 editeng/source/editeng/impedit3.cxx  |2 --
 editeng/source/items/optitems.cxx|2 --
 editeng/source/items/textitem.cxx|4 
 editeng/source/misc/svxacorr.cxx |1 -
 editeng/source/misc/unolingu.cxx |2 --
 editeng/source/outliner/outlvw.cxx   |1 -
 editeng/source/uno/unonrule.cxx  |1 -
 editeng/source/uno/unotext.cxx   |1 -
 16 files changed, 29 deletions(-)

New commits:
commit e60911f5fc6f76032942cd16c24a8f2673dae5d2
Author: Takeshi Abe 
Date:   Fri Mar 30 21:44:37 2012 +0900

removed duplicate includes in desktop / editeng

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index fe8618a..92da668 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -56,7 +56,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 #include 
diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 4306a67..8ca6083 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -49,7 +49,6 @@
 #include 
 #include 
 #include 
-#include 
 #include "tools/getprocessworkingdir.hxx"
 
 using namespace desktop;
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx 
b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index fd6154e..8852e93 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -40,7 +40,6 @@
 #include "vcl/msgbox.hxx"
 #include "vcl/svapp.hxx"
 #include "osl/mutex.hxx"
-#include "vcl/dialog.hxx"
 #include "cppuhelper/implbase3.hxx"
 
 #include "com/sun/star/beans/PropertyValue.hpp"
@@ -69,14 +68,12 @@
 #include "dp_gui.hrc"
 #include "dp_gui_updateinstalldialog.hxx"
 #include "dp_gui_shared.hxx"
-#include "dp_gui_updatedata.hxx"
 #include "dp_ucb.h"
 #include "dp_misc.h"
 #include "dp_version.hxx"
 #include "dp_gui_extensioncmdqueue.hxx"
 #include "ucbhelper/content.hxx"
 #include "osl/mutex.hxx"
-#include "osl/mutex.hxx"
 #include "rtl/ref.hxx"
 #include "salhelper/thread.hxx"
 #include "com/sun/star/uno/Sequence.h"
diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 0ed519b..1a221c9 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -64,7 +64,6 @@
 #include "boost/bind.hpp"
 #include "unotools/tempfile.hxx"
 
-#include "osl/file.hxx"
 #include 
 #include 
 #include "dp_descriptioninfoset.hxx"
diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx
index ace08dd..162a73a 100644
--- a/editeng/inc/editeng/unotext.hxx
+++ b/editeng/inc/editeng/unotext.hxx
@@ -54,7 +54,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -492,8 +491,6 @@ public:
 
 // 
 
-#include 
-
 class SvxUnoTextContentEnumeration : public ::cppu::WeakAggImplHelper1< 
::com::sun::star::container::XEnumeration >
 {
 private:
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 43c64c4..6b35b47 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -61,7 +61,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 36bafa0..c35591c 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -68,10 +68,7 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
-#include 
 
 #include 
 
diff --git a/editeng/source/editeng/eerdll.cxx 
b/editeng/source/editeng/eerdll.cxx
index 04ff49f..1e0f3e4 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -47,7 +47,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -73,7 +72,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 using namespace ::com::sun::star;
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 88a2e73..f377bba 100644
--- a/editeng/source/e

[Libreoffice-commits] .: desktop/source

2012-03-29 Thread Lubos Lunak
 desktop/source/deployment/dp_persmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1c811f79e1f45809c0b90037c11045075e05c3ca
Author: Luboš Luňák 
Date:   Thu Mar 29 13:40:47 2012 +0200

fix build

diff --git a/desktop/source/deployment/dp_persmap.cxx 
b/desktop/source/deployment/dp_persmap.cxx
index 9b794ad..6c7cd94 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -61,7 +61,7 @@ void PersistentMap::throw_rtexc( int err, char const * pmsg ) 
const
 const OUString msg_(buf.makeStringAndClear());
 OSL_FAIL( rtl::OUStringToOString(
 msg_, RTL_TEXTENCODING_UTF8 ).getStr() );
-throw RuntimeException( msg_, Reference() );
+throw RuntimeException( msg_, uno::Reference() );
 }
 
 
//__
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-29 Thread Michael Meeks
 desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx  |5 -
 desktop/source/deployment/inc/dp_ucb.h|   25 
++-
 desktop/source/deployment/manager/dp_manager.cxx  |   32 
+++---
 desktop/source/deployment/misc/dp_ucb.cxx |7 --
 desktop/source/deployment/registry/component/dp_component.cxx |6 -
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |6 -
 desktop/source/deployment/registry/dp_backend.cxx |6 -
 desktop/source/deployment/registry/dp_registry.cxx|3 
 desktop/source/deployment/registry/executable/dp_executable.cxx   |3 
 desktop/source/deployment/registry/help/dp_help.cxx   |3 
 desktop/source/deployment/registry/package/dp_package.cxx |   13 
+---
 11 files changed, 52 insertions(+), 57 deletions(-)

New commits:
commit 9404908713453ed1604d66b974536523a253b72f
Author: Michael Meeks 
Date:   Thu Mar 29 12:02:59 2012 +0100

desktop: unwind hideous StrTitle mess a little

diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx 
b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 6c09084..fd6154e 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -90,9 +90,9 @@ class Window;
 namespace cssu = ::com::sun::star::uno;
 namespace css = ::com::sun::star;
 
+using dp_misc::StrTitle;
 using ::rtl::OUString;
 
-
 namespace dp_gui {
 
 class UpdateInstallDialog::Thread: public salhelper::Thread {
@@ -619,8 +619,7 @@ void UpdateInstallDialog::Thread::download(OUString const & 
sDownloadURL, Update
 ::ucbhelper::Content sourceContent;
 dp_misc::create_ucb_content( &sourceContent, sDownloadURL, 
m_updateCmdEnv.get() );
 
-const OUString sTitle(sourceContent.getPropertyValue(
-  dp_misc::StrTitle::get() ).get() );
+const OUString sTitle( StrTitle::getTitle( sourceContent ) );
 
 if (destFolderContent.transferContent(
 sourceContent, ::ucbhelper::InsertOperation_COPY,
diff --git a/desktop/source/deployment/inc/dp_ucb.h 
b/desktop/source/deployment/inc/dp_ucb.h
index 52ac313..befd539 100644
--- a/desktop/source/deployment/inc/dp_ucb.h
+++ b/desktop/source/deployment/inc/dp_ucb.h
@@ -32,8 +32,10 @@
 #include 
 #include "rtl/byteseq.hxx"
 #include "rtl/instance.hxx"
+#include "com/sun/star/sdbc/XResultSet.hpp"
 #include "com/sun/star/ucb/XCommandEnvironment.hpp"
 #include "dp_misc_api.hxx"
+#include "ucbhelper/content.hxx"
 
 namespace ucbhelper
 {
@@ -44,10 +46,27 @@ namespace css = ::com::sun::star;
 
 namespace dp_misc {
 
-struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle :
-public rtl::StaticWithInit
+struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle
 {
-const rtl::OUString operator () ();
+static css::uno::Sequence< rtl::OUString > getTitleSequence()
+{
+css::uno::Sequence< rtl::OUString > aSeq( 1 );
+aSeq[ 0 ] = "Title";
+return aSeq;
+}
+static rtl::OUString getTitle( ::ucbhelper::Content &rContent )
+{
+return rtl::OUString( rContent.getPropertyValue(
+rtl::OUString::createFromAscii( "Title" ) 
).get() );
+}
+// just return titles - the ucbhelper should have a simpler API for this 
[!]
+static css::uno::Reference< css::sdbc::XResultSet >
+createCursor( ::ucbhelper::Content &rContent,
+  ucbhelper::ResultSetInclude eInclude )
+{
+return css::uno::Reference< css::sdbc::XResultSet >(
+rContent.createCursor( StrTitle::getTitleSequence(), eInclude 
) );
+}
 };
 
 
//==
diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 80a9522..0ed519b 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -104,12 +104,9 @@ namespace {
 OUString getExtensionFolder(OUString const &  parentFolder,
 Reference const & 
xCmdEnv)
 {
-::ucbhelper::Content tempFolder(
-parentFolder, xCmdEnv );
+::ucbhelper::Content tempFolder( parentFolder, xCmdEnv );
 Reference xResultSet(
-tempFolder.createCursor(
-Sequence( &StrTitle::get(), 1 ),
-::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
+StrTitle::createCursor (tempFolder, 
::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
 
 OUString title;
 while (xResultSet->next())
@@ -136,9 +133,8 @@ void PackageManagerImpl::initActivationLayer(
 {
 // scan for all entries in m_packagesDir:
 Reference xResultSet(
-ucbContent.createCursor(
-Sequence( &StrTitle::get(), 1 ),
-:

[Libreoffice-commits] .: desktop/source

2012-03-27 Thread Caolán McNamara
 desktop/source/app/cmdlineargs.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 867588b4caf35d4954c7b26b7ac070a7a4675cd3
Author: Caolán McNamara 
Date:   Tue Mar 27 15:21:57 2012 +0100

Resolves: rhbz#807316 don't complain that nocrashreport is an unknown option

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 0bc6312..037c716 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -311,7 +311,9 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 // primitive tools that /bin/sh offers, ignore them here
 if 
(!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("backtrace")) &&
 
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("strace")) &&
-
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("valgrind")))
+
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("valgrind")) &&
+//ignore additional legacy options that don't do anything 
anymore
+
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("nocrashreport")))
 {
 fprintf(stderr, "Unknown option %s\n",
 rtl::OUStringToOString(aArg, 
osl_getThreadTextEncoding()).getStr());
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-19 Thread Stephan Bergmann
 desktop/source/splash/services_spl.cxx |   92 -
 desktop/source/splash/splash.cxx   |  114 +--
 desktop/source/splash/splash.hxx   |  118 ++---
 3 files changed, 129 insertions(+), 195 deletions(-)

New commits:
commit 5bda84a2d7d135ed099fc87c10bf9d3a2758b44f
Author: Stephan Bergmann 
Date:   Mon Mar 19 19:36:44 2012 +0100

Fixed spl_component_getFactory

The old code relied on the order of initializing global static variables 
across
compilation units, which failed for MinGW cross compilation.  Cleaned up.

diff --git a/desktop/source/splash/services_spl.cxx 
b/desktop/source/splash/services_spl.cxx
index 0dc412c..5cc0bcf 100644
--- a/desktop/source/splash/services_spl.cxx
+++ b/desktop/source/splash/services_spl.cxx
@@ -26,92 +26,32 @@
  *
  /
 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include "sal/config.h"
 
-#include "splash.hxx"
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::registry;
-using namespace ::desktop;
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "sal/types.h"
 
-using ::rtl::OUString;
-
-static const char* pServices[] =
-{
-SplashScreen::serviceName,
-NULL
-};
-
-static const char* pImplementations[] =
-{
-SplashScreen::implementationName,
-NULL
-};
+#include "splash.hxx"
 
-typedef Reference(* fProvider)(const 
Reference&);
+namespace {
 
-static const fProvider pInstanceProviders[] =
-{
-SplashScreen::getInstance,
-NULL
-};
+namespace css = com::sun::star;
 
-static const char** pSupportedServices[] =
-{
-SplashScreen::interfaces,
-NULL
+static cppu::ImplementationEntry const services[] = {
+{ &desktop::splash::create, &desktop::splash::getImplementationName,
+  &desktop::splash::getSupportedServiceNames,
+  &cppu::createSingleComponentFactory, 0, 0 },
+{ 0, 0, 0, 0, 0, 0 }
 };
 
-static Sequence
-getSupportedServiceNames(int p) {
-const char **names = pSupportedServices[p];
-Sequence aSeq;
-for(int i = 0; names[i] != NULL; i++) {
-aSeq.realloc(i+1);
-aSeq[i] = OUString::createFromAscii(names[i]);
-}
-return aSeq;
 }
 
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL spl_component_getFactory(
-const sal_Char* pImplementationName,
-void* pServiceManager,
-void*)
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL spl_component_getFactory(
+char const * pImplName, void * pServiceManager, void * pRegistryKey)
 {
-// Set default return value for this operation - if it failed.
-if  ( pImplementationName && pServiceManager )
-{
-Reference< XSingleServiceFactory > xFactory;
-Reference< XMultiServiceFactory > xServiceManager(
-reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
-
-// search implementation
-for (int i = 0; (pImplementations[i]!=NULL); i++) {
-if ( strcmp(pImplementations[i], pImplementationName ) == 0 ) {
-// found implementation
-xFactory = 
Reference(cppu::createSingleFactory(
-xServiceManager, 
OUString::createFromAscii(pImplementationName),
-pInstanceProviders[i], getSupportedServiceNames(i)));
-if ( xFactory.is() ) {
-// Factory is valid - service was found.
-xFactory->acquire();
-return xFactory.get();
-}
-}
-} // for()
-}
-// Return with result of this operation.
-return NULL;
+return cppu::component_getFactoryHelper(
+pImplName, pServiceManager, pRegistryKey, services);
 }
-} // extern "C"
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 8773f1a..eaa6d07 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -35,24 +35,99 @@
 #include 
 #include 
 
+#include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #define NOT_LOADED  ((long)-1)
 
 using namespace ::rtl;
+using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::registry;
+using namespace ::com::sun::star::task;
+using namespace ::com::sun::star::uno;
 
-namespace desktop
+namespace {
+
+namespace css = com::sun::star;
+
+class  SplashScreen
+: public ::cppu::WeakImplHelper2< XStatusIndicator, XInitialization >
+, public IntroWindow
 {
+private:
+struct FullScreenProgressRatioValue
+{
+double _fXRelPos;
+double _fYRelPos;
+double _fRelWidth;
+double _fRelHeight;
+};
+enum BitmapMode { BM_FULLSCR

[Libreoffice-commits] .: desktop/source

2012-03-19 Thread Jan Holesovsky
 desktop/source/app/langselect.cxx |6 ++
 desktop/source/app/langselect.hxx |1 -
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 43061897a69fbfc765170e87588f843fbd540e52
Author: Jan Holesovsky 
Date:   Mon Mar 19 14:34:35 2012 +0100

Workaround a strange wine / mingw crash.

diff --git a/desktop/source/app/langselect.cxx 
b/desktop/source/app/langselect.cxx
index 7dbc4f2..387dca0 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -72,8 +72,6 @@ sal_Bool LanguageSelection::bFoundLanguage = sal_False;
 OUString LanguageSelection::aFoundLanguage;
 LanguageSelection::LanguageSelectionStatus LanguageSelection::m_eStatus = 
LS_STATUS_OK;
 
-const OUString 
LanguageSelection::usFallbackLanguage(RTL_CONSTASCII_USTRINGPARAM("en-US"));
-
 static sal_Bool existsURL( OUString const& sURL )
 {
 using namespace osl;
@@ -335,11 +333,11 @@ OUString LanguageSelection::getLanguageString()
 }
 }
 // fallback 1: en-US
-OUString usFB = usFallbackLanguage;
+OUString usFB(RTL_CONSTASCII_USTRINGPARAM("en-US"));
 if (isInstalledLanguage(usFB))
 {
 bFoundLanguage = sal_True;
-aFoundLanguage = usFallbackLanguage;
+aFoundLanguage = OUString(RTL_CONSTASCII_USTRINGPARAM("en-US"));
 return aFoundLanguage;
 }
 
diff --git a/desktop/source/app/langselect.hxx 
b/desktop/source/app/langselect.hxx
index 2fd8074..93b6bc4 100644
--- a/desktop/source/app/langselect.hxx
+++ b/desktop/source/app/langselect.hxx
@@ -54,7 +54,6 @@ public:
 static LanguageSelectionStatus getStatus();
 
 private:
-static const rtl::OUString usFallbackLanguage;
 static rtl::OUString aFoundLanguage;
 static sal_Bool bFoundLanguage;
 static LanguageSelectionStatus m_eStatus;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-12 Thread Michael Meeks
 desktop/source/deployment/manager/dp_manager.cxx |   23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 61eeb689d7605a23c3e71c652b57ee65cf5b28dc
Author: Michael Meeks 
Date:   Mon Mar 12 13:19:32 2012 +

fix smoketest - need to check read-only-ness of non-existent paths

diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 126aa04..80a9522 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -316,12 +316,19 @@ void PackageManagerImpl::initRegistryBackends()
 // as to whether a directory is truly read-only or not
 static bool isMacroURLReadOnly( const OUString &rMacro )
 {
-rtl::OUString aURL( rMacro );
-::rtl::Bootstrap::expandMacros( aURL );
+rtl::OUString aDirURL( rMacro );
+::rtl::Bootstrap::expandMacros( aDirURL );
+
+::osl::FileBase::RC aErr = ::osl::Directory::create( aDirURL );
+if ( aErr == ::osl::FileBase::E_None )
+return false; // it will be writeable
+if ( aErr != ::osl::FileBase::E_EXIST )
+return true; // some serious problem creating it
 
 bool bError;
 sal_uInt64 nWritten = 0;
-::osl::File aFile( aURL );
+rtl::OUString aFileURL( aDirURL + "/stamp.sys" );
+::osl::File aFile( aFileURL );
 
 bError = aFile.open( osl_File_OpenFlag_Read |
  osl_File_OpenFlag_Write |
@@ -330,12 +337,12 @@ static bool isMacroURLReadOnly( const OUString &rMacro )
 bError = aFile.write( "1", 1, nWritten ) != ::osl::FileBase::E_None;
 if (aFile.close() != ::osl::FileBase::E_None)
 bError = true;
-if (osl::File::remove( aURL ) != ::osl::FileBase::E_None)
+if (osl::File::remove( aFileURL ) != ::osl::FileBase::E_None)
 bError = true;
 
 SAL_INFO(
 "desktop.deployment",
-"local url '" << rMacro << "' -> '" << aURL << "' "
+"local url '" << rMacro << "' -> '" << aFileURL << "' "
 << (bError ? "is" : "is not") << " readonly\n");
 return bError;
 }
@@ -370,7 +377,7 @@ Reference 
PackageManagerImpl::create(
 //using virtualization it appears that he/she can. Then a shared 
extension can
 //be installed but is only visible for the user (because the extension 
is in
 //the virtual store).
-stamp = OUSTR("$UNO_USER_PACKAGES_CACHE/stamp.sys");
+stamp = OUSTR("$UNO_USER_PACKAGES_CACHE");
 }
 else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("shared") )) {
 that->m_activePackages = OUSTR(
@@ -381,7 +388,7 @@ Reference 
PackageManagerImpl::create(
 "vnd.sun.star.expand:$SHARED_EXTENSIONS_USER/registry");
 logFile = OUSTR(
 "vnd.sun.star.expand:$SHARED_EXTENSIONS_USER/log.txt");
-stamp = OUSTR("$UNO_SHARED_PACKAGES_CACHE/stamp.sys");
+stamp = OUSTR("$UNO_SHARED_PACKAGES_CACHE");
 }
 else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bundled") )) {
 that->m_activePackages = OUSTR(
@@ -420,7 +427,7 @@ Reference 
PackageManagerImpl::create(
 "vnd.sun.star.expand:$TMP_EXTENSIONS");
 that->m_registryCache = OUSTR(
 "vnd.sun.star.expand:$TMP_EXTENSIONS/registry");
-stamp = OUSTR("$TMP_EXTENSIONS/stamp.sys");
+stamp = OUSTR("$TMP_EXTENSIONS");
 }
 else if (! context.matchAsciiL(
  RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.tdoc:/") )) {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-09 Thread Stephan Bergmann
 desktop/source/deployment/manager/dp_manager.cxx |   32 ++-
 1 file changed, 14 insertions(+), 18 deletions(-)

New commits:
commit bee742eb7a0d5dfe23e61d9ee49a29286de90256
Author: Stephan Bergmann 
Date:   Fri Mar 9 19:42:48 2012 +0100

Fix sense of r/o detection code, and clean up

diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 0efa4c0..126aa04 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -32,6 +32,7 @@
 #include "dp_platform.hxx"
 #include "dp_manager.h"
 #include "dp_identifier.hxx"
+#include "rtl/oustringostreaminserter.hxx"
 #include "rtl/ustrbuf.hxx"
 #include "rtl/string.hxx"
 #include "rtl/uri.hxx"
@@ -313,11 +314,9 @@ void PackageManagerImpl::initRegistryBackends()
 
 // this overcomes previous rumours that the sal API is misleading
 // as to whether a directory is truly read-only or not
-static bool isMacroURLWriteable( const OUString &rMacro )
+static bool isMacroURLReadOnly( const OUString &rMacro )
 {
-if (rMacro.getLength() < (sal_Int32)sizeof ("vnd.sun.star.expand:"))
-return true;
-rtl::OUString aURL( rMacro.copy( sizeof ("vnd.sun.star.expand:") - 1 ) );
+rtl::OUString aURL( rMacro );
 ::rtl::Bootstrap::expandMacros( aURL );
 
 bool bError;
@@ -334,10 +333,10 @@ static bool isMacroURLWriteable( const OUString &rMacro )
 if (osl::File::remove( aURL ) != ::osl::FileBase::E_None)
 bError = true;
 
-OSL_TRACE ("local url '%s' -> '%s' %s readonly\n",
-   rtl::OUStringToOString( rMacro, RTL_TEXTENCODING_UTF8 
).getStr(),
-   rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr(),
-   bError ? "is" : "is not");
+SAL_INFO(
+"desktop.deployment",
+"local url '" << rMacro << "' -> '" << aURL << "' "
+<< (bError ? "is" : "is not") << " readonly\n");
 return bError;
 }
 
@@ -350,7 +349,7 @@ Reference 
PackageManagerImpl::create(
 xComponentContext, context );
 Reference xPackageManager( that );
 
-OUString packages, logFile, stampURL;
+OUString packages, logFile, stamp;
 if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("user") )) {
 that->m_activePackages = OUSTR(
 "vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages");
@@ -371,8 +370,7 @@ Reference 
PackageManagerImpl::create(
 //using virtualization it appears that he/she can. Then a shared 
extension can
 //be installed but is only visible for the user (because the extension 
is in
 //the virtual store).
-stampURL = OUSTR(
-"vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/stamp.sys");
+stamp = OUSTR("$UNO_USER_PACKAGES_CACHE/stamp.sys");
 }
 else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("shared") )) {
 that->m_activePackages = OUSTR(
@@ -383,8 +381,7 @@ Reference 
PackageManagerImpl::create(
 "vnd.sun.star.expand:$SHARED_EXTENSIONS_USER/registry");
 logFile = OUSTR(
 "vnd.sun.star.expand:$SHARED_EXTENSIONS_USER/log.txt");
-stampURL = OUSTR(
-"vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE/stamp.sys");
+stamp = OUSTR("$UNO_SHARED_PACKAGES_CACHE/stamp.sys");
 }
 else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bundled") )) {
 that->m_activePackages = OUSTR(
@@ -423,8 +420,7 @@ Reference 
PackageManagerImpl::create(
 "vnd.sun.star.expand:$TMP_EXTENSIONS");
 that->m_registryCache = OUSTR(
 "vnd.sun.star.expand:$TMP_EXTENSIONS/registry");
-stampURL = OUSTR(
-"vnd.sun.star.expand:$TMP_EXTENSIONS/stamp.sys");
+stamp = OUSTR("$TMP_EXTENSIONS/stamp.sys");
 }
 else if (! context.matchAsciiL(
  RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.tdoc:/") )) {
@@ -436,9 +432,9 @@ Reference 
PackageManagerImpl::create(
 Reference xCmdEnv;
 
 try {
-// There is no stampURL for the bundled folder
-if (!stampURL.isEmpty())
-that->m_readOnly = !isMacroURLWriteable( stampURL );
+// There is no stamp for the bundled folder:
+if (!stamp.isEmpty())
+that->m_readOnly = isMacroURLReadOnly( stamp );
 
 if (!that->m_readOnly && !logFile.isEmpty())
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source ucb/source

2012-03-09 Thread Michael Meeks
 desktop/source/deployment/manager/dp_manager.cxx |   64 +++
 ucb/source/ucp/file/shell.cxx|4 +
 2 files changed, 36 insertions(+), 32 deletions(-)

New commits:
commit d3192948fe968fc4d6a8ec0e6fda232f265b3c4c
Author: Michael Meeks 
Date:   Fri Mar 9 17:02:32 2012 +

fdo#40607 - osl_syncFile having written, and avoid doing that on start

diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 4f6f6c0..0efa4c0 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -311,6 +311,36 @@ void PackageManagerImpl::initRegistryBackends()
  m_xComponentContext ) );
 }
 
+// this overcomes previous rumours that the sal API is misleading
+// as to whether a directory is truly read-only or not
+static bool isMacroURLWriteable( const OUString &rMacro )
+{
+if (rMacro.getLength() < (sal_Int32)sizeof ("vnd.sun.star.expand:"))
+return true;
+rtl::OUString aURL( rMacro.copy( sizeof ("vnd.sun.star.expand:") - 1 ) );
+::rtl::Bootstrap::expandMacros( aURL );
+
+bool bError;
+sal_uInt64 nWritten = 0;
+::osl::File aFile( aURL );
+
+bError = aFile.open( osl_File_OpenFlag_Read |
+ osl_File_OpenFlag_Write |
+ osl_File_OpenFlag_Create ) != ::osl::FileBase::E_None;
+if (!bError)
+bError = aFile.write( "1", 1, nWritten ) != ::osl::FileBase::E_None;
+if (aFile.close() != ::osl::FileBase::E_None)
+bError = true;
+if (osl::File::remove( aURL ) != ::osl::FileBase::E_None)
+bError = true;
+
+OSL_TRACE ("local url '%s' -> '%s' %s readonly\n",
+   rtl::OUStringToOString( rMacro, RTL_TEXTENCODING_UTF8 
).getStr(),
+   rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr(),
+   bError ? "is" : "is not");
+return bError;
+}
+
 
//__
 Reference PackageManagerImpl::create(
 Reference const & xComponentContext,
@@ -406,39 +436,9 @@ Reference 
PackageManagerImpl::create(
 Reference xCmdEnv;
 
 try {
-//There is no stampURL for the bundled folder
+// There is no stampURL for the bundled folder
 if (!stampURL.isEmpty())
-{
-#define CURRENT_STAMP "1"
-try {
-//The osl file API does not allow to find out if one can write
-//into a folder. Therefore we try to write a file. Then we 
delete
-//it, so that it does not hinder uninstallation of OOo
-// probe writing:
-::ucbhelper::Content ucbStamp( stampURL, xCmdEnv );
-::rtl::OString stamp(
-RTL_CONSTASCII_STRINGPARAM(CURRENT_STAMP) );
-Reference xData(
-::xmlscript::createInputStream(
-::rtl::ByteSequence(
-reinterpret_cast(stamp.getStr()),
-stamp.getLength() ) ) );
-ucbStamp.writeStream( xData, true /* replace existing */ );
-that->m_readOnly = false;
-erase_path( stampURL, xCmdEnv );
-}
-catch (const RuntimeException &) {
-try {
-erase_path( stampURL, xCmdEnv );
-} catch (...)
-{
-}
-throw;
-}
-catch (const Exception &) {
-that->m_readOnly = true;
-}
-}
+that->m_readOnly = !isMacroURLWriteable( stampURL );
 
 if (!that->m_readOnly && !logFile.isEmpty())
 {
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 725820d..86236f0 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -1909,6 +1909,10 @@ shell::write( sal_Int32 CommandId,
 }
 } while( nReadBytes == nRequestedBytes );
 
+aFile.sync(); // fsync / flush it to disk.
+OSL_TRACE( "fsync'd file '%s'\n",
+   rtl::OUStringToOString( aUnqPath, RTL_TEXTENCODING_UTF8 
).getStr() );
+
 err = aFile.close();
 if( err != osl::FileBase::E_None  )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-08 Thread Takeshi Abe
 desktop/source/app/appinit.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 274b4272fa5e819e484935e9c65676d8d3f7ff3a
Author: Takeshi Abe 
Date:   Thu Mar 8 02:10:49 2012 +0900

Removed dead define

It died 10 years ago: 85c2755e16883d581db39b317b8c152b551da5ba

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 076899d..fe8618a 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -72,10 +72,6 @@
 #include 
 
 
-#define DEFINE_CONST_OUSTRING(CONSTASCII)   
OUString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
-
-#define DESKTOP_TEMPDIRNAME "soffice.tmp"
-
 using namespace desktop;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-08 Thread Michael Stahl
 desktop/source/app/cmdlineargs.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit db21197de4383f75718190072171adab15e64a00
Author: Michael Stahl 
Date:   Thu Mar 8 15:49:52 2012 +0100

desktop: do not complain about soffice command line options:

These are handled in the soffice wrapper script, but that is too stupid
to be able to filter these out, so just ignore them in soffice.bin.

(regression from 4efbd87e31e7488dfcdd1d07ff979f1f59b8b1f1)

Also, print errors on stderr.

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 5ae86ab..0bc6312 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -306,10 +306,16 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 }
 #if defined UNX
 else
+// because it's impossible to filter these options that
+// are handled in the soffice shell script with the
+// primitive tools that /bin/sh offers, ignore them here
+if 
(!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("backtrace")) &&
+
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("strace")) &&
+
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("valgrind")))
 {
-printf("Unknown option %s\n",
+fprintf(stderr, "Unknown option %s\n",
 rtl::OUStringToOString(aArg, 
osl_getThreadTextEncoding()).getStr());
-printf("Run 'soffice --help' to see a full list of 
available command line options.\n");
+fprintf(stderr, "Run 'soffice --help' to see a full 
list of available command line options.\n");
 SetBoolParam_Impl( CMD_BOOLPARAM_UNKNOWN, sal_True );
 }
 #endif
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-06 Thread Caolán McNamara
 desktop/source/app/cmdlineargs.cxx |   17 -
 desktop/source/app/cmdlineargs.hxx |2 ++
 desktop/source/app/officeipcthread.cxx |6 ++
 desktop/source/app/sofficemain.cxx |4 
 4 files changed, 28 insertions(+), 1 deletion(-)

New commits:
commit 4efbd87e31e7488dfcdd1d07ff979f1f59b8b1f1
Author: Caolán McNamara 
Date:   Tue Mar 6 15:49:20 2012 +

Resolves: rhbz#800272 complain about unknown command-line options

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 6a5d58a..5ae86ab 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -304,6 +304,15 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 {
 bConversionOutEvent = true;
 }
+#if defined UNX
+else
+{
+printf("Unknown option %s\n",
+rtl::OUStringToOString(aArg, 
osl_getThreadTextEncoding()).getStr());
+printf("Run 'soffice --help' to see a full list of 
available command line options.\n");
+SetBoolParam_Impl( CMD_BOOLPARAM_UNKNOWN, sal_True );
+}
+#endif
 }
 else
 {
@@ -640,7 +649,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( 
const ::rtl::OUString&
 
 if (bDeprecated)
 {
-rtl::OString sArg(rtl::OUStringToOString(aArg, RTL_TEXTENCODING_UTF8));
+rtl::OString sArg(rtl::OUStringToOString(aArg, 
osl_getThreadTextEncoding()));
 fprintf(stderr, "Warning: %s is deprecated.  Use -%s instead.\n", 
sArg.getStr(), sArg.getStr());
 }
 return sal_True;
@@ -851,6 +860,12 @@ sal_Bool CommandLineArgs::IsVersion() const
 return m_aBoolParams[ CMD_BOOLPARAM_VERSION ];
 }
 
+sal_Bool CommandLineArgs::HasUnknown() const
+{
+osl::MutexGuard  aMutexGuard( m_aMutex );
+return m_aBoolParams[ CMD_BOOLPARAM_UNKNOWN ];
+}
+
 sal_Bool CommandLineArgs::HasModuleParam() const
 {
 osl::MutexGuard  aMutexGuard( m_aMutex );
diff --git a/desktop/source/app/cmdlineargs.hxx 
b/desktop/source/app/cmdlineargs.hxx
index f79efea..29b2f46 100644
--- a/desktop/source/app/cmdlineargs.hxx
+++ b/desktop/source/app/cmdlineargs.hxx
@@ -71,6 +71,7 @@ class CommandLineArgs
 CMD_BOOLPARAM_HELPBASE,
 CMD_BOOLPARAM_PSN,
 CMD_BOOLPARAM_VERSION,
+CMD_BOOLPARAM_UNKNOWN,
 CMD_BOOLPARAM_COUNT // must be last element!
 };
 
@@ -162,6 +163,7 @@ class CommandLineArgs
 sal_BoolIsWeb() const;
 sal_BoolIsVersion() const;
 sal_BoolHasModuleParam() const;
+sal_BoolHasUnknown() const;
 sal_BoolWantsToLoadDocument() const;
 
 // Access to string parameters
diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index b2c6566..4306a67 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -709,6 +709,12 @@ void OfficeIPCThread::execute()
 #endif
 continue;
 }
+
+#ifdef UNX
+if (aCmdLineArgs->HasUnknown() || aCmdLineArgs->IsVersion() || 
aCmdLineArgs->IsHelp())
+continue;
+#endif
+
 const CommandLineArgs &rCurrentCmdLineArgs = 
Desktop::GetCommandLineArgs();
 
 if ( aCmdLineArgs->IsQuickstart() )
diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
index 76562a3..ed22834 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -71,6 +71,10 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
 desktop::displayVersion();
 return EXIT_SUCCESS;
 }
+else if ( rCmdLineArgs.HasUnknown() )
+{
+return EXIT_FAILURE;
+}
 #endif
 return SVMain();
 #ifdef ANDROID
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-03-02 Thread Stephan Bergmann
 desktop/source/app/app.cxx |   34 +++---
 desktop/source/app/userinstall.cxx |   13 +
 desktop/source/app/userinstall.hxx |7 ---
 3 files changed, 28 insertions(+), 26 deletions(-)

New commits:
commit f97c9c25396fb6487da3b9b5284c6250c7927156
Author: Stephan Bergmann 
Date:   Fri Mar 2 12:48:46 2012 +0100

migrateSettingsIfNecessary must be called later after all

...once e.g. UCB is already initialized, as the invoked migration services 
use it.

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 61746be..5610637 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -36,6 +36,7 @@
 #include "userinstall.hxx"
 #include "desktopcontext.hxx"
 #include "exithelper.hxx"
+#include "migration.hxx"
 
 #include 
 #include 
@@ -1476,23 +1477,21 @@ int Desktop::Main()
 
 SetSplashScreenProgress(10);
 
+UserInstall::UserInstallStatus inst_fin = UserInstall::finalize();
+if (inst_fin != UserInstall::Ok && inst_fin != UserInstall::Created)
 {
-UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
-if ( instErr_fin != UserInstall::E_None)
-{
-OSL_FAIL("userinstall failed");
-if ( instErr_fin == UserInstall::E_NoDiskSpace )
-HandleBootstrapErrors( BE_USERINSTALL_NOTENOUGHDISKSPACE );
-else if ( instErr_fin == UserInstall::E_NoWriteAccess )
-HandleBootstrapErrors( BE_USERINSTALL_NOWRITEACCESS );
-else
-HandleBootstrapErrors( BE_USERINSTALL_FAILED );
-return EXIT_FAILURE;
-}
-// refresh path information
-utl::Bootstrap::reloadData();
-SetSplashScreenProgress(20);
+OSL_FAIL("userinstall failed");
+if ( inst_fin == UserInstall::E_NoDiskSpace )
+HandleBootstrapErrors( BE_USERINSTALL_NOTENOUGHDISKSPACE );
+else if ( inst_fin == UserInstall::E_NoWriteAccess )
+HandleBootstrapErrors( BE_USERINSTALL_NOWRITEACCESS );
+else
+HandleBootstrapErrors( BE_USERINSTALL_FAILED );
+return EXIT_FAILURE;
 }
+// refresh path information
+utl::Bootstrap::reloadData();
+SetSplashScreenProgress(20);
 
 Reference< XMultiServiceFactory > xSMgr =
 ::comphelper::getProcessServiceFactory();
@@ -1623,6 +1622,11 @@ int Desktop::Main()
 
 // check whether the shutdown is caused by restart
 pExecGlobals->bRestartRequested = ( xRestartManager.is() && 
xRestartManager->isRestartRequested( sal_True ) );
+
+if (inst_fin == UserInstall::Created)
+{
+Migration::migrateSettingsIfNecessary();
+}
 #endif
 
 // keep a language options instance...
diff --git a/desktop/source/app/userinstall.cxx 
b/desktop/source/app/userinstall.cxx
index 26d2ef7..f6d0c7b 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -28,7 +28,6 @@
 
 #include "sal/config.h"
 
-#include "migration.hxx"
 #include "userinstall.hxx"
 #include "langselect.hxx"
 
@@ -68,7 +67,7 @@ using namespace com::sun::star::util;
 
 namespace desktop {
 
-static UserInstall::UserInstallError create_user_install(OUString&);
+static UserInstall::UserInstallStatus create_user_install(OUString&);
 
 static bool is_user_install()
 {
@@ -95,7 +94,7 @@ namespace desktop {
 return false;
 }
 
-UserInstall::UserInstallError UserInstall::finalize()
+UserInstall::UserInstallStatus UserInstall::finalize()
 {
 OUString aUserInstallPath;
 utl::Bootstrap::PathStatus aLocateResult =
@@ -114,7 +113,7 @@ namespace desktop {
 // path exists, check if an installation lives there
 if ( is_user_install() )
 {
-return E_None;
+return Ok;
 }
 // Note: fall-thru intended.
 }
@@ -185,7 +184,7 @@ namespace desktop {
 return err;
 }
 
-static UserInstall::UserInstallError create_user_install(OUString& 
aUserPath)
+static UserInstall::UserInstallStatus create_user_install(OUString& 
aUserPath)
 {
 OUString aBasePath;
 if (utl::Bootstrap::locateBaseInstallation(aBasePath) != 
utl::Bootstrap::PATH_EXISTS)
@@ -216,8 +215,6 @@ namespace desktop {
 else
 return UserInstall::E_Creation;
 }
-
-Migration::migrateSettingsIfNecessary();
 #endif
 
 boost::shared_ptr< comphelper::ConfigurationChanges > batch(
@@ -225,7 +222,7 @@ namespace desktop {
 officecfg::Setup::Office::ooSetupInstCompleted::set(true, batch);
 batch->commit();
 
-return UserInstall::E_None;
+return UserInstall::Created;
 }
 }
 
diff --git a/desktop/source/app/userinstall.hxx 
b/desktop/source/app/userinstall.hxx
index 6dcb5e9..5fa1a2d 100644
--- a/desktop/source/app

[Libreoffice-commits] .: desktop/source officecfg/registry

2012-03-02 Thread Stephan Bergmann
 desktop/source/app/userinstall.cxx |  107 +++--
 officecfg/registry/data/org/openoffice/Setup.xcu   |   16 ---
 officecfg/registry/schema/org/openoffice/Setup.xcs |8 -
 3 files changed, 24 insertions(+), 107 deletions(-)

New commits:
commit c6f8eb26c07264103a3e99f79b2dc78f9be6ef57
Author: Stephan Bergmann 
Date:   Fri Mar 2 10:58:39 2012 +0100

Clean up

diff --git a/desktop/source/app/userinstall.cxx 
b/desktop/source/app/userinstall.cxx
index 7fe9729..26d2ef7 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -42,21 +42,14 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 
@@ -81,10 +74,6 @@ namespace desktop {
 {
 try
 {
-OUString sAccessSrvc(
- RTL_CONSTASCII_USTRINGPARAM(
-"com.sun.star.configuration.ConfigurationAccess" ) );
-
 Reference< XMultiServiceFactory > theConfigProvider(
 com::sun::star::configuration::theDefaultProvider::get(
 comphelper::getProcessComponentContext() ) );
@@ -95,28 +84,7 @@ namespace desktop {
 Locale aLocale = 
LanguageSelection::IsoStringToLocale(aUserLanguage);
 localizable->setLocale(aLocale);
 
-Sequence< Any > theArgs(1);
-NamedValue v;
-v.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath"));
-v.Value = 
makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup")));
-theArgs[0] <<= v;
-Reference< XHierarchicalNameAccess> hnacc(
-theConfigProvider->createInstanceWithArguments(
-sAccessSrvc, theArgs), UNO_QUERY_THROW);
-
-try
-{
-sal_Bool bValue = sal_False;
-hnacc->getByHierarchicalName(
-OUString( RTL_CONSTASCII_USTRINGPARAM(
-"Office/ooSetupInstCompleted" ) ) ) >>= bValue;
-
-return bValue ? true : false;
-}
-catch ( NoSuchElementException const & )
-{
-// just return false in this case.
-}
+return officecfg::Setup::Office::ooSetupInstCompleted::get();
 }
 catch (Exception const & e)
 {
@@ -217,17 +185,6 @@ namespace desktop {
 return err;
 }
 
-#ifndef ANDROID
-static const char *pszSrcList[] = {
-"/presets",
-NULL
-};
-static const char *pszDstList[] = {
-"/user",
-NULL
-};
-#endif
-
 static UserInstall::UserInstallError create_user_install(OUString& 
aUserPath)
 {
 OUString aBasePath;
@@ -239,63 +196,37 @@ namespace desktop {
 if ((rc != FileBase::E_None) && (rc != FileBase::E_EXIST)) return 
UserInstall::E_Creation;
 
 #ifdef UNIX
-// set safer permissions for the user directory by default
-File::setAttributes(aUserPath, osl_File_Attribute_OwnWrite| 
osl_File_Attribute_OwnRead| osl_File_Attribute_OwnExe);
+// Set safer permissions for the user directory by default:
+File::setAttributes(aUserPath, osl_File_Attribute_OwnWrite| 
osl_File_Attribute_OwnRead| osl_File_Attribute_OwnExe);
 #endif
 
 #ifndef ANDROID
 // as of now osl_copyFile does not work on Android => don't do this.
 
-// copy data from shared data directory of base installation
-for (sal_Int32 i=0; pszSrcList[i]!=NULL && pszDstList[i]!=NULL; i++)
+// Copy data from shared data directory of base installation:
+rc = copy_recursive(
+aBasePath + rtl::OUString("/presets"),
+aUserPath + rtl::OUString("/user"));
+if ((rc != FileBase::E_None) && (rc != FileBase::E_EXIST))
 {
-rc = copy_recursive(
-aBasePath + OUString::createFromAscii(pszSrcList[i]),
-aUserPath + OUString::createFromAscii(pszDstList[i]));
-if ((rc != FileBase::E_None) && (rc != FileBase::E_EXIST))
-{
-if ( rc == FileBase::E_NOSPC )
-return UserInstall::E_NoDiskSpace;
-else if ( rc == FileBase::E_ACCES )
-return UserInstall::E_NoWriteAccess;
-else
-return UserInstall::E_Creation;
-}
+if ( rc == FileBase::E_NOSPC )
+return UserInstall::E_NoDiskSpace;
+else if ( rc == FileBase::E_ACCES )
+return UserInstall::E_NoWriteAccess;
+else
+return UserInstall::E_Creation;
 }
 
 Migration::migrateSettingsIfNecessary();
 #endif
-try
-{
-OUString 
sAccessSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.Configurati

[Libreoffice-commits] .: desktop/source

2012-03-01 Thread Stephan Bergmann
 desktop/source/app/app.cxx |3 ---
 desktop/source/app/userinstall.cxx |5 -
 desktop/source/migration/migration.cxx |   17 -
 3 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 76e0d695a41326a5583dbc9702e0ce3b8219b514
Author: Stephan Bergmann 
Date:   Thu Mar 1 22:27:56 2012 +0100

Move migrateSettingsIfNecessary into create_user_install

...so that it is only done once (see mail thread starting at


"User installation migrated onto itself").  Also, checking for the existence
of an old user installation needed to change from 
ucbhelper::Content::isDocument
to osl::FileStatus::getFileType, as the UCB is not yet initialized at the 
time
migrateSettingsIfNecessary is now called.

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e1bd1e0..61746be 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -36,7 +36,6 @@
 #include "userinstall.hxx"
 #include "desktopcontext.hxx"
 #include "exithelper.hxx"
-#include "migration.hxx"
 
 #include 
 #include 
@@ -1624,8 +1623,6 @@ int Desktop::Main()
 
 // check whether the shutdown is caused by restart
 pExecGlobals->bRestartRequested = ( xRestartManager.is() && 
xRestartManager->isRestartRequested( sal_True ) );
-
-Migration::migrateSettingsIfNecessary();
 #endif
 
 // keep a language options instance...
diff --git a/desktop/source/app/userinstall.cxx 
b/desktop/source/app/userinstall.cxx
index 6b1672d..7fe9729 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -26,8 +26,9 @@
  *
  /
 
+#include "sal/config.h"
 
-
+#include "migration.hxx"
 #include "userinstall.hxx"
 #include "langselect.hxx"
 
@@ -261,6 +262,8 @@ namespace desktop {
 return UserInstall::E_Creation;
 }
 }
+
+Migration::migrateSettingsIfNecessary();
 #endif
 try
 {
diff --git a/desktop/source/migration/migration.cxx 
b/desktop/source/migration/migration.cxx
index 4df893a..dd73e3a 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -44,7 +44,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -576,17 +575,17 @@ install_info MigrationImpl::findInstallation(const 
strings_v& rVersions)
 aUserInst += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
 #endif
 aUserInst += aProfileName;
-try
+rtl::OUString url(
+INetURLObject(aUserInst).GetMainURL(INetURLObject::NO_DECODE));
+osl::DirectoryItem item;
+osl::FileStatus stat(osl_FileStatus_Mask_Type);
+if (osl::DirectoryItem::get(url, item) == osl::FileBase::E_None
+&& item.getFileStatus(stat) == osl::FileBase::E_None
+&& stat.getFileType() == osl::FileStatus::Directory)
 {
-INetURLObject aObj(aUserInst);
-::ucbhelper::Content aCnt( aObj.GetMainURL( 
INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
-aCnt.isDocument();
-aInfo.userdata = aObj.GetMainURL( INetURLObject::NO_DECODE );
+aInfo.userdata = url;
 aInfo.productname = aVersion;
 }
-catch (const uno::Exception&)
-{
-}
 }
 ++i_ver;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-02-21 Thread Tor Lillqvist
 desktop/source/app/sofficemain.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit dac4874eb0a5f65aae2679b5fa0020154f84800d
Author: Riccardo Magliocchetti 
Date:   Tue Feb 21 11:45:00 2012 +0100

desktop: Don't call setIniFilename() for LIBO_HEADLESS

mmeeks suggests we don't want setIniFilename(), who am i to disagree? :)

diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
index 5ec3dd4..76562a3 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -43,8 +43,10 @@ int SVMain();
 
 extern "C" int DESKTOP_DLLPUBLIC soffice_main()
 {
-#ifdef ANDROID
+#if defined(ANDROID) || defined(LIBO_HEADLESS)
+#if defined(ANDROID)
 try {
+#endif
 rtl::Bootstrap::setIniFilename(
 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///assets/program/lofficerc")));
 #endif
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-02-20 Thread Stephan Bergmann
 desktop/source/deployment/registry/help/dp_help.cxx |   35 +---
 1 file changed, 30 insertions(+), 5 deletions(-)

New commits:
commit 55892c6bd740fa0c667656cbb246327f2bb76007
Author: Stephan Bergmann 
Date:   Mon Feb 20 13:35:57 2012 +0100

Clean up work around spurious warning about missing JRE

diff --git a/desktop/source/deployment/registry/help/dp_help.cxx 
b/desktop/source/deployment/registry/help/dp_help.cxx
index adc2875..b5250cc 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -37,8 +37,9 @@
 #include "ucbhelper/content.hxx"
 #include "comphelper/servicedecl.hxx"
 #include "svl/inettype.hxx"
-#include "unotools/pathoptions.hxx"
+#include "svtools/javainteractionhandler.hxx"
 #include "uno/current_context.hxx"
+#include "unotools/pathoptions.hxx"
 
 #if !defined(ANDROID) && !defined(IOS)
 #include 
@@ -61,6 +62,29 @@ namespace backend {
 namespace help {
 namespace {
 
+// A current context that filters out java-vm.interaction-handler:
+class NonJavaCurrentContext: public cppu::WeakImplHelper1< XCurrentContext > {
+public:
+NonJavaCurrentContext(Reference< XCurrentContext > const & parent):
+parent_(parent) {}
+
+virtual Any SAL_CALL getValueByName(rtl::OUString const & Name)
+throw (RuntimeException);
+
+private:
+Reference< XCurrentContext > parent_;
+};
+
+Any NonJavaCurrentContext::getValueByName(rtl::OUString const & Name)
+throw (RuntimeException)
+{
+return
+(Name.equalsAsciiL(
+RTL_CONSTASCII_STRINGPARAM(JAVA_INTERACTION_HANDLER_NAME))
+ || !parent_.is())
+? Any() : parent_->getValueByName(Name);
+}
+
 
//==
 class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
 {
@@ -421,10 +445,11 @@ void BackendImpl::implProcessHelp(
 Reference< script::XInvocation > xInvocation;
 if( xContext.is() )
 {
-// Ignore the missing JRE scenario on upgrade/first-start 
without
-// horrible end-user warnings that are ignorable,and cause 
grief.
-Reference< XCurrentContext > xNoContext;
-com::sun::star::uno::ContextLayer dummyLayer( xNoContext );
+// Ignore the missing JRE scenario on upgrade/first-start
+// without horrible end-user warnings that are ignorable,
+// and cause grief:
+ContextLayer l(
+new NonJavaCurrentContext(getCurrentContext()));
 try
 {
 xInvocation = Reference< script::XInvocation >(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-02-15 Thread Stephan Bergmann
 desktop/source/app/app.cxx |   30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit bebd171db7735e3063f4cbb15b78f5436dde
Author: Stephan Bergmann 
Date:   Wed Feb 15 13:16:52 2012 +0100

PLASMA_NOW fix

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 53a19f6..4df6346 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -105,7 +105,7 @@
 #ifdef ANDROID
 // mmeeks debugging stuff?
 extern void VCL_DLLPUBLIC plasma_now(const char *msg);
-#define PLASMA_NOW(s) plasma_now(s)
+#define PLASMA_NOW(s) ::plasma_now(s)
 #else
 #define PLASMA_NOW(s)
 #endif
@@ -1478,7 +1478,7 @@ int Desktop::Main()
 
 ResMgr::SetReadStringHook( ReplaceStringHookProc );
 
-//::PLASMA_NOW("after desktoppy bits"); - fine to here ...
+//PLASMA_NOW("after desktoppy bits"); - fine to here ...
 
 // Startup screen
 RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { 
OpenSplashScreen" );
@@ -1487,7 +1487,7 @@ int Desktop::Main()
 
 SetSplashScreenProgress(10);
 
-//::PLASMA_NOW("after splash open");
+//PLASMA_NOW("after splash open");
 {
 UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
 if ( instErr_fin != UserInstall::E_None)
@@ -1515,7 +1515,7 @@ int Desktop::Main()
 {
 RegisterServices( xSMgr );
 
-//::PLASMA_NOW("registered services");
+//PLASMA_NOW("registered services");
 
 SetSplashScreenProgress(25);
 
@@ -1561,7 +1561,7 @@ int Desktop::Main()
 if ( !InitializeConfiguration() )
 return EXIT_FAILURE;
 
-//::PLASMA_NOW("init configuration");
+//PLASMA_NOW("init configuration");
 
 SetSplashScreenProgress(30);
 
@@ -1580,7 +1580,7 @@ int Desktop::Main()
 String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, 
*pLabelResMgr ) ) : String();
 delete pLabelResMgr;
 
-//::PLASMA_NOW("after title string");
+//PLASMA_NOW("after title string");
 
 #ifdef DBG_UTIL
 //include version ID in non product builds
@@ -1598,7 +1598,7 @@ int Desktop::Main()
 SetSplashScreenProgress(40);
 RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and 
SvtLanguageOptions" );
 
-//::PLASMA_NOW("unrestricted folders"); -- got this.
+//PLASMA_NOW("unrestricted folders"); -- got this.
 
 // Check special env variable
 std::vector< String > aUnrestrictedFolders;
@@ -1620,7 +1620,7 @@ int Desktop::Main()
 ( xSMgr->createInstance(
 DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" 
) ), UNO_QUERY );
 
-::PLASMA_NOW("done global event broadcaster");
+PLASMA_NOW("done global event broadcaster");
 
 /* ensure existance of a default window that messages can be 
dispatched to
This is for the benefit of testtool which uses PostUserEvent 
extensively
@@ -1659,7 +1659,7 @@ int Desktop::Main()
 pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
 }
 
-::PLASMA_NOW("invoked OnStartupApp");
+PLASMA_NOW("invoked OnStartupApp");
 
 SetSplashScreenProgress(50);
 
@@ -1690,7 +1690,7 @@ int Desktop::Main()
 aMiscOptions.SetUseSystemFileDialog( sal_False );
 }
 
-::PLASMA_NOW("nearly there !");
+PLASMA_NOW("nearly there !");
 
 if ( !pExecGlobals->bRestartRequested )
 {
@@ -1761,7 +1761,7 @@ int Desktop::Main()
 aOptions.SetVCLSettings();
 SetSplashScreenProgress(60);
 
-::PLASMA_NOW("setup appearance !");
+PLASMA_NOW("setup appearance !");
 
 if ( !pExecGlobals->bRestartRequested )
 {
@@ -1796,7 +1796,7 @@ int Desktop::Main()
 // Release solar mutex just before we wait for our client to connect
 int nAcquireCount = Application::ReleaseSolarMutex();
 
-::PLASMA_NOW("wait client connect !");
+PLASMA_NOW("wait client connect !");
 
 // Post user event to startup first application component window
 // We have to send this OpenClients message short before execute() to
@@ -1816,7 +1816,7 @@ int Desktop::Main()
 // call Application::Execute to process messages in vcl message loop
 RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter 
Application::Execute()" );
 
-::PLASMA_NOW("before java foo !");
+PLASMA_NOW("before java foo !");
 
 try
 {
@@ -1834,14 +1834,14 @@ int Desktop::Main()
 DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && 
!rCmdLineArgs.IsNoQuickstart() );
 
 #ifdef ANDROID
-::PLASMA_NOW("pre hit execute!");
+PLASMA_NOW("pre hit execute!");
 
 // For some reason we're not getting a desktop frame or 
component [odd]
 ErrorBox aKickStartVCL( NULL, WB_OK, 
rtl::OUString::createFromAscii("My very own title!") );
 aKickStar

[Libreoffice-commits] .: desktop/source

2012-02-15 Thread Tor Lillqvist
 desktop/source/app/app.cxx |   37 ++---
 1 file changed, 22 insertions(+), 15 deletions(-)

New commits:
commit 12f689687e3017bfe9ffaf6bbc4593eb3ca21c2b
Author: Tor Lillqvist 
Date:   Wed Feb 15 13:22:50 2012 +0200

Ifdefify temporary (?) Android hacks

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index dc490ed..53a19f6 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -102,7 +102,13 @@
 #include 
 #endif
 
+#ifdef ANDROID
+// mmeeks debugging stuff?
 extern void VCL_DLLPUBLIC plasma_now(const char *msg);
+#define PLASMA_NOW(s) plasma_now(s)
+#else
+#define PLASMA_NOW(s)
+#endif
 
 #define DEFINE_CONST_UNICODE(CONSTASCII)
UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
 #define U2S(STRING)
::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
@@ -1472,7 +1478,7 @@ int Desktop::Main()
 
 ResMgr::SetReadStringHook( ReplaceStringHookProc );
 
-//::plasma_now("after desktoppy bits"); - fine to here ...
+//::PLASMA_NOW("after desktoppy bits"); - fine to here ...
 
 // Startup screen
 RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { 
OpenSplashScreen" );
@@ -1481,7 +1487,7 @@ int Desktop::Main()
 
 SetSplashScreenProgress(10);
 
-//::plasma_now("after splash open");
+//::PLASMA_NOW("after splash open");
 {
 UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
 if ( instErr_fin != UserInstall::E_None)
@@ -1509,7 +1515,7 @@ int Desktop::Main()
 {
 RegisterServices( xSMgr );
 
-//::plasma_now("registered services");
+//::PLASMA_NOW("registered services");
 
 SetSplashScreenProgress(25);
 
@@ -1555,7 +1561,7 @@ int Desktop::Main()
 if ( !InitializeConfiguration() )
 return EXIT_FAILURE;
 
-//::plasma_now("init configuration");
+//::PLASMA_NOW("init configuration");
 
 SetSplashScreenProgress(30);
 
@@ -1574,7 +1580,7 @@ int Desktop::Main()
 String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, 
*pLabelResMgr ) ) : String();
 delete pLabelResMgr;
 
-//::plasma_now("after title string");
+//::PLASMA_NOW("after title string");
 
 #ifdef DBG_UTIL
 //include version ID in non product builds
@@ -1592,7 +1598,7 @@ int Desktop::Main()
 SetSplashScreenProgress(40);
 RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and 
SvtLanguageOptions" );
 
-//::plasma_now("unrestricted folders"); -- got this.
+//::PLASMA_NOW("unrestricted folders"); -- got this.
 
 // Check special env variable
 std::vector< String > aUnrestrictedFolders;
@@ -1614,7 +1620,7 @@ int Desktop::Main()
 ( xSMgr->createInstance(
 DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" 
) ), UNO_QUERY );
 
-::plasma_now("done global event broadcaster");
+::PLASMA_NOW("done global event broadcaster");
 
 /* ensure existance of a default window that messages can be 
dispatched to
This is for the benefit of testtool which uses PostUserEvent 
extensively
@@ -1653,7 +1659,7 @@ int Desktop::Main()
 pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
 }
 
-::plasma_now("invoked OnStartupApp");
+::PLASMA_NOW("invoked OnStartupApp");
 
 SetSplashScreenProgress(50);
 
@@ -1684,7 +1690,7 @@ int Desktop::Main()
 aMiscOptions.SetUseSystemFileDialog( sal_False );
 }
 
-::plasma_now("nearly there !");
+::PLASMA_NOW("nearly there !");
 
 if ( !pExecGlobals->bRestartRequested )
 {
@@ -1755,7 +1761,7 @@ int Desktop::Main()
 aOptions.SetVCLSettings();
 SetSplashScreenProgress(60);
 
-::plasma_now("setup appearance !");
+::PLASMA_NOW("setup appearance !");
 
 if ( !pExecGlobals->bRestartRequested )
 {
@@ -1790,7 +1796,7 @@ int Desktop::Main()
 // Release solar mutex just before we wait for our client to connect
 int nAcquireCount = Application::ReleaseSolarMutex();
 
-::plasma_now("wait client connect !");
+::PLASMA_NOW("wait client connect !");
 
 // Post user event to startup first application component window
 // We have to send this OpenClients message short before execute() to
@@ -1810,7 +1816,7 @@ int Desktop::Main()
 // call Application::Execute to process messages in vcl message loop
 RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter 
Application::Execute()" );
 
-::plasma_now("before java foo !");
+::PLASMA_NOW("before java foo !");
 
 try
 {
@@ -1827,15 +1833,16 @@ int Desktop::Main()
 // if this run of the office is triggered by restart, some 
additional actions should be done
 DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && 
!rCmdLineArgs.IsNoQuickst

[Libreoffice-commits] .: desktop/source

2012-02-14 Thread Andras Timar
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   34 ---
 1 file changed, 25 insertions(+), 9 deletions(-)

New commits:
commit 545a55895acfe15a454ca701eff7197eb8dbc3f3
Author: Tomcsik Bence 
Date:   Tue Feb 14 18:25:47 2012 +0100

fix layout of checkboxes on Extension Manager dialog fdo#45851

I changed the sizes and the positions of the checkboxes. So there won't be
truncated checkboxes in any languages.

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 416e567..39606f1 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1244,16 +1244,32 @@ void ExtMgrDialog::Resize()
 
 // checkboxes + text "type of extensions"
 
-Size aCBSize(m_aBundledCbx.GetSizePixel());
-
-offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*(aCBSize.Width() + RSC_SP_CTRL_GROUP_X) );
+long nWidth = m_aBundledCbx.GetCtrlTextWidth( m_aBundledCbx.GetText() );
+Size aBCBSize(m_aBundledCbx.GetSizePixel());
+aBCBSize.Width() = nWidth + 30;
+aBCBSize.Height() += 3;
+m_aBundledCbx.SetSizePixel( aBCBSize );
+
+nWidth = m_aSharedCbx.GetCtrlTextWidth( m_aSharedCbx.GetText() );
+Size aSCBSize(m_aSharedCbx.GetSizePixel());
+aSCBSize.Width() = nWidth + 30;
+aSCBSize.Height() += 3;
+m_aSharedCbx.SetSizePixel( aSCBSize );
+
+nWidth = m_aUserCbx.GetCtrlTextWidth( m_aUserCbx.GetText() );
+Size aUCBSize(m_aUserCbx.GetSizePixel());
+aUCBSize.Width() = nWidth + 30;
+aUCBSize.Height() += 3;
+m_aUserCbx.SetSizePixel( aUCBSize );
+
+offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*RSC_SP_CTRL_GROUP_X - aBCBSize.Width() - 
aSCBSize.Width() - aUCBSize.Width() );
 
 aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 
2*RSC_SP_DLG_INNERBORDER_BOTTOM);
-m_aBundledCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aSharedCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aUserCbx.SetPosSizePixel(aPos, aCBSize);
+m_aBundledCbx.SetPosPixel( aPos );
+aPos.X() += aBCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X;
+m_aSharedCbx.SetPosPixel( aPos );
+aPos.X() += aSCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X;
+m_aUserCbx.SetPosPixel( aPos );
 
 Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel());
 aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
@@ -1269,7 +1285,7 @@ void ExtMgrDialog::Resize()
 
 Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT,
 aTotalSize.Height() - aBtnSize.Height() - LINE_SIZE - 
aBtnSize.Height()
-- aCBSize.Height() - aFTTypeOfExtSize.Height()
+- aBCBSize.Height() - aFTTypeOfExtSize.Height()
 - RSC_SP_DLG_INNERBORDER_TOP - 5*RSC_SP_DLG_INNERBORDER_BOTTOM 
);
 
 m_pExtensionBox->SetSizePixel(aSize );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source extensions/source filter/source framework/source sfx2/source

2012-02-01 Thread Julien Nabet
 desktop/source/deployment/registry/dp_backend.cxx |2 +-
 extensions/source/ole/oleobjw.cxx |2 --
 filter/source/config/cache/basecontainer.cxx  |2 +-
 filter/source/config/cache/filterfactory.cxx  |6 +++---
 filter/source/config/cache/typedetection.cxx  |2 +-
 filter/source/msfilter/svdfppt.cxx|2 +-
 framework/source/services/modulemanager.cxx   |2 +-
 sfx2/source/notify/eventsupplier.cxx  |4 ++--
 sfx2/source/view/ipclient.cxx |4 ++--
 9 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit f2d66c1c50f81a2694447e8b197eb6ac97f7
Author: Julien Nabet 
Date:   Wed Feb 1 22:52:43 2012 +0100

Some cppcheck cleaning

diff --git a/desktop/source/deployment/registry/dp_backend.cxx 
b/desktop/source/deployment/registry/dp_backend.cxx
index cbb1bec..f25c8a8 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -309,7 +309,7 @@ void PackageRegistryBackend::deleteUnusedFolders(
 //In case the folder containing all the data folder does not
 //exist yet, we ignore the exception
 if (e.Code != ucb::IOErrorCode_NOT_EXISTING)
-throw e;
+throw;
 }
 
 }
diff --git a/extensions/source/ole/oleobjw.cxx 
b/extensions/source/ole/oleobjw.cxx
index 9d203c8..de7abc0 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -2171,8 +2171,6 @@ Any  
IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
 BasicErrorException aBasicErrExp(message, 
Reference(), nErrorCode, message);
 throw InvocationTargetException(message, 
Reference(), makeAny(aBasicErrExp));
 // End add
-
-break;
 }
 case DISP_E_MEMBERNOTFOUND:
 message = OUSTR("[automation bridge]: A function with the name \"")
diff --git a/filter/source/config/cache/basecontainer.cxx 
b/filter/source/config/cache/basecontainer.cxx
index 7fa2faa..642c726 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -344,7 +344,7 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const 
::rtl::OUString& sItem)
 }
 catch(const css::container::NoSuchElementException& exNotExist)
 {
-throw exNotExist;
+throw;
 }
 catch(const css::uno::Exception&)
 {
diff --git a/filter/source/config/cache/filterfactory.cxx 
b/filter/source/config/cache/filterfactory.cxx
index 4620b3e..cbd1e7e 100644
--- a/filter/source/config/cache/filterfactory.cxx
+++ b/filter/source/config/cache/filterfactory.cxx
@@ -415,7 +415,7 @@ OUStringList 
FilterFactory::impl_queryMatchByDocumentService(const QueryTokenize
 lResult.push_back(sName);
 }
 catch(const css::uno::RuntimeException& exRun)
-{ throw exRun; }
+{ throw; }
 catch(const css::uno::Exception&)
 { continue; }
 }
@@ -540,7 +540,7 @@ OUStringList 
FilterFactory::impl_getListOfInstalledModules() const
 return lModules;
 }
 catch(const css::uno::RuntimeException& exRun)
-{ throw exRun; }
+{ throw; }
 catch(const css::uno::Exception&)
 {}
 
@@ -634,7 +634,7 @@ OUStringList 
FilterFactory::impl_readSortedFilterListFromConfig(const ::rtl::OUS
 }
 }
 catch(const css::uno::RuntimeException& exRun)
-{ throw exRun; }
+{ throw; }
 catch(const css::uno::Exception&)
 {}
 
diff --git a/filter/source/config/cache/typedetection.cxx 
b/filter/source/config/cache/typedetection.cxx
index 7a5ec96..0a06025 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -966,7 +966,7 @@ void 
TypeDetection::impl_seekStreamToZero(comphelper::MediaDescriptor& rDescript
 xSeek->seek(0);
 }
 catch(const css::uno::RuntimeException& exRun)
-{ throw exRun; }
+{ throw; }
 catch(const css::uno::Exception&)
 {}
 }
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 326c56f..2b9f19f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7319,7 +7319,7 @@ void ApplyCellAttributes( const SdrObject* pObj, 
Reference< XCell >& xCell )
 }
 }
 
-void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& 
xTable, const std::vector< sal_Int32 > vPositions, sal_Int32 nColumns )
+void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& 
xTable, const std::vector< sal_Int32 >& vPositions, sal_Int32 nColumns )
 {
 try
 {
diff --git a/framework/source/services/modulemanager.cxx 
b/framework/source/services/modulemanager.cxx
index 4cec298..9ae3cfd 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/s

[Libreoffice-commits] .: desktop/source

2012-02-01 Thread Petr Mladek
 desktop/source/migration/migration.cxx |   62 +
 1 file changed, 40 insertions(+), 22 deletions(-)

New commits:
commit 1205e9a816e6c38b8aa7ba6790017e5ed6c06033
Author: Petr Mladek 
Date:   Fri Jan 27 18:07:03 2012 +0100

allow to migrate the shared registrymodifications.xcu

LO-3.3 and older wrote configuration into many files under
user/registry/data. LO-3.4 spped up startup by moving these
files into a single /user/registrymodifications.xcu.

officecfg/registry/data/org/openoffice/Setup.xcu defines what registry
nodes are migrated and what are excluded.

Finally, the old migration code detected the name of the .xcu file
by the first entry in IncludedNodes. This fix allows to search
the data in the single registrymodifications.xcu when available.

diff --git a/desktop/source/migration/migration.cxx 
b/desktop/source/migration/migration.cxx
index c8d0c93..4df893a 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -772,33 +772,51 @@ void MigrationImpl::copyConfig() {
 }
 }
 }
+
+// check if the shared registrymodifications.xcu file exists
+bool bRegistryModificationsXcuExists = false;
+rtl::OUString regFilePath(m_aInfo.userdata);
+regFilePath += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/user/registrymodifications.xcu"));
+File regFile(regFilePath);
+::osl::FileBase::RC nError = regFile.open(osl_File_OpenFlag_Read);
+if ( nError == ::osl::FileBase::E_None ) {
+bRegistryModificationsXcuExists = true;
+regFile.close();
+}
+
 for (Components::const_iterator i(comps.begin()); i != comps.end(); ++i) {
 if (!i->second.includedPaths.empty()) {
-rtl::OUStringBuffer buf(m_aInfo.userdata);
-buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registry/data"));
-sal_Int32 n = 0;
-do {
-rtl::OUString seg(i->first.getToken(0, '.', n));
-rtl::OUString enc(
-rtl::Uri::encode(
-seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
-RTL_TEXTENCODING_UTF8));
-if (enc.isEmpty() && !seg.isEmpty()) {
-OSL_TRACE(
-("configuration migration component %s ignored (cannot"
- " be encoded as file path)"),
-rtl::OUStringToOString(
-i->first, RTL_TEXTENCODING_UTF8).getStr());
-goto next;
-}
-buf.append(sal_Unicode('/'));
-buf.append(enc);
-} while (n >= 0);
-buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu"));
+if (!bRegistryModificationsXcuExists) {
+// shared registrymodifications.xcu does not exists
+// the configuration is split in many registry files
+// determine the file names from the first element in included 
paths
+rtl::OUStringBuffer buf(m_aInfo.userdata);
+
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registry/data"));
+sal_Int32 n = 0;
+do {
+rtl::OUString seg(i->first.getToken(0, '.', n));
+rtl::OUString enc(
+rtl::Uri::encode(
+seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
+RTL_TEXTENCODING_UTF8));
+if (enc.isEmpty() && !seg.isEmpty()) {
+OSL_TRACE(
+("configuration migration component %s ignored 
(cannot"
+" be encoded as file path)"),
+rtl::OUStringToOString(
+i->first, RTL_TEXTENCODING_UTF8).getStr());
+goto next;
+}
+buf.append(sal_Unicode('/'));
+buf.append(enc);
+} while (n >= 0);
+buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu"));
+regFilePath = buf.toString();
+}
 configuration::Update::get(
 comphelper::getProcessComponentContext())->
 insertModificationXcuFile(
-buf.makeStringAndClear(), 
setToSeq(i->second.includedPaths),
+regFilePath, setToSeq(i->second.includedPaths),
 setToSeq(i->second.excludedPaths));
 } else {
 OSL_TRACE(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-01-24 Thread Tor Lillqvist
 desktop/source/app/app.cxx |8 
 desktop/source/app/userinstall.cxx |3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit d947fb8a6c69a9144ed2d00de4521e86925b0d48
Author: Tor Lillqvist 
Date:   Tue Jan 24 23:47:03 2012 +0200

WaE: "defined but not used" for stuff bypassed for Android

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index cf648b4..91c7531 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -130,7 +130,10 @@ namespace desktop
 static oslSignalHandler pSignalHandler = 0;
 static sal_Bool _bCrashReporterEnabled = sal_True;
 
+#ifndef ANDROID
 static ::rtl::OUString getBrandSharePreregBundledPathURL();
+#endif
+
 // 
 
 ResMgr* Desktop::GetDesktopResManager()
@@ -355,6 +358,8 @@ void ReplaceStringHookProc( UniString& rStr )
 static const char  pLastSyncFileName[] = "lastsynchronized";
 static const sal_Int32 nStrLenLastSync = 16;
 
+#ifndef ANDROID
+
 static bool needsSynchronization(
 ::rtl::OUString const & baseSynchronizedURL, ::rtl::OUString const & 
userSynchronizedURL )
 {
@@ -462,6 +467,9 @@ static ::rtl::OUString 
getLastSyncFileURLFromUserInstallation()
 
 return aTmp.makeStringAndClear();
 }
+
+#endif
+
 //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)
diff --git a/desktop/source/app/userinstall.cxx 
b/desktop/source/app/userinstall.cxx
index 72eb8f6..6b1672d 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -216,6 +216,7 @@ namespace desktop {
 return err;
 }
 
+#ifndef ANDROID
 static const char *pszSrcList[] = {
 "/presets",
 NULL
@@ -224,7 +225,7 @@ namespace desktop {
 "/user",
 NULL
 };
-
+#endif
 
 static UserInstall::UserInstallError create_user_install(OUString& 
aUserPath)
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2012-01-03 Thread Michael Stahl
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   60 +--
 1 file changed, 35 insertions(+), 25 deletions(-)

New commits:
commit fd982205e6fe6eb4333d22c3494931ab7f7b3faf
Author: Olivier Hallot 
Date:   Thu Dec 29 15:59:29 2011 -0200

Fix for FDO#44280: Wrong position in Extension Mgr

This patch fixes fdo 44280

[GUI] wrong position of 'Adding extension...' at Extension Manager dialog
Added some comments to help in hacking

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index a8c4455..416e567 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1177,6 +1177,8 @@ void ExtMgrDialog::Resize()
 Size aUpdBtnSize( m_aUpdateBtn.GetSizePixel() );
 long offsetX;
 
+// last row of the box, lower 4 buttons
+
 Point aPos( RSC_SP_DLG_INNERBORDER_LEFT,
 aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM - 
aBtnSize.Height() );
 
@@ -1191,42 +1193,25 @@ void ExtMgrDialog::Resize()
 aPos.X() -= ( RSC_SP_CTRL_GROUP_X + aBtnSize.Width() );
 m_aAddBtn.SetPosPixel( aPos );
 
+// horizontal line above lower buttons
+
 Size aDivSize( aTotalSize.Width(), LINE_SIZE );
 aPos = Point( 0, aPos.Y() - LINE_SIZE - RSC_SP_DLG_INNERBORDER_BOTTOM );
 m_aDivider.SetPosSizePixel( aPos, aDivSize );
 
+// text "get more extensions"
+
 Size aFTSize( m_aGetExtensions.CalcMinimumSize() );
-aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM );
+//aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM );
+aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - 
RSC_CD_PUSHBUTTON_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM );
 
 m_aGetExtensions.SetPosSizePixel( aPos, aFTSize );
 
-Size aCBSize(m_aBundledCbx.GetSizePixel());
-
-offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*(aCBSize.Width() + RSC_SP_CTRL_GROUP_X) );
-
-aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 
2*RSC_SP_DLG_INNERBORDER_BOTTOM);
-m_aBundledCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aSharedCbx.SetPosSizePixel(aPos, aCBSize);
-aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
-m_aUserCbx.SetPosSizePixel(aPos, aCBSize);
-
-Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel());
-aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
-
-m_aTypeOfExtTxt.SetPosSizePixel(aPos, aFTTypeOfExtSize);
-
-aPos.X() = RSC_SP_DLG_INNERBORDER_LEFT + aFTTypeOfExtSize.Width();
-aPos.Y() = aPos.Y() + RSC_CD_FIXEDTEXT_HEIGHT;
-aDivSize.Width() = aTotalSize.Width() - aFTTypeOfExtSize.Width() - 
RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT;
-m_aDivider2.SetPosSizePixel( aPos , aDivSize );
-
-
+// installation progress bar + cancel button , on the right of the text to get 
extensions
 
 aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - 
aBtnSize.Width();
 m_aCancelBtn.SetPosPixel( Point( aPos.X(), aPos.Y() - 
((aBtnSize.Height()-aFTSize.Height())/2) ) );
 
-
 // Calc progress height
 long nProgressHeight = aFTSize.Height();
 
@@ -1257,8 +1242,33 @@ void ExtMgrDialog::Resize()
 aPos.X() = aRect1.Right() + RSC_SP_DLG_INNERBORDER_LEFT;
 m_aProgressText.SetPosSizePixel( aPos, aFTSize );
 
+// checkboxes + text "type of extensions"
+
+Size aCBSize(m_aBundledCbx.GetSizePixel());
+
+offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT - 3*(aCBSize.Width() + RSC_SP_CTRL_GROUP_X) );
+
+aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 
2*RSC_SP_DLG_INNERBORDER_BOTTOM);
+m_aBundledCbx.SetPosSizePixel(aPos, aCBSize);
+aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
+m_aSharedCbx.SetPosSizePixel(aPos, aCBSize);
+aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
+m_aUserCbx.SetPosSizePixel(aPos, aCBSize);
+
+Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel());
+aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - 
RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
+
+m_aTypeOfExtTxt.SetPosSizePixel(aPos, aFTTypeOfExtSize);
+
+aPos.X() = RSC_SP_DLG_INNERBORDER_LEFT + aFTTypeOfExtSize.Width();
+aPos.Y() = aPos.Y() + RSC_CD_FIXEDTEXT_HEIGHT;
+aDivSize.Width() = aTotalSize.Width() - aFTTypeOfExtSize.Width() - 
RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT;
+m_aDivider2.SetPosSizePixel( aPos , aDivSize );
+
+// extension listbox
+
 Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT,
-aTotalSize.Height() - aBtnSize.Height() - LINE

[Libreoffice-commits] .: desktop/source sc/source svx/source

2011-12-11 Thread Julien Nabet
 desktop/source/deployment/manager/dp_manager.cxx |2 +-
 sc/source/filter/xml/xmlexprt.cxx|4 ++--
 svx/source/xml/xmlgrhlp.cxx  |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit eba2e6a9c32d5c5a7bdb4c8ccc515903b247c12d
Author: Julien Nabet 
Date:   Sun Dec 11 14:48:16 2011 +0100

Remove ByteString

diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 508d6bb..63720c5 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1037,7 +1037,7 @@ Reference 
PackageManagerImpl::getDeployedPackage_(
 if (INetContentTypes::parse( data.mediaType, type, subType, ¶ms ))
 {
 INetContentTypeParameter const * param = params.find(
-ByteString("platform") );
+rtl::OString("platform") );
 if (param != 0 && !platform_fits( param->m_sValue ))
 throw lang::IllegalArgumentException(
 getResourceString(RID_STR_NO_SUCH_PACKAGE) + id,
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 3ad8b8b..1757c6b 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1650,8 +1650,8 @@ void ScXMLExport::CopySourceStream( sal_Int32 
nStartOffset, sal_Int32 nEndOffset
 
 if ( getExportFlags() & EXPORT_PRETTY )
 {
-ByteString aOutStr("\n   ");
-uno::Sequence aOutSeq( 
(sal_Int8*)aOutStr.GetBuffer(), aOutStr.Len() );
+const rtl::OString aOutStr("\n   ");
+uno::Sequence aOutSeq( (sal_Int8*)aOutStr.getStr(), 
aOutStr.getLength() );
 xDestStream->writeBytes( aOutSeq );
 }
 
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 3fc611c..3d61519 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -548,11 +548,11 @@ String SvXMLGraphicHelper::ImplGetGraphicMimeType( const 
String& rFileName ) con
 
 if( ( rFileName.Len() >= 4 ) && ( rFileName.GetChar( rFileName.Len() - 4 ) 
== '.' ) )
 {
-const ByteString 
aExt(rtl::OUStringToOString(rFileName.Copy(rFileName.Len() - 3),
+const rtl::OString 
aExt(rtl::OUStringToOString(rFileName.Copy(rFileName.Len() - 3),
 RTL_TEXTENCODING_ASCII_US));
 
 for( long i = 0, nCount = SAL_N_ELEMENTS( aMapper ); ( i < nCount ) && 
!aMimeType.Len(); i++ )
-if( aExt == aMapper[ i ].pExt )
+if( aExt.getStr() == aMapper[ i ].pExt )
 aMimeType = String( aMapper[ i ].pMimeType, 
RTL_TEXTENCODING_ASCII_US );
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-12-07 Thread August Sodora
 desktop/source/app/app.cxx |   56 -
 1 file changed, 56 deletions(-)

New commits:
commit d697ecf6a0a69ffa929de38f2ef7e779a2d7360e
Author: August Sodora 
Date:   Thu Dec 8 00:59:57 2011 -0500

Remove unnecessary includes

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 49a060e..381508c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -26,22 +26,12 @@
  *
  /
 
-
-#include 
-#include 
-
-#include 
-#include 
 #include "app.hxx"
 #include "desktop.hrc"
-#include "appinit.hxx"
-#include "officeipcthread.hxx"
 #include "cmdlineargs.hxx"
-#include "desktopresid.hxx"
 #include "dispatchwatcher.hxx"
 #include "configinit.hxx"
 #include "lockfile.hxx"
-#include "cmdlinehelp.hxx"
 #include "userinstall.hxx"
 #include "desktopcontext.hxx"
 #include "exithelper.hxx"
@@ -53,101 +43,55 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
 
-#include 
-#include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "langselect.hxx"
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-11-29 Thread Michael Meeks
 desktop/source/deployment/gui/dp_gui.hrc |1 -
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   12 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit ecbf39171991069d794133797e5f8714c3d7d7f9
Author: Olivier Hallot 
Date:   Mon Nov 28 22:35:31 2011 -0200

Fix for fdo39748, part II

Code clenup
Improvement on extension list box size calculation

diff --git a/desktop/source/deployment/gui/dp_gui.hrc 
b/desktop/source/deployment/gui/dp_gui.hrc
index 0419e63..744cd21 100644
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -48,7 +48,6 @@
 #define RID_EM_FT_GET_EXTENSIONS   20
 #define RID_EM_FT_PROGRESS 21
 #define RID_EM_FT_MSG  22
-#define RID_EM_BTN_SELECT  23
 
 // local RIDs:
 #define PB_LICENSE_DOWN 50
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index fe92e19..23430b7 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1221,6 +1221,8 @@ void ExtMgrDialog::Resize()
 aDivSize.Width() = aTotalSize.Width() - aFTTypeOfExtSize.Width() - 
RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT;
 m_aDivider2.SetPosSizePixel( aPos , aDivSize );
 
+
+
 aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - 
aBtnSize.Width();
 m_aCancelBtn.SetPosPixel( Point( aPos.X(), aPos.Y() - 
((aBtnSize.Height()-aFTSize.Height())/2) ) );
 
@@ -1256,12 +1258,11 @@ void ExtMgrDialog::Resize()
 m_aProgressText.SetPosSizePixel( aPos, aFTSize );
 
 Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - 
RSC_SP_DLG_INNERBORDER_RIGHT,
-aTotalSize.Height() - 3.3*aBtnSize.Height() - LINE_SIZE -
-RSC_SP_DLG_INNERBORDER_TOP - 3*RSC_SP_DLG_INNERBORDER_BOTTOM );
-
-m_pExtensionBox->SetSizePixel( aSize );
-
+aTotalSize.Height() - aBtnSize.Height() - LINE_SIZE - 
aFTSize.Height()
+- aCBSize.Height() - aFTTypeOfExtSize.Height()
+- RSC_SP_DLG_INNERBORDER_TOP - 5*RSC_SP_DLG_INNERBORDER_BOTTOM 
);
 
+m_pExtensionBox->SetSizePixel(aSize );
 
 }
 
//--
@@ -1653,7 +1654,6 @@ void UpdateRequiredDialog::Resize()
 Size aDivSize( aTotalSize.Width(), LINE_SIZE );
 aPos = Point( 0, aPos.Y() - LINE_SIZE - RSC_SP_DLG_INNERBORDER_BOTTOM );
 m_aDivider.SetPosSizePixel( aPos, aDivSize );
-aPos = Point( 0, 5 );
 
 // Calc fixed text size
 aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-11-28 Thread Michael Meeks
 desktop/source/deployment/gui/dp_gui.hrc|5 +
 desktop/source/deployment/gui/dp_gui_dialog2.cxx|   84 ++--
 desktop/source/deployment/gui/dp_gui_dialog2.hxx|6 +
 desktop/source/deployment/gui/dp_gui_dialog2.src|   33 +++
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx |1 
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx  |1 
 desktop/source/deployment/gui/dp_gui_theextmgr.hxx  |3 
 7 files changed, 121 insertions(+), 12 deletions(-)

New commits:
commit a6efec83cee0ab447f9e6a5716aee5d2165f95c7
Author: Olivier Hallot 
Date:   Mon Nov 28 10:54:55 2011 -0200

Fix for bug fdo39748, Easy-hack Cleanup extension list.

This patch introduces 3 new check box in the extension manager GUI to allow 
selection of extension type to display: bundled, shared or user. Dialog is 
automatically updated upon toggling checkbox.

On toggling each checkbox, the extension list is recreated from scratch and 
packages are added to the list depending on the checkmark state. Initial state 
is all checks marked.

diff --git a/desktop/source/deployment/gui/dp_gui.hrc 
b/desktop/source/deployment/gui/dp_gui.hrc
index 4924051..0419e63 100644
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -41,9 +41,14 @@
 #define RID_EM_BTN_CHECK_UPDATES   13
 #define RID_EM_BTN_OPTIONS 14
 #define RID_EM_BTN_CANCEL  15
+#define RID_EM_FT_TYPE_EXTENSIONS  16
+#define RID_EM_CBX_BUNDLED 17
+#define RID_EM_CBX_SHARED  18
+#define RID_EM_CBX_USER19
 #define RID_EM_FT_GET_EXTENSIONS   20
 #define RID_EM_FT_PROGRESS 21
 #define RID_EM_FT_MSG  22
+#define RID_EM_BTN_SELECT  23
 
 // local RIDs:
 #define PB_LICENSE_DOWN 50
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 2301eff..fe92e19 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -26,7 +26,6 @@
  *
  /
 
-
 #include "dp_gui.hrc"
 #include "svtools/controldims.hrc"
 #include "svtools/svtools.hrc"
@@ -98,6 +97,10 @@ namespace dp_gui {
 #define PROGRESS_WIDTH  60
 #define PROGRESS_HEIGHT 14
 
+#define USER_PACKAGE_MANAGEROUSTR("user")
+#define SHARED_PACKAGE_MANAGER  OUSTR("shared")
+#define BUNDLED_PACKAGE_MANAGER OUSTR("bundled")
+
 
//--
 struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles >
 {
@@ -588,7 +591,7 @@ String DialogHelper::getResourceString( sal_uInt16 id )
 
//--
 bool DialogHelper::IsSharedPkgMgr( const uno::Reference< deployment::XPackage 
> &xPackage )
 {
-if ( xPackage->getRepositoryName().equals( OUSTR("shared") ) )
+if ( xPackage->getRepositoryName().equals( SHARED_PACKAGE_MANAGER ) )
 return true;
 else
 return false;
@@ -705,6 +708,11 @@ ExtMgrDialog::ExtMgrDialog( Window *pParent, 
TheExtensionManager *pManager ) :
 m_aCloseBtn( this,  getResId( RID_EM_BTN_CLOSE ) ),
 m_aHelpBtn( this,   getResId( RID_EM_BTN_HELP ) ),
 m_aDivider( this ),
+m_aDivider2(this),
+m_aTypeOfExtTxt( this , getResId( RID_EM_FT_TYPE_EXTENSIONS ) ),
+m_aBundledCbx(this, getResId (RID_EM_CBX_BUNDLED)),
+m_aSharedCbx(this,  getResId (RID_EM_CBX_SHARED)),
+m_aUserCbx (this,   getResId (RID_EM_CBX_USER)),
 m_aGetExtensions( this, getResId( RID_EM_FT_GET_EXTENSIONS ) ),
 m_aProgressText( this,  getResId( RID_EM_FT_PROGRESS ) ),
 m_aProgressBar( this,   WB_BORDER + WB_3DLOOK ),
@@ -732,6 +740,10 @@ ExtMgrDialog::ExtMgrDialog( Window *pParent, 
TheExtensionManager *pManager ) :
 m_aGetExtensions.SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) 
);
 m_aCancelBtn.SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) );
 
+m_aBundledCbx.SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
+m_aSharedCbx.SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
+m_aUserCbx.SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
+
 // resize update button
 Size aBtnSize = m_aUpdateBtn.GetSizePixel();
 String sTitle = m_aUpdateBtn.GetText();
@@ -750,9 +762,15 @@ ExtMgrDialog::ExtMgrDialog( Window *pParent, 
TheExtensionManager *pManager ) :
   (1 * m_aHelpBtn.GetSizePixel().Height()) +
   (1 * m_aGetExtensions.GetSizePixel().Height()) +
   (1 * m_pExtensionBox->GetMinOutputSizePixel().Height()) +
-  (3 * RSC_SP_DLG_INNERBORDER_LEFT) ) );
+  (3 * RSC_SP_DLG_INNERBORD

[Libreoffice-commits] .: desktop/source

2011-11-22 Thread Stephan Bergmann
 desktop/source/deployment/registry/component/dp_component.cxx |   72 +-
 1 file changed, 37 insertions(+), 35 deletions(-)

New commits:
commit f055e0e36134a54c445cdb351a5136736753714f
Author: Stephan Bergmann 
Date:   Tue Nov 22 21:19:35 2011 +0100

Upon startup, do not unnecesarily instantiate component service factories.

Discovered by Michael Meeks .

diff --git a/desktop/source/deployment/registry/component/dp_component.cxx 
b/desktop/source/deployment/registry/component/dp_component.cxx
index 6bf3736..2f15d44 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1198,7 +1198,7 @@ void BackendImpl::extractComponentData(
 componentLoader,
 rtl::OUString const * componentUrl)
 {
-OSL_ASSERT(context.is() && registry.is() && data != 0 && factories != 0);
+OSL_ASSERT(context.is() && registry.is() && data != 0);
 rtl::OUString registryName(registry->getKeyName());
 sal_Int32 prefix = registryName.getLength();
 if (!registryName.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM("/"))) {
@@ -1226,40 +1226,42 @@ void BackendImpl::extractComponentData(
 singletonKeys[j]->getKeyName().copy(prefix2), name));
 }
 }
-css::uno::Reference< css::loader::XImplementationLoader > loader;
-if (componentLoader == 0) {
-rtl::OUString activator(
-openRegistryKey(
-keys[i],
-rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("UNO/ACTIVATOR")))->
-getAsciiValue());
-loader.set(
-smgr->createInstanceWithContext(activator, context),
-css::uno::UNO_QUERY);
-if (!loader.is()) {
-throw css::deployment::DeploymentException(
-(rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM(
-"cannot instantiate loader ")) +
- activator),
-static_cast< OWeakObject * >(this), Any());
-}
-} else {
-OSL_ASSERT(componentLoader->is());
-loader = *componentLoader;
-}
-factories->push_back(
-loader->activate(
-name, rtl::OUString(),
-(componentUrl == 0
- ? (openRegistryKey(
+if (factories != 0) {
+css::uno::Reference< css::loader::XImplementationLoader > loader;
+if (componentLoader == 0) {
+rtl::OUString activator(
+openRegistryKey(
 keys[i],
 rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("UNO/LOCATION")))->
-getAsciiValue())
- : *componentUrl),
-keys[i]));
+RTL_CONSTASCII_USTRINGPARAM("UNO/ACTIVATOR")))->
+getAsciiValue());
+loader.set(
+smgr->createInstanceWithContext(activator, context),
+css::uno::UNO_QUERY);
+if (!loader.is()) {
+throw css::deployment::DeploymentException(
+(rtl::OUString(
+RTL_CONSTASCII_USTRINGPARAM(
+"cannot instantiate loader ")) +
+ activator),
+static_cast< OWeakObject * >(this), Any());
+}
+} else {
+OSL_ASSERT(componentLoader->is());
+loader = *componentLoader;
+}
+factories->push_back(
+loader->activate(
+name, rtl::OUString(),
+(componentUrl == 0
+ ? (openRegistryKey(
+keys[i],
+rtl::OUString(
+RTL_CONSTASCII_USTRINGPARAM("UNO/LOCATION")))->
+getAsciiValue())
+ : *componentUrl),
+keys[i]));
+}
 }
 }
 
@@ -1615,7 +1617,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
 data.javaTypeLibrary = true;
 }
 std::vector< css::uno::Reference< css::uno::XInterface > > factories;
-getComponentInfo(&data, &factories, context);
+getComponentInfo(&data, startup ? 0 : &factories, context);
 if (!startup) {
 that->componentLiveInsertion(data, factories);
 }
@@ -1956,7 +1958,7 @@ void BackendImpl::ComponentsPackageImpl::processPackage_(
 that->openRegistryKey(
 registry->getRootKey(),
 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IMPLEMENTATIONS"))),
-&data, &factories, 0, 0);
+&data, startup ? 0 : &factories, 0, 0);
 regist

[Libreoffice-commits] .: desktop/source

2011-11-16 Thread Caolán McNamara
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |   11 
--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 2fc7e56a6ce702645f9147a4ea2ec6fb85398380
Author: Caolán McNamara 
Date:   Wed Nov 16 20:38:11 2011 +

push/pop deprecated

diff --git 
a/desktop/source/deployment/registry/configuration/dp_configuration.cxx 
b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 83ecba9..f9d635a 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -226,15 +226,22 @@ BackendImpl::BackendImpl(
 deleteUnusedFolders(OUString(), folders);
 
 configmgrini_verify_init( xCmdEnv );
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
 ::std::auto_ptr pMap;
+SAL_WNODEPRECATED_DECLARATIONS_POP
 rtl::OUString aCompatURL( makeURL( getCachePath(), 
OUSTR("registered_packages.db") ) );
 
 // Don't create it if it doesn't exist already
 if ( ::utl::UCBContentHelper::Exists( expandUnoRcUrl( aCompatURL ) ) )
 {
-try {
+try
+{
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
 pMap = ::std::auto_ptr( new PersistentMap( 
aCompatURL ) );
-} catch (Exception &e) { // const uno::RunTimeException &e) {
+SAL_WNODEPRECATED_DECLARATIONS_POP
+}
+catch (const Exception &e)
+{
 rtl::OStringBuffer aStr( "Exception loading legacy package 
database: '" );
 aStr.append( rtl::OUStringToOString( e.Message, 
osl_getThreadTextEncoding() ) );
 aStr.append( "' - ignoring file, please remove it.\n" );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-11-16 Thread Michael Meeks
 desktop/source/deployment/dp_persmap.cxx  |   27 
+--
 desktop/source/deployment/inc/dp_persmap.h|5 -
 desktop/source/deployment/manager/dp_activepackages.cxx   |3 
 desktop/source/deployment/manager/dp_activepackages.hxx   |2 
 desktop/source/deployment/manager/dp_manager.cxx  |3 
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |   36 
+++---
 6 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 042247b3e428cb7352c06a670576819c67378090
Author: Michael Meeks 
Date:   Wed Nov 16 16:59:39 2011 +

Fixup legacy sleepycat db database usage for packages

Previously empty legacy registered_packages.db databases were created
unconditionally, at some efficiency and startup cost, despite these
being deprectated since before version 3.2.
We now handle version mismatches by warning on the console and ignoring
these files.

diff --git a/desktop/source/deployment/dp_persmap.cxx 
b/desktop/source/deployment/dp_persmap.cxx
index 92e4080..c09bb9b 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -79,35 +79,20 @@ PersistentMap::~PersistentMap()
 }
 
 
//__
-PersistentMap::PersistentMap( OUString const & url_, bool readOnly )
+PersistentMap::PersistentMap( OUString const & url )
 : m_db( 0, 0 )
 {
 try {
-OUString url( expandUnoRcUrl(url_) );
-if ( File::getSystemPathFromFileURL( url, m_sysPath ) != File::E_None )
-{
+rtl::OUString fileURL = expandUnoRcUrl(url);
+if ( File::getSystemPathFromFileURL( fileURL, m_sysPath ) != 
File::E_None )
 OSL_ASSERT( false );
-}
+
 OString cstr_sysPath(
 OUStringToOString( m_sysPath, RTL_TEXTENCODING_UTF8 ) );
-char const * pcstr_sysPath = cstr_sysPath.getStr();
-
-u_int32_t flags = DB_CREATE;
-if (readOnly) {
-flags = DB_RDONLY;
-if (! create_ucb_content(
-0, url,
-Reference(),
-false /* no throw */ )) {
-// ignore non-existent file in read-only mode: simulate empty 
db
-pcstr_sysPath = 0;
-flags = DB_CREATE;
-}
-}
-
 int err = m_db.open(
 // xxx todo: DB_THREAD, DB_DBT_MALLOC currently not used
-0, pcstr_sysPath, 0, DB_HASH, flags/* | DB_THREAD*/, 0664 /* fs 
mode */ );
+0, cstr_sysPath.getStr(), 0, DB_HASH,
+DB_CREATE/* | DB_THREAD*/, 0664 /* fs mode */ );
 if (err != 0)
 throw_rtexc(err);
 }
diff --git a/desktop/source/deployment/inc/dp_persmap.h 
b/desktop/source/deployment/inc/dp_persmap.h
index c078cf9..a81cef5 100644
--- a/desktop/source/deployment/inc/dp_persmap.h
+++ b/desktop/source/deployment/inc/dp_persmap.h
@@ -41,7 +41,8 @@ namespace dp_misc
 typedef ::boost::unordered_map<
 ::rtl::OString, ::rtl::OString, ::rtl::OStringHash > t_string2string_map;
 
-//==
+// Class to read obsolete registered extensions
+// should be removed for LibreOffice 4.0
 class PersistentMap
 {
 ::rtl::OUString m_sysPath;
@@ -50,7 +51,7 @@ class PersistentMap
 
 public:
 ~PersistentMap();
-PersistentMap( ::rtl::OUString const & url, bool readOnly );
+PersistentMap( ::rtl::OUString const & url );
 /** in mem db */
 PersistentMap();
 
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx 
b/desktop/source/deployment/manager/dp_activepackages.cxx
index f220aaf..47cc72f 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.cxx
@@ -127,8 +127,7 @@ namespace dp_manager {
 
 ActivePackages::ActivePackages() {}
 
-ActivePackages::ActivePackages(::rtl::OUString const & url, bool readOnly):
-m_map(url, readOnly) {}
+ActivePackages::ActivePackages(::rtl::OUString const & url) : m_map(url) {}
 
 ActivePackages::~ActivePackages() {}
 
diff --git a/desktop/source/deployment/manager/dp_activepackages.hxx 
b/desktop/source/deployment/manager/dp_activepackages.hxx
index 2a4d186..61057bc 100644
--- a/desktop/source/deployment/manager/dp_activepackages.hxx
+++ b/desktop/source/deployment/manager/dp_activepackages.hxx
@@ -71,7 +71,7 @@ public:
 
 ActivePackages();
 
-ActivePackages(::rtl::OUString const & url, bool readOnly);
+ActivePackages(::rtl::OUString const & url);
 
 ~ActivePackages();
 
diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 680dbf8..0e88d1f 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -198,8 

[Libreoffice-commits] .: desktop/source

2011-11-14 Thread Norbert Thiebaud
 desktop/source/app/copyright_ascii_sun.c |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit 9ba9707611e08b936ea800cbc9cd4270d0c19aae
Author: Norbert Thiebaud 
Date:   Mon Nov 14 21:41:48 2011 -0600

remove unused desktop/source/app/copyright_ascii_sun.c

diff --git a/desktop/source/app/copyright_ascii_sun.c 
b/desktop/source/app/copyright_ascii_sun.c
deleted file mode 100644
index c7d6e7e..000
--- a/desktop/source/app/copyright_ascii_sun.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
- /*
-  * copyright text to see as text in the soffice binary
-  *
-  */
-
-const char copyright_text_1[] = "Copyright © 2000, 2010 Oracle and/or its 
affiliates, All rights reserved.";
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-10-31 Thread Stephan Bergmann
 desktop/source/deployment/registry/dp_backend.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 0c13fbb5bd4cbb0dd8c26b6a168d22a695dd11d6
Author: Stephan Bergmann 
Date:   Mon Oct 31 09:04:33 2011 +0100

Improved an OSL_FAIL.

diff --git a/desktop/source/deployment/registry/dp_backend.cxx 
b/desktop/source/deployment/registry/dp_backend.cxx
index cbb0bf5..672364d 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -677,8 +677,13 @@ void Package::processPackage_impl(
  xCmdEnv );
 }
 }
-catch (RuntimeException &) {
-OSL_FAIL( "### unexpected RuntimeException!" );
+catch (RuntimeException &e) {
+(void) e; // avoid warnings
+OSL_FAIL(
+OSL_FORMAT(
+"unexpected RuntimeException \"%s\"",
+(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
+ getStr(;
 throw;
 }
 catch (CommandFailedException &) {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-10-05 Thread Caolán McNamara
 desktop/source/deployment/registry/dp_registry.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 06ae02404e0d4d72f4150e8b33b491457255428e
Author: Caolán McNamara 
Date:   Wed Oct 5 10:44:07 2011 +0100

cast gone

diff --git a/desktop/source/deployment/registry/dp_registry.cxx 
b/desktop/source/deployment/registry/dp_registry.cxx
index 9e799dd..36dc8f0 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -285,7 +285,8 @@ void PackageRegistryImpl::insertBackend(
 }
 }
 #if OSL_DEBUG_LEVEL > 0
-else {
+else
+{
 ::rtl::OUStringBuffer buf;
 buf.appendAscii(
 RTL_CONSTASCII_STRINGPARAM(
@@ -299,7 +300,7 @@ void PackageRegistryImpl::insertBackend(
 buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") );
 OSL_FAIL( ::rtl::OUStringToOString(
 buf.makeStringAndClear(),
-RTL_TEXTENCODING_UTF8 ) );
+RTL_TEXTENCODING_UTF8).getStr() );
 }
 #endif
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-10-04 Thread Caolán McNamara
 desktop/source/app/app.cxx |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 4e4bfa470c5376e77aa15c40ae9fa970da962829
Author: Caolán McNamara 
Date:   Tue Oct 4 12:28:53 2011 +0100

verbose error message please

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 1cb3f30..fb1da91 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -767,18 +767,19 @@ void Desktop::InitFinished()
 // on Unix command line args needs to be checked before Desktop::Init()
 void Desktop::ensureProcessServiceFactory()
 {
-if (!comphelper::getProcessServiceFactory().is()) {
-try {
+if (!comphelper::getProcessServiceFactory().is())
+{
+try
+{
 comphelper::setProcessServiceFactory(
 CreateApplicationServiceManager());
-} catch (css::uno::Exception & e) {
-OSL_TRACE(
-OSL_LOG_PREFIX "caught UNO exception with message \"%s\"",
-rtl::OUStringToOString(
-e.Message, RTL_TEXTENCODING_UTF8).getStr());
+}
+catch (const css::uno::Exception& e)
+{
+OSL_FAIL(rtl::OUStringToOString(e.Message, 
osl_getThreadTextEncoding()).getStr());
+// let exceptions escape and tear down the process, it is
+// completely broken anyway
 throw;
-// let exceptions escape and tear down the process, it is
-// completely broken anyway
 }
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-09-21 Thread Andras Timar
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit bf65a6ebc6dd319ae0fb24ba89e750490e18fdd8
Author: Andras Timar 
Date:   Wed Sep 21 22:17:43 2011 +0200

include dp_gui_theextmgr.hxx only once

diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx 
b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index c86d3e2..1d90229 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -41,7 +41,6 @@
 #include "dp_gui_dialog2.hxx"
 #include "dp_gui_extensioncmdqueue.hxx"
 #include "dp_gui_theextmgr.hxx"
-#include "dp_gui_theextmgr.hxx"
 #include "dp_identifier.hxx"
 #include "dp_update.hxx"
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits