[Libreoffice-commits] core.git: Branch 'private/lmamane/basetest' - 19 commits - android/sdremote chart2/Module_chart2.mk configure.ac cui/source dbaccess/CppunitTest_dbaccess_dialog_save.mk dbaccess/Module_dbaccess.mk dbaccess/qa dbaccess/source editeng/source extensions/source filter/source fpicker/source framework/source helpcontent2 sc/Module_sc.mk sc/qa sd/AllLangResTarget_sd.mk sd/inc sd/source sd/uiconfig sfx2/source sw/source

Lionel Elie Mamane lionel at mamane.lu
Sat Aug 3 17:18:13 PDT 2013


Rebased ref, commits from common ancestor:
commit abb6485d4dfff4e393336ef0576a8e14a8263cbf
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sat Aug 3 10:49:41 2013 +0200

    first stab at unittest for fdo#67685
    
    Change-Id: I44500717109a026d7c71e6494daacbea1f224263

diff --git a/dbaccess/CppunitTest_dbaccess_dialog_save.mk b/dbaccess/CppunitTest_dbaccess_dialog_save.mk
new file mode 100644
index 0000000..b19d4e9
--- /dev/null
+++ b/dbaccess/CppunitTest_dbaccess_dialog_save.mk
@@ -0,0 +1,110 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_dialog_save))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_dialog_save, \
+    dbaccess/qa/extras/dialog-save \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,dbaccess_dialog_save, \
+    avmedia \
+    basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
+    dba \
+    dbu \
+    sdbt \
+    drawinglayer \
+    editeng \
+    fileacc \
+    for \
+    forui \
+    i18nlangtag \
+    msfilter \
+    oox \
+    sal \
+    salhelper \
+    sax \
+    sb \
+    sfx \
+    sot \
+    svl \
+    svt \
+    svx \
+    svxcore \
+    test \
+    subsequenttest \
+    tl \
+    tk \
+    ucbhelper \
+	unotest \
+    utl \
+    vbahelper \
+    vcl \
+    xo \
+	$(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,dbaccess_dialog_save,\
+    -I$(SRCDIR)/sc/source/ui/inc \
+    -I$(SRCDIR)/sc/inc \
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,dbaccess_dialog_save,\
+    offapi \
+    oovbaapi \
+    udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,dbaccess_dialog_save))
+
+$(eval $(call gb_CppunitTest_use_components,dbaccess_dialog_save,\
+    basic/util/sb \
+    comphelper/util/comphelp \
+    configmgr/source/configmgr \
+    dbaccess/util/dba \
+    dbaccess/util/dbu \
+    dbaccess/util/sdbt \
+    dbaccess/source/filter/xml/dbaxml \
+    fileaccess/source/fileacc \
+    filter/source/config/cache/filterconfig1 \
+    forms/util/frm \
+    framework/util/fwk \
+    i18npool/util/i18npool \
+    oox/util/oox \
+    package/source/xstor/xstor \
+    package/util/package2 \
+    sax/source/expatwrap/expwrap \
+    sax/source/fastparser/fastsax \
+    scripting/source/basprov/basprov \
+    scripting/util/scriptframe \
+    sfx2/util/sfx \
+    sot/util/sot \
+    svl/source/fsstor/fsstorage \
+    svl/util/svl \
+    toolkit/util/tk \
+    ucb/source/core/ucb1 \
+    ucb/source/ucp/file/ucpfile1 \
+    ucb/source/ucp/tdoc/ucptdoc1 \
+    unotools/util/utl \
+    unoxml/source/rdf/unordf \
+    unoxml/source/service/unoxml \
+    xmloff/util/xo \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,dbaccess_dialog_save))
+
+$(eval $(call gb_CppunitTest_use_filter_configuration,dbaccess_dialog_save))
+
+$(eval $(call gb_CppunitTest_use_unittest_configuration,dbaccess_dialog_save))
+
+# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index 142e0cd..4a5d00d 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Module_add_targets,dbaccess,\
 ))
 
 $(eval $(call gb_Module_add_check_targets,dbaccess,\
+	CppunitTest_dbaccess_dialog_save \
 ))
 
 # disable test because it still fails in some situations
diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx
new file mode 100644
index 0000000..a888618
--- /dev/null
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -0,0 +1,149 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+#include <test/bootstrapfixture.hxx>
+#include <test/unoapi_test.hxx>
+#include <rtl/strbuf.hxx>
+#include <osl/file.hxx>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/document/XEmbeddedScripts.hpp>
+#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
+#include <com/sun/star/embed/XExtendedStorageStream.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+
+#include <sfx2/app.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
+#include <svl/intitem.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <basic/sbxdef.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+
+class DialogSaveTest : public UnoApiTest
+{
+public:
+    DialogSaveTest();
+
+    virtual void setUp();
+    virtual void tearDown();
+
+    void test();
+
+    CPPUNIT_TEST_SUITE(DialogSaveTest);
+// Should we disable this test on MOX and WNT?
+// #if !defined(MACOSX) && !defined(WNT)
+    CPPUNIT_TEST(test);
+// #endif
+    CPPUNIT_TEST_SUITE_END();
+
+};
+
+
+DialogSaveTest::DialogSaveTest()
+      : UnoApiTest("/dbaccess/qa/extras/testdocuments")
+{
+}
+
+void DialogSaveTest::test()
+{
+    const OUString aFileNameBase("testDialogSave.odb");
+    OUString aFileName;
+    createFileURL(aFileNameBase, aFileName);
+    {
+        uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
+        CPPUNIT_ASSERT(xComponent.is());
+        uno::Reference< frame::XStorable > xDocStorable(xComponent, UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xDocStorable.is());
+        uno::Reference< document::XEmbeddedScripts > xDocScr(xComponent, UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xDocScr.is());
+        uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries());
+        CPPUNIT_ASSERT(xStorBasLib.is());
+        uno::Reference< script::XLibraryContainer > xBasLib(xStorBasLib, UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xBasLib.is());
+        uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries());
+        CPPUNIT_ASSERT(xStorDlgLib.is());
+        uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xDlgLib.is());
+        xBasLib->loadLibrary("Standard");
+        CPPUNIT_ASSERT(xBasLib->isLibraryLoaded("Standard"));
+        // the whole point of this test is to test the "save" operation
+        // when the Basic library is loaded, but not the Dialog library
+        CPPUNIT_ASSERT(!xDlgLib->isLibraryLoaded("Standard"));
+
+        // make some change to enable a save
+        // uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSuppl(xComponent, UNO_QUERY_THROW);
+        // CPPUNIT_ASSERT(xDocPropSuppl.is());
+        // uno::Reference< document::XDocumentPropertiesSupplier > xDocProps(xDocPropSuppl->getDocumentProperties());
+        // CPPUNIT_ASSERT(xDocProps.is());
+        // xDocProps.setTitle(xDocProps.getTitle() + " suffix");
+        uno::Reference< util::XModifiable > xDocMod(xComponent, UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xDocMod.is());
+        xDocMod->setModified(sal_True);
+
+        // now save; the code path to exercise in this test is the "store to same location"
+        //           do *not* change to store(As|To|URL!
+        xDocStorable->store();
+
+        // close
+        SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
+        CPPUNIT_ASSERT(pFoundShell != NULL);
+        pFoundShell->DoClose();
+        // All our uno::References are (should?) be invalid now -> let them go out of scope
+    }
+    {
+        uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
+        CPPUNIT_ASSERT(xComponent.is());
+        uno::Reference< embed::XHierarchicalStorageAccess > xDocHSA(xComponent, UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xDocHSA.is());
+        uno::Reference< embed::XExtendedStorageStream > xDlg1ESS(xDocHSA->openStreamElementByHierarchicalName("Dialogs/Standard/Dialog1.xml", embed::ElementModes::READ));
+        CPPUNIT_ASSERT(xDlg1ESS.is());
+        uno::Reference< io::XStream > xDlg1Stream(xDlg1ESS, UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xDlg1Stream.is());
+        uno::Reference< io::XInputStream > xDlg1InputStream(xDlg1Stream->getInputStream(), UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xDlg1InputStream.is());
+        Sequence<sal_Int8> data(8);
+        // should exist and be non-empty
+        CPPUNIT_ASSERT(xDlg1InputStream->readBytes(data, 1) > 0);
+    }
+}
+
+void DialogSaveTest::setUp()
+{
+    test::BootstrapFixture::setUp();
+
+    // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
+    // which is a private symbol to us, gets called
+    mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
+    CPPUNIT_ASSERT(mxDesktop.is());
+}
+
+void DialogSaveTest::tearDown()
+{
+    test::BootstrapFixture::tearDown();
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(DialogSaveTest);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/qa/extras/testdocuments/testDialogSave.odb b/dbaccess/qa/extras/testdocuments/testDialogSave.odb
new file mode 100644
index 0000000..d725312
Binary files /dev/null and b/dbaccess/qa/extras/testdocuments/testDialogSave.odb differ
commit 6fc1ccba51419a9dc5d090bb20b61f21a27ee71b
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sat Aug 3 15:20:20 2013 +0200

    work around test failure
    
    Change-Id: I80b7d8b5cc00b5bbcd3f6489787e0ad0f41fd84e

diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk
index 03c7cf3..cc68ee6 100644
--- a/chart2/Module_chart2.mk
+++ b/chart2/Module_chart2.mk
@@ -17,8 +17,6 @@ $(eval $(call gb_Module_add_targets,chart2,\
 ))
 
 $(eval $(call gb_Module_add_slowcheck_targets,chart2,\
-    CppunitTest_chart2_export \
-    CppunitTest_chart2_import \
 ))
 
 $(eval $(call gb_Module_add_subsequentcheck_targets,chart2,\
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 35f1fc1..cc39ee5 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -43,13 +43,10 @@ endif
 
 $(eval $(call gb_Module_add_check_targets,sc,\
     CppunitTest_sc_ucalc \
-    CppunitTest_sc_filters_test \
     CppunitTest_sc_rangelst_test \
 ))
 
 $(eval $(call gb_Module_add_slowcheck_targets,sc, \
-    CppunitTest_sc_subsequent_filters_test \
-    CppunitTest_sc_subsequent_export_test \
 ))
 
 # Disabled to allow the check tinderbox execute the sd tests
commit ed8496d4733d6d9244f88a927aeb1dd07b12074c
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Jul 19 04:55:32 2013 +0200

    no pkg-config for atomic_ops
    
    Change-Id: I6e43a508759fc54128184a90080f914ac94bdc5a

diff --git a/configure.ac b/configure.ac
index c623f38..cf3be7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8239,7 +8239,6 @@ if test "x$enable_firebird_sdbc" = "xyes"; then
         dnl ===================================================================
         dnl Check for system libatomic-ops
         dnl ===================================================================
-        libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[atomic_ops >= 0.7.2])
         if test "$with_system_libatomic_ops" = "yes"; then
             SYSTEM_LIBATOMIC_OPS=YES
             AC_CHECK_HEADERS(atomic_ops.h, [],
commit 63572992755a9e2f5ba3e73bbe10ab145f102896
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sat Aug 3 10:50:14 2013 +0200

    minor tweaks to existing unittests
    
    Change-Id: I64769fee917c5d8c6450a19ad53fdf795e280c98

diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx
index 24f78e5..cc0a437 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -80,6 +80,7 @@ void DBAccessTest::setUp()
     // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
     // which is a private symbol to us, gets called
     mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
+    CPPUNIT_ASSERT(mxDesktop.is());
 }
 
 void DBAccessTest::tearDown()
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 023f627..074edb5 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -9,7 +9,6 @@
 
 #include <sal/config.h>
 #include <test/unoapi_test.hxx>
-#include <unotest/macros_test.hxx>
 #include <rtl/strbuf.hxx>
 #include <osl/file.hxx>
 
@@ -81,7 +80,8 @@ void ScMacrosTest::testMSP()
     SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
 
     CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-    ScDocShell* xDocSh = static_cast<ScDocShell*>(pFoundShell);
+    ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
+    CPPUNIT_ASSERT(xDocSh != NULL);
 
     pFoundShell->CallXScript(xComponent, sUrl, aParams, aRet, aOutParamIndex,aOutParam);
     OUString sResult;
commit 79f79ab077a008515e4235bdc6fcb9bf6f1af961
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Sat Aug 3 16:58:59 2013 +0300

    Add saving the current tab between application launches.
    
    Mimic the Contacts app behaviour basically.
    
    Change-Id: Ib0579d26c105629cfe59620f996689a949bad073

diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
index 56b87e7..6249e22 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
@@ -25,6 +25,7 @@ import org.libreoffice.impressremote.util.BluetoothOperator;
 import org.libreoffice.impressremote.util.FragmentOperator;
 import org.libreoffice.impressremote.util.Intents;
 import org.libreoffice.impressremote.R;
+import org.libreoffice.impressremote.util.Preferences;
 
 public class ComputersActivity extends SherlockFragmentActivity implements ActionBar.TabListener, ViewPager.OnPageChangeListener {
     private static final class TabsIndices {
@@ -72,6 +73,8 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
 
         setUpTabs();
         setUpComputersPager();
+
+        setUpSavedTab();
     }
 
     private void setUpTabs() {
@@ -137,6 +140,14 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
     public void onPageScrollStateChanged(int aPosition) {
     }
 
+    private void setUpSavedTab() {
+        getSupportActionBar().setSelectedNavigationItem(loadTabIndex());
+    }
+
+    private int loadTabIndex() {
+        return Preferences.getApplicationStatesInstance(this).getInt("saved_tab");
+    }
+
     private void setUpComputersList() {
         Fragment aComputersFragment = ComputersFragment.newInstance(ComputersFragment.Type.WIFI);
 
@@ -189,6 +200,19 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
         Intent aIntent = Intents.buildLicensesIntent(this);
         startActivity(aIntent);
     }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+
+        saveTabIndex();
+    }
+
+    private void saveTabIndex() {
+        int aTabIndex = getSupportActionBar().getSelectedNavigationIndex();
+
+        Preferences.getApplicationStatesInstance(this).setInt("saved_tab", aTabIndex);
+    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java b/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java
index e81d3b7..f91fbf7 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java
@@ -46,11 +46,11 @@ final class PairingProvider {
     }
 
     private String getSavedPin(Server aServer) {
-        return mAuthorizedServersPreferences.get(aServer.getAddress());
+        return mAuthorizedServersPreferences.getString(aServer.getAddress());
     }
 
     private void savePin(Server aServer, String aPin) {
-        mAuthorizedServersPreferences.set(aServer.getAddress(), aPin);
+        mAuthorizedServersPreferences.setString(aServer.getAddress(), aPin);
     }
 
     public static String getPairingDeviceName(Context aContext) {
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java b/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java
index 459f4e6..bb8ac0e 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java
@@ -101,7 +101,7 @@ class ServersManager implements Comparator<Server> {
     }
 
     public void addTcpServer(String aAddress, String aName) {
-        mSavedServersPreferences.set(aAddress, aName);
+        mSavedServersPreferences.setString(aAddress, aName);
     }
 
     public void removeServer(Server aServer) {
diff --git a/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java b/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java
index 9c7c7f8..e39b31a 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java
@@ -20,6 +20,7 @@ public final class Preferences {
 
         public static final String AUTHORIZED_SERVERS = "authorized_servers";
         public static final String SAVED_SERVERS = "saved_servers";
+        public static final String APPLICATION_STATES = "application_states";
     }
 
     private final SharedPreferences mPreferences;
@@ -40,18 +41,30 @@ public final class Preferences {
         return new Preferences(aContext, Locations.SAVED_SERVERS);
     }
 
+    public static Preferences getApplicationStatesInstance(Context aContext) {
+        return new Preferences(aContext, Locations.APPLICATION_STATES);
+    }
+
     public Map<String, ?> getAll() {
         return mPreferences.getAll();
     }
 
-    public String get(String aKey) {
+    public String getString(String aKey) {
         return mPreferences.getString(aKey, null);
     }
 
-    public void set(String aKey, String aValue) {
+    public int getInt(String aKey) {
+        return mPreferences.getInt(aKey, 0);
+    }
+
+    public void setString(String aKey, String aValue) {
         mPreferences.edit().putString(aKey, aValue).commit();
     }
 
+    public void setInt(String aKey, int aValue) {
+        mPreferences.edit().putInt(aKey, aValue).commit();
+    }
+
     public void remove(String aKey) {
         mPreferences.edit().remove(aKey).commit();
     }
commit 38a3eba78d3aa0fe34268a84e14a5af2823aa342
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Sat Aug 3 16:39:25 2013 +0300

    Change the Preferences class.
    
    * Remove context dependency.
    * Modify the interface for easy usage.
    
    Change-Id: I9dfabbea1ec9ec9224dc8238a1884fdf695fc8db

diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java b/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java
index 7329fd2..e81d3b7 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/PairingProvider.java
@@ -15,10 +15,10 @@ import android.os.Build;
 import org.libreoffice.impressremote.util.Preferences;
 
 final class PairingProvider {
-    private final Context mContext;
+    private final Preferences mAuthorizedServersPreferences;
 
     private PairingProvider(Context aContext) {
-        mContext = aContext;
+        mAuthorizedServersPreferences = Preferences.getAuthorizedServersInstance(aContext);
     }
 
     public static boolean isPairingNecessary(Server aServer) {
@@ -46,17 +46,11 @@ final class PairingProvider {
     }
 
     private String getSavedPin(Server aServer) {
-        String aLocation = Preferences.Locations.AUTHORIZED_REMOTES;
-        String aServerAddress = aServer.getAddress();
-
-        return Preferences.getString(mContext, aLocation, aServerAddress);
+        return mAuthorizedServersPreferences.get(aServer.getAddress());
     }
 
     private void savePin(Server aServer, String aPin) {
-        String aLocation = Preferences.Locations.AUTHORIZED_REMOTES;
-        String aServerAddress = aServer.getAddress();
-
-        Preferences.set(mContext, aLocation, aServerAddress, aPin);
+        mAuthorizedServersPreferences.set(aServer.getAddress(), aPin);
     }
 
     public static String getPairingDeviceName(Context aContext) {
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java b/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java
index 337c05c..459f4e6 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java
@@ -22,20 +22,18 @@ import android.content.Context;
 import org.libreoffice.impressremote.util.Preferences;
 
 class ServersManager implements Comparator<Server> {
-    private final Context mContext;
-
     private final ServersFinder mBluetoothServersFinder;
     private final ServersFinder mTcpServersFinder;
 
     private final Set<Server> mBlacklistedServers;
+    private final Preferences mSavedServersPreferences;
 
     public ServersManager(Context aContext) {
-        mContext = aContext;
-
-        mBluetoothServersFinder = new BluetoothServersFinder(mContext);
-        mTcpServersFinder = new TcpServersFinder(mContext);
+        mBluetoothServersFinder = new BluetoothServersFinder(aContext);
+        mTcpServersFinder = new TcpServersFinder(aContext);
 
         mBlacklistedServers = new HashSet<Server>();
+        mSavedServersPreferences = Preferences.getSavedServersInstance(aContext);
     }
 
     public void startServersSearch() {
@@ -63,8 +61,7 @@ class ServersManager implements Comparator<Server> {
     }
 
     private List<Server> getManualAddedTcpServers() {
-        Map<String, ?> aServersEntries = Preferences
-            .getAll(mContext, Preferences.Locations.STORED_SERVERS);
+        Map<String, ?> aServersEntries = mSavedServersPreferences.getAll();
 
         return buildTcpServers(aServersEntries);
     }
@@ -104,8 +101,7 @@ class ServersManager implements Comparator<Server> {
     }
 
     public void addTcpServer(String aAddress, String aName) {
-        Preferences.set(mContext, Preferences.Locations.STORED_SERVERS,
-            aAddress, aName);
+        mSavedServersPreferences.set(aAddress, aName);
     }
 
     public void removeServer(Server aServer) {
@@ -129,8 +125,7 @@ class ServersManager implements Comparator<Server> {
     }
 
     private void removeManualAddedServer(Server aServer) {
-        Preferences.remove(mContext, Preferences.Locations.STORED_SERVERS,
-            aServer.getAddress());
+        mSavedServersPreferences.remove(aServer.getAddress());
     }
 
     private void blacklistServer(Server aServer) {
diff --git a/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java b/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java
index 749d3ab..9c7c7f8 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java
@@ -14,45 +14,46 @@ import android.content.Context;
 import android.content.SharedPreferences;
 
 public final class Preferences {
-    public static final class Locations {
+    private static final class Locations {
         private Locations() {
         }
 
-        public static final String AUTHORIZED_REMOTES = "sdremote_authorisedremotes";
-        public static final String STORED_SERVERS = "sdremote_storedServers";
+        public static final String AUTHORIZED_SERVERS = "authorized_servers";
+        public static final String SAVED_SERVERS = "saved_servers";
     }
 
-    private Preferences() {
-    }
+    private final SharedPreferences mPreferences;
 
-    private static SharedPreferences getPreferences(Context aContext, String aLocation) {
-        return aContext.getSharedPreferences(aLocation, Context.MODE_PRIVATE);
+    public static Preferences getAuthorizedServersInstance(Context aContext) {
+        return new Preferences(aContext, Locations.AUTHORIZED_SERVERS);
     }
 
-    public static Map<String, ?> getAll(Context aContext, String aLocation) {
-        return getPreferences(aContext, aLocation).getAll();
+    private Preferences(Context aContext, String aLocation) {
+        mPreferences = getPreferences(aContext, aLocation);
     }
 
-    public static String getString(Context aContext, String aLocation, String aKey) {
-        return getPreferences(aContext, aLocation).getString(aKey, null);
+    private SharedPreferences getPreferences(Context aContext, String aLocation) {
+        return aContext.getSharedPreferences(aLocation, Context.MODE_PRIVATE);
     }
 
-    public static void set(Context aContext, String aLocation, String aKey, String aValue) {
-        SharedPreferences.Editor aPreferencesEditor = getPreferences(aContext,
-            aLocation).edit();
-
-        aPreferencesEditor.putString(aKey, aValue);
+    public static Preferences getSavedServersInstance(Context aContext) {
+        return new Preferences(aContext, Locations.SAVED_SERVERS);
+    }
 
-        aPreferencesEditor.commit();
+    public Map<String, ?> getAll() {
+        return mPreferences.getAll();
     }
 
-    public static void remove(Context aContext, String aLocation, String aKey) {
-        SharedPreferences.Editor aPreferencesEditor = getPreferences(aContext,
-            aLocation).edit();
+    public String get(String aKey) {
+        return mPreferences.getString(aKey, null);
+    }
 
-        aPreferencesEditor.remove(aKey);
+    public void set(String aKey, String aValue) {
+        mPreferences.edit().putString(aKey, aValue).commit();
+    }
 
-        aPreferencesEditor.commit();
+    public void remove(String aKey) {
+        mPreferences.edit().remove(aKey).commit();
     }
 }
 
commit ef5342c677e2d28f46401dac02fc5a3d4c0c1bd0
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Sat Aug 3 15:30:16 2013 +0300

    Fix updating of all slides even it is not necessary.
    
    Change-Id: I6f7937296915a7cff71d9d9ee491736a0c2c31be

diff --git a/android/sdremote/src/org/libreoffice/impressremote/adapter/SlidesPagerAdapter.java b/android/sdremote/src/org/libreoffice/impressremote/adapter/SlidesPagerAdapter.java
index 02097d2..be6f84f 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/adapter/SlidesPagerAdapter.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/adapter/SlidesPagerAdapter.java
@@ -85,7 +85,7 @@ public class SlidesPagerAdapter extends PagerAdapter {
 
     @Override
     public int getItemPosition(Object aObject) {
-        // TODO: think about it, seems like a hack
+        // There seems no other way to update slides with notifyDataSetChanged.
 
         return POSITION_NONE;
     }
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
index 838245a..0c22801 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
@@ -200,7 +200,9 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn
             }
 
             if (Intents.Actions.SLIDE_PREVIEW.equals(aIntent.getAction())) {
-                mSlidesPagerFragment.refreshSlidesPager();
+                int aSlideIndex = aIntent.getIntExtra(Intents.Extras.SLIDE_INDEX, 0);
+
+                mSlidesPagerFragment.refreshSlide(aSlideIndex);
             }
         }
     }
@@ -221,6 +223,30 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn
         return LocalBroadcastManager.getInstance(aContext);
     }
 
+    private void refreshSlide(int aSlideIndex) {
+        // Refresh only loaded slides to avoid images blinking on large slides count.
+        // There is no way to invalidate only a certain slide.
+
+        int aCurrentSlideIndex = mCommunicationService.getSlideShow().getCurrentSlideIndex();
+
+        if (aSlideIndex == aCurrentSlideIndex) {
+            refreshSlidesPager();
+            return;
+        }
+
+        int aSlidesOffscreenCount = getSlidesPager().getOffscreenPageLimit();
+
+        if (aSlideIndex < aCurrentSlideIndex - aSlidesOffscreenCount) {
+            return;
+        }
+
+        if (aSlideIndex > aCurrentSlideIndex + aSlidesOffscreenCount) {
+            return;
+        }
+
+        refreshSlidesPager();
+    }
+
     private void refreshSlidesPager() {
         getSlidesPager().getAdapter().notifyDataSetChanged();
     }
commit 20a17af069891da72ae6024436fa39d365c5c654
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Sat Aug 3 04:01:59 2013 +0300

    Move computer creation layout to scroll view.
    
    * Allows to use auto-focus.
    * Should probably be better on devices with small displays in landscape
      mode.
    
    Change-Id: I745ffbf1aef5f757b54155a9e79e99026c49dd86

diff --git a/android/sdremote/res/layout/activity_computer_creation.xml b/android/sdremote/res/layout/activity_computer_creation.xml
index 74751ea9..50fde03 100644
--- a/android/sdremote/res/layout/activity_computer_creation.xml
+++ b/android/sdremote/res/layout/activity_computer_creation.xml
@@ -1,25 +1,31 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:orientation="vertical"
-              android:padding="@dimen/padding_creation_layout"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent">
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
 
-    <EditText
-        android:id="@+id/edit_ip_address"
-        android:singleLine="true"
-        android:inputType="phone"
-        android:hint="@string/hint_ip_address"
+    <LinearLayout
+        android:orientation="vertical"
+        android:padding="@dimen/padding_creation_layout"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"/>
+        android:layout_height="wrap_content">
 
-    <EditText
-        android:id="@+id/edit_name"
-        android:singleLine="true"
-        android:inputType="text|textCapSentences"
-        android:hint="@string/hint_name"
-        android:paddingTop="@dimen/padding_vertical_edit"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"/>
+        <EditText
+            android:id="@+id/edit_ip_address"
+            android:singleLine="true"
+            android:inputType="phone"
+            android:hint="@string/hint_ip_address"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"/>
+
+        <EditText
+            android:id="@+id/edit_name"
+            android:singleLine="true"
+            android:inputType="text|textCapSentences"
+            android:hint="@string/hint_name"
+            android:paddingTop="@dimen/padding_vertical_edit"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"/>
+
+    </LinearLayout>
 
-</LinearLayout>
\ No newline at end of file
+</ScrollView>
\ No newline at end of file
commit 53738414d34574d4c5fa06aba52b097f14b7dc17
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Sat Aug 3 01:26:36 2013 +0300

    Fix possible negative time setting when time is up.
    
    Change-Id: Ic519480dd85075b0122d8ef8fcb32c1a68542ae3

diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
index 4cde89d..791861c 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
@@ -325,16 +325,19 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
     }
 
     private void callEditingTimer(Timer aTimer) {
-        int aTimerLength = aTimer.getMinutesLeft();
-
-        DialogFragment aFragment = TimerEditingDialog.newInstance(aTimerLength);
+        DialogFragment aFragment = buildTimerEditingDialog(aTimer);
         aFragment.show(getSupportFragmentManager(), TimerEditingDialog.TAG);
 
-        pauseTimer();
+        aTimer.pause();
     }
 
-    private void pauseTimer() {
-        mCommunicationService.getSlideShow().getTimer().pause();
+    private DialogFragment buildTimerEditingDialog(Timer aTimer) {
+        if (aTimer.isTimeUp()) {
+            return TimerEditingDialog.newInstance(aTimer.getMinutesLength());
+        }
+        else {
+            return TimerEditingDialog.newInstance(aTimer.getMinutesLeft());
+        }
     }
 
     private void callSettingTimer() {
commit 943a989139f8274b84ddbae41e27bf02433331d5
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Sat Aug 3 01:25:44 2013 +0300

    Add more expression to the warning text.
    
    Change-Id: Ic535c4f744a1564f847e4ba4e9f312f82fc07e72

diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml
index 92a2022..d6d4f3b 100644
--- a/android/sdremote/res/values/strings.xml
+++ b/android/sdremote/res/values/strings.xml
@@ -32,7 +32,7 @@
     <string name="message_impress_wifi_enabling">You should enable experimental features at “Tools → Options → LibreOffice → Advanced” as well.</string>
     <string name="message_impress_pairing_check">If you have Bluetooth pairing issues check instructions related to your desktop OS.</string>
     <string name="message_ip_address_validation">Type in a valid IP address.</string>
-    <string name="message_time_is_up">Time is up</string>
+    <string name="message_time_is_up">Time is up!</string>
 
     <string name="hint_ip_address">IP address</string>
     <string name="hint_name">Name (optional)</string>
commit b2e2f08837decc02e26fd9d3621794a111d6e91e
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Sat Aug 3 00:03:51 2013 +0300

    Fix slide show orientation changes crashes.
    
    Change-Id: I6539d4b36fd858dd7eb609acc2e58c8851f3bfe4

diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
index fc0f7c6..4cde89d 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
@@ -385,7 +385,7 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
 
         stopTimer();
 
-        disconnectComputer();
+        // TODO: disconnect computer
 
         unbindService();
     }
@@ -394,10 +394,6 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
         mCommunicationService.getSlideShow().getTimer().stop();
     }
 
-    private void disconnectComputer() {
-        mCommunicationService.disconnect();
-    }
-
     private void unbindService() {
         unbindService(this);
     }
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
index 51ca64c..e6dd88a 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
@@ -45,6 +45,7 @@ public class CommunicationService extends Service implements Runnable, MessagesL
 
     private boolean mBluetoothWasEnabled;
 
+    private Timer mTimer;
     private SlideShow mSlideShow;
 
     private Thread mThread;
@@ -62,7 +63,8 @@ public class CommunicationService extends Service implements Runnable, MessagesL
 
         mBluetoothWasEnabled = false;
 
-        mSlideShow = new SlideShow(new Timer(this));
+        mTimer = new Timer(this);
+        mSlideShow = new SlideShow(mTimer);
 
         mThread = new Thread(this);
         mThread.start();
@@ -247,7 +249,7 @@ public class CommunicationService extends Service implements Runnable, MessagesL
 
     @Override
     public void onSlideShowStart(int aSlidesCount, int aCurrentSlideIndex) {
-        mSlideShow.cleanUp();
+        mSlideShow = new SlideShow(mTimer);
         mSlideShow.setSlidesCount(aSlidesCount);
 
         Intent aIntent = Intents.buildSlideShowRunningIntent();
@@ -258,7 +260,7 @@ public class CommunicationService extends Service implements Runnable, MessagesL
 
     @Override
     public void onSlideShowFinish() {
-        mSlideShow.cleanUp();
+        mSlideShow = new SlideShow(mTimer);
 
         Intent aIntent = Intents.buildSlideShowStoppedIntent();
         LocalBroadcastManager.getInstance(this).sendBroadcast(aIntent);
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java b/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java
index bb6de8f..4d226d8 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java
@@ -14,12 +14,10 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 import android.text.TextUtils;
 import android.util.Base64;
-import android.util.Log;
 
 class MessagesReceiver implements Runnable {
     private final BufferedReader mMessagesReader;
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
index f6aa6dd..1996368 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
@@ -75,14 +75,6 @@ public class SlideShow {
     public Timer getTimer() {
         return mTimer;
     }
-
-    public void cleanUp() {
-        mSlidesCount = 0;
-        mCurrentSlideIndex = 0;
-
-        mSlidePreviewsBytes.clear();
-        mSlideNotes.clear();
-    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
index dcfd6ef..021a492 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
@@ -24,6 +24,7 @@ import android.widget.AdapterView;
 import android.widget.GridView;
 
 import com.actionbarsherlock.app.SherlockFragment;
+import org.libreoffice.impressremote.communication.SlideShow;
 import org.libreoffice.impressremote.util.Intents;
 import org.libreoffice.impressremote.R;
 import org.libreoffice.impressremote.adapter.SlidesGridAdapter;
@@ -63,17 +64,31 @@ public class SlidesGridFragment extends SherlockFragment implements ServiceConne
     }
 
     private void setUpSlidesGrid() {
-        SlidesGridAdapter aSlidesGridAdapter = new SlidesGridAdapter(getActivity(),
-            mCommunicationService.getSlideShow());
+        if (!isAdded()) {
+            return;
+        }
 
-        getSlidesGrid().setAdapter(aSlidesGridAdapter);
-        getSlidesGrid().setOnItemClickListener(this);
+        GridView aSlidesGrid = getSlidesGrid();
+
+        aSlidesGrid.setAdapter(buildSlidesAdapter());
+        aSlidesGrid.setOnItemClickListener(this);
     }
 
     private GridView getSlidesGrid() {
         return (GridView) getView().findViewById(R.id.grid_slides);
     }
 
+    private SlidesGridAdapter buildSlidesAdapter() {
+        SlideShow aSlideShow = mCommunicationService.getSlideShow();
+
+        return new SlidesGridAdapter(getActivity(), aSlideShow);
+    }
+
+    @Override
+    public void onItemClick(AdapterView<?> aAdapterView, View aView, int aPosition, long aId) {
+        mCommunicationService.getTransmitter().setCurrentSlide(aPosition);
+    }
+
     @Override
     public void onServiceDisconnected(ComponentName aComponentName) {
         mCommunicationService = null;
@@ -93,11 +108,6 @@ public class SlidesGridFragment extends SherlockFragment implements ServiceConne
         getBroadcastManager().registerReceiver(mIntentsReceiver, aIntentFilter);
     }
 
-    @Override
-    public void onItemClick(AdapterView<?> aAdapterView, View aView, int aPosition, long aId) {
-        mCommunicationService.getTransmitter().setCurrentSlide(aPosition);
-    }
-
     private static final class IntentsReceiver extends BroadcastReceiver {
         private final SlidesGridFragment mSlidesGridFragment;
 
@@ -109,7 +119,6 @@ public class SlidesGridFragment extends SherlockFragment implements ServiceConne
         public void onReceive(Context aContext, Intent aIntent) {
             if (Intents.Actions.SLIDE_SHOW_RUNNING.equals(aIntent.getAction())) {
                 mSlidesGridFragment.refreshSlidesGrid();
-
                 return;
             }
 
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
index 3092503..838245a 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
@@ -21,8 +21,6 @@ import android.support.v4.view.PagerAdapter;
 import android.support.v4.view.ViewPager;
 import android.text.Html;
 import android.text.TextUtils;
-import android.util.DisplayMetrics;
-import android.util.TypedValue;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -70,10 +68,14 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn
     }
 
     private void setUpSlidesPager() {
+        if (!isAdded()) {
+            return;
+        }
+
         ViewPager aSlidesPager = getSlidesPager();
 
         aSlidesPager.setAdapter(buildSlidesAdapter());
-        aSlidesPager.setPageMargin(getSlidesMarginInPx());
+        aSlidesPager.setPageMargin(getSlidesMargin());
         aSlidesPager.setOnPageChangeListener(this);
 
         setUpCurrentSlide();
@@ -89,12 +91,8 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn
         return new SlidesPagerAdapter(getActivity(), aSlideShow);
     }
 
-    private int getSlidesMarginInPx() {
-        int aPxUnit = TypedValue.COMPLEX_UNIT_PX;
-        float aSlideMarginInDp = getResources().getDimension(R.dimen.margin_slide);
-        DisplayMetrics aDisplayMetrics = getResources().getDisplayMetrics();
-
-        return (int) TypedValue.applyDimension(aPxUnit, aSlideMarginInDp, aDisplayMetrics);
+    private int getSlidesMargin() {
+        return getResources().getDimensionPixelSize(R.dimen.margin_slide);
     }
 
     private void setUpCurrentSlide() {
@@ -186,21 +184,33 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn
 
         @Override
         public void onReceive(Context aContext, Intent aIntent) {
-            if (Intents.Actions.SLIDE_PREVIEW.equals(aIntent.getAction())) {
-                mSlidesPagerFragment.refreshSlidesPager();
+            if (Intents.Actions.SLIDE_SHOW_RUNNING.equals(aIntent.getAction())) {
+                mSlidesPagerFragment.setUpSlidesPager();
+                return;
+            }
+
+            if (Intents.Actions.SLIDE_SHOW_STOPPED.equals(aIntent.getAction())) {
+                mSlidesPagerFragment.setUpSlidesPager();
                 return;
             }
 
             if (Intents.Actions.SLIDE_CHANGED.equals(aIntent.getAction())) {
                 mSlidesPagerFragment.setUpCurrentSlide();
+                return;
+            }
+
+            if (Intents.Actions.SLIDE_PREVIEW.equals(aIntent.getAction())) {
+                mSlidesPagerFragment.refreshSlidesPager();
             }
         }
     }
 
     private IntentFilter buildIntentsReceiverFilter() {
         IntentFilter aIntentFilter = new IntentFilter();
-        aIntentFilter.addAction(Intents.Actions.SLIDE_PREVIEW);
+        aIntentFilter.addAction(Intents.Actions.SLIDE_SHOW_RUNNING);
+        aIntentFilter.addAction(Intents.Actions.SLIDE_SHOW_STOPPED);
         aIntentFilter.addAction(Intents.Actions.SLIDE_CHANGED);
+        aIntentFilter.addAction(Intents.Actions.SLIDE_PREVIEW);
 
         return aIntentFilter;
     }
commit d4b4c94aa185093927866818b81816452310c5f3
Author: Artur Dryomov <artur.dryomov at gmail.com>
Date:   Fri Aug 2 17:42:19 2013 +0300

    Add saving current mode when showing a slide show.
    
    Should be helpful on orientation changes.
    
    Change-Id: I0a00c980882decc3da3460f63b82c5d0bb308298

diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
index f739394..fc0f7c6 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
@@ -46,10 +46,10 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
     private IntentsReceiver mIntentsReceiver;
 
     @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
+    protected void onCreate(Bundle aSavedInstanceState) {
+        super.onCreate(aSavedInstanceState);
 
-        mMode = Mode.PAGER;
+        mMode = loadMode(aSavedInstanceState);
 
         setUpHomeButton();
         setUpFragment();
@@ -57,6 +57,14 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
         bindService();
     }
 
+    private Mode loadMode(Bundle aSavedInstanceState) {
+        if (aSavedInstanceState == null) {
+            return Mode.PAGER;
+        }
+
+        return (Mode) aSavedInstanceState.getSerializable("MODE");
+    }
+
     private void setUpHomeButton() {
         getSupportActionBar().setHomeButtonEnabled(true);
     }
@@ -131,6 +139,7 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
             if (Intents.Actions.TIMER_STARTED.equals(aIntent.getAction())) {
                 int aMinutesLength = aIntent.getIntExtra(Intents.Extras.MINUTES, 0);
                 mSlideShowActivity.startTimer(aMinutesLength);
+                mSlideShowActivity.setUpSlideShowInformation();
                 return;
             }
 
@@ -208,8 +217,6 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
 
         aTimer.setMinutesLength(aMinutesLength);
         aTimer.start();
-
-        setUpSlideShowInformation();
     }
 
     private void resumeTimer() {
@@ -358,9 +365,24 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
     }
 
     @Override
+    protected void onSaveInstanceState(Bundle aOutState) {
+        super.onSaveInstanceState(aOutState);
+
+        saveMode(aOutState);
+    }
+
+    private void saveMode(Bundle aOutState) {
+        aOutState.putSerializable("MODE", mMode);
+    }
+
+    @Override
     protected void onDestroy() {
         super.onDestroy();
 
+        if (!isServiceBound()) {
+            return;
+        }
+
         stopTimer();
 
         disconnectComputer();
@@ -373,18 +395,10 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
     }
 
     private void disconnectComputer() {
-        if (!isServiceBound()) {
-            return;
-        }
-
         mCommunicationService.disconnect();
     }
 
     private void unbindService() {
-        if (!isServiceBound()) {
-            return;
-        }
-
         unbindService(this);
     }
 
commit c76434ae061ecb07c61543cafcc9c9a14c6a2229
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Aug 3 17:59:38 2013 +0200

    fdo#46037: remove another 1 comphelper/configurationhelper in sfx2
    
    Change-Id: Id419540f2c9d1fc9bfcbfcc67239362c667b75c8

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 0a9b205..79f6314 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -74,7 +74,6 @@
 #include <unotools/ucbhelper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/namedvaluecollection.hxx>
-#include <comphelper/configurationhelper.hxx>
 #include <comphelper/docpasswordrequest.hxx>
 #include <comphelper/docpasswordhelper.hxx>
 
commit e2e15148fc133c0b6fb3d9dc3cade2ef2ef64f41
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Aug 4 00:25:32 2013 +0900

    Mark as const/static
    
    Change-Id: I54a7daee7345e7c0c5c3f866d5c365722b567eff

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index ddb681f..2ec0328 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -88,7 +88,7 @@ static OUString MEDIATYPE_PROPNAME               ("MediaType"
 static OUString MEDIATYPE_UICONFIG               ("application/vnd.sun.xml.ui.configuration");
 
 //-----------------------------------------------
-static sal_uInt16 KEYCODE_ARRAY[] =
+static const sal_uInt16 KEYCODE_ARRAY[] =
 {
     KEY_F1       ,
     KEY_F2       ,
@@ -600,7 +600,7 @@ static sal_uInt16 KEYCODE_ARRAY[] =
     KEY_DELETE    | KEY_SHIFT | KEY_MOD1 | KEY_MOD2
 };
 
-static sal_uInt16 KEYCODE_ARRAY_SIZE = SAL_N_ELEMENTS(KEYCODE_ARRAY);
+static const sal_uInt16 KEYCODE_ARRAY_SIZE = SAL_N_ELEMENTS(KEYCODE_ARRAY);
 
 //-----------------------------------------------
 // seems to be needed to layout the list box, which shows all
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 8045c43..ec85ed3 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2166,7 +2166,7 @@ long OSelectionBrowseBox::GetRealRow(long nRowId) const
     OSL_ENSURE(nErg <= long(m_bVisibleRow.size()),"nErg kann nicht groesser als BROW_ROW_CNT sein!");
     return i;
 }
-static long nVisibleRowMask[] =
+static const long nVisibleRowMask[] =
                     {
                             0x0001,
                             0x0002,
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 3cbf4c80..9299b6d 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -949,7 +949,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::getPropertyState( const OUStr
     return _getPropertyState( PropertyName, -1 );
 }
 
-static sal_uInt16 aSvxUnoFontDescriptorWhichMap[] = { EE_CHAR_FONTINFO, EE_CHAR_FONTHEIGHT, EE_CHAR_ITALIC,
+static const sal_uInt16 aSvxUnoFontDescriptorWhichMap[] = { EE_CHAR_FONTINFO, EE_CHAR_FONTHEIGHT, EE_CHAR_ITALIC,
                                                   EE_CHAR_UNDERLINE, EE_CHAR_WEIGHT, EE_CHAR_STRIKEOUT,
                                                   EE_CHAR_WLM, 0 };
 
@@ -968,7 +968,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
             {
             case WID_FONTDESC:
                 {
-                    sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
+                    const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
                     SfxItemState eTempItemState;
                     while( *pWhichId )
                     {
@@ -1115,7 +1115,7 @@ sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, cons
         {
             case WID_FONTDESC:
                 {
-                    sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
+                    const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
                     SfxItemState eTempItemState;
                     while( *pWhichId )
                     {
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 5a6cd4f..d8a6473 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -76,7 +76,7 @@ struct CacheDispatchInfo
 
 // Attention: commands must be sorted by command groups. Implementation is dependent
 // on this!!
-static DispatchInfo SupportedCommandsArray[] =
+static const DispatchInfo SupportedCommandsArray[] =
 {
     { ".uno:Undo"               ,   frame::CommandGroup::EDIT       , sal_False },
     { ".uno:Cut"                ,   frame::CommandGroup::EDIT       , sal_False },
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index c7b24da..56ade5f 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6487,7 +6487,7 @@ struct ClsIDs {
     const sal_Char* pSvrName;
     const sal_Char* pDspName;
 };
-static ClsIDs aClsIDs[] = {
+static const ClsIDs aClsIDs[] = {
 
     { 0x000212F0, "MSWordArt",          "Microsoft Word Art"            },
     { 0x000212F0, "MSWordArt.2",        "Microsoft Word Art 2.0"        },
@@ -6651,7 +6651,7 @@ sal_Bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
                 xOle10Stm = SotStorageStreamRef();
 
                 // set the compobj stream
-                ClsIDs* pIds;
+                const ClsIDs* pIds;
                 for( pIds = aClsIDs; pIds->nId; pIds++ )
                 {
                     if( aSvrName == OUString::createFromAscii(pIds->pSvrName) )
diff --git a/fpicker/source/generic/fpicker.cxx b/fpicker/source/generic/fpicker.cxx
index 6b7743e..ea35226 100644
--- a/fpicker/source/generic/fpicker.cxx
+++ b/fpicker/source/generic/fpicker.cxx
@@ -189,7 +189,7 @@ static Sequence< OUString > FolderPicker_getSupportedServiceNames()
 /*
  * Implementation entries.
  */
-static cppu::ImplementationEntry g_entries[] =
+static const cppu::ImplementationEntry g_entries[] =
 {
     {
         FilePicker_createInstance,
diff --git a/fpicker/source/office/fps_office.cxx b/fpicker/source/office/fps_office.cxx
index e38d25f..c98b21f 100644
--- a/fpicker/source/office/fps_office.cxx
+++ b/fpicker/source/office/fps_office.cxx
@@ -25,7 +25,7 @@
 #include "OfficeFilePicker.hxx"
 #include "OfficeFolderPicker.hxx"
 
-static cppu::ImplementationEntry g_entries[] =
+static const cppu::ImplementationEntry g_entries[] =
 {
     {
         SvtFilePicker::impl_createInstance,
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index ceb8b48..1ec4d2d 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -130,7 +130,7 @@ struct TableEntry
 // Table with valid operating system strings
 // Name of the os as char* and the length
 // of the string
-static TableEntry aOSTable[OS_COUNT] =
+static const TableEntry aOSTable[OS_COUNT] =
 {
     { "WINDOWS"     ,       7       },
     { "UNIX"        ,       4       },
@@ -142,7 +142,7 @@ static TableEntry aOSTable[OS_COUNT] =
 // Table with valid environment variables
 // Name of the environment type as a char* and
 // the length of the string.
-static TableEntry aEnvTable[ET_COUNT] =
+static const TableEntry aEnvTable[ET_COUNT] =
 {
     { "HOST"        ,       4       },
     { "YPDOMAIN"    ,       8       },
@@ -155,7 +155,7 @@ static TableEntry aEnvTable[ET_COUNT] =
 // Priority table for the environment types. Lower numbers define
 // a higher priority. Equal numbers has the same priority that means
 // that the first match wins!!
-static sal_Int16 aEnvPrioTable[ET_COUNT] =
+static const sal_Int16 aEnvPrioTable[ET_COUNT] =
 {
     1,      // ET_HOST
     2,      // ET_IPDOMAIN
@@ -166,7 +166,7 @@ static sal_Int16 aEnvPrioTable[ET_COUNT] =
 };
 
 // Table with all fixed/predefined variables supported.
-static FixedVariable aFixedVarTable[] =
+static const FixedVariable aFixedVarTable[] =
 {
     { VARIABLE_INST,        PREDEFVAR_INST,         REPLACELENGTH_INST,     true                       },
     { VARIABLE_PROG,        PREDEFVAR_PROG,         REPLACELENGTH_PROG,     true                       },
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index a861194..b5e4302 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -91,7 +91,7 @@
 #define SID_FM_IMAGEBUTTON                  (SID_FMSLOTS_START + 12)
 #define SID_FM_FILECONTROL                  (SID_FMSLOTS_START + 13)
 
-static sal_Int16 nConvertSlots[] =
+static const sal_Int16 nConvertSlots[] =
 {
     SID_FM_CONVERTTO_EDIT,
     SID_FM_CONVERTTO_BUTTON,
@@ -115,7 +115,7 @@ static sal_Int16 nConvertSlots[] =
     SID_FM_CONVERTTO_SPINBUTTON
 };
 
-static sal_Int16 nCreateSlots[] =
+static const sal_Int16 nCreateSlots[] =
 {
     SID_FM_EDIT,
     SID_FM_PUSHBUTTON,
@@ -139,7 +139,7 @@ static sal_Int16 nCreateSlots[] =
     SID_FM_SPINBUTTON
 };
 
-const char* aCommands[] =
+static const char* aCommands[] =
 {
     ".uno:ConvertToEdit",
     ".uno:ConvertToButton",
commit be2761ce013c349d6f6e825b89c76e1c60a63343
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Aug 3 17:44:12 2013 +0200

    fdo#46037: remove 1 comphelper/configurationhelper in sfx2
    
    Change-Id: Ibcd666c1937c5eb8d9c9330138b0d352bb682780

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b280bee..56aa8f3 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -46,7 +46,6 @@
 
 #include <comphelper/processfactory.hxx>
 #include <comphelper/storagehelper.hxx>
-#include "comphelper/configurationhelper.hxx"
 
 #include <svtools/addresstemplate.hxx>
 #include <svtools/miscopt.hxx>
commit 2c17bb142776621e3e7836b5cf0392ac52a9538a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Aug 3 12:46:10 2013 +0200

    Updated core
    Project: help  b8551169f98caa0cd00043086d82883afdcffd6d

diff --git a/helpcontent2 b/helpcontent2
index 217eb53..b855116 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 217eb53303b32634ce2da83709b4169ee166cfa8
+Subproject commit b8551169f98caa0cd00043086d82883afdcffd6d
commit b7ffed72befb25cd2a642e77ec745959b786d6af
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Aug 3 12:39:17 2013 +0200

    checking the help, none of these go anywhere anyway...
    
    so we can remove them and fix up the broken help links to show
    the right page in helpcontent2 itself
    
    Change-Id: I1fb170fc37b92d0f271b63e5099800e0e99d9b4b

diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk
index 473a60d..f9ab04e 100644
--- a/sd/AllLangResTarget_sd.mk
+++ b/sd/AllLangResTarget_sd.mk
@@ -34,7 +34,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
     sd/source/core/glob.src \
     sd/source/filter/html/pubdlg.src \
     sd/source/ui/accessibility/accessibility.src \
-    sd/source/ui/animations/CustomAnimationCreateDialog.src \
     sd/source/ui/animations/CustomAnimationDialog.src \
     sd/source/ui/animations/CustomAnimationPane.src \
     sd/source/ui/animations/CustomAnimation.src \
diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index d0e0b21..f62e0bd 100644
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -159,12 +159,6 @@
 #define HID_SD_TASK_PANE_PREVIEW_ALL                            "SD_HID_SD_TASK_PANE_PREVIEW_ALL"
 #define HID_SD_TASK_PANE_PREVIEW_LAYOUTS                        "SD_HID_SD_TASK_PANE_PREVIEW_LAYOUTS"
 
-#define HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE                   "SD_HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE"
-#define HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS                   "SD_HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS"
-#define HID_SD_CUSTOMANIMATIONDIALOG_EXIT                       "SD_HID_SD_CUSTOMANIMATIONDIALOG_EXIT"
-#define HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH                 "SD_HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH"
-#define HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS                "SD_HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS"
-
 #define HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX            "SD_HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX"
 #define HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX             "SD_HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX"
 #define HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX              "SD_HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX"
diff --git a/sd/source/ui/animations/CustomAnimation.hrc b/sd/source/ui/animations/CustomAnimation.hrc
index 0003f30..0de453b 100644
--- a/sd/source/ui/animations/CustomAnimation.hrc
+++ b/sd/source/ui/animations/CustomAnimation.hrc
@@ -28,18 +28,12 @@
 
 #define DLG_CUSTOMANIMATIONPANE                         RID_CUSTOMANIMATION_START+0
 #define DLG_CUSTOMANIMATION                             RID_CUSTOMANIMATION_START+1
-#define DLG_CUSTOMANIMATION_CREATE                      RID_CUSTOMANIMATION_START+2
 #define DLG_SLIDE_TRANSITION_PANE                       RID_CUSTOMANIMATION_START+3
 
 #define RID_EFFECT_CONTEXTMENU                          RID_CUSTOMANIMATION_START+0
 #define RID_TP_CUSTOMANIMATION_EFFECT                   RID_CUSTOMANIMATION_START+1
 #define RID_TP_CUSTOMANIMATION_DURATION                 RID_CUSTOMANIMATION_START+2
 #define RID_TP_CUSTOMANIMATION_TEXT                     RID_CUSTOMANIMATION_START+3
-#define RID_TP_CUSTOMANIMATION_ENTRANCE                 RID_CUSTOMANIMATION_START+4
-#define RID_TP_CUSTOMANIMATION_EMPHASIS                 RID_CUSTOMANIMATION_START+5
-#define RID_TP_CUSTOMANIMATION_EXIT                     RID_CUSTOMANIMATION_START+6
-#define RID_TP_CUSTOMANIMATION_MOTIONPATH               RID_CUSTOMANIMATION_START+7
-#define RID_TP_CUSTOMANIMATION_MISCEFFECTS              RID_CUSTOMANIMATION_START+8
 #define RID_CUSTOMANIMATION_ROTATION_POPUP              RID_CUSTOMANIMATION_START+9
 #define RID_CUSTOMANIMATION_FONTSIZE_POPUP              RID_CUSTOMANIMATION_START+10
 #define RID_CUSTOMANIMATION_SCALE_POPUP                 RID_CUSTOMANIMATION_START+11
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index a3f9a8a..10d145a3 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -25,6 +25,7 @@
 #include <vcl/tabctrl.hxx>
 #include <vcl/tabpage.hxx>
 
+#include <vcl/builder.hxx>
 #include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/lstbox.hxx>
@@ -36,7 +37,6 @@
 #include <unotools/viewoptions.hxx>
 #include <com/sun/star/presentation/EffectNodeType.hpp>
 #include "CustomAnimationCreateDialog.hxx"
-#include "CustomAnimationCreateDialog.hrc"
 #include "CustomAnimation.hrc"
 #include "CustomAnimationPane.hxx"
 #include "optsitem.hxx"
@@ -101,7 +101,7 @@ CategoryListBox::CategoryListBox( Window* pParent )
     SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) );
 }
 
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCategoryListBox( Window *pParent )
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCategoryListBox(Window *pParent, VclBuilder::stringmap &)
 {
     return new CategoryListBox( pParent );
 }
@@ -520,22 +520,16 @@ CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, Custo
     mnMPathId = mpTabControl->GetPageId("motion_paths");
     mnMiscId = mpTabControl->GetPageId("misc_effects");
 
-    //FIXME: Figure out what to do w/ those help IDs
     const CustomAnimationPresets& rPresets = CustomAnimationPresets::getCustomAnimationPresets();
     mpTabPages[ENTRANCE] = new CustomAnimationCreateTabPage( mpTabControl, this, mnEntranceId, rPresets.getEntrancePresets(), bHasText );
-    //mpTabPages[ENTRANCE]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE );
     mpTabControl->SetTabPage( mnEntranceId, mpTabPages[ENTRANCE] );
     mpTabPages[EMPHASIS] = new CustomAnimationCreateTabPage( mpTabControl, this, mnEmphasisId, rPresets.getEmphasisPresets(), bHasText );
-    //mpTabPages[EMPHASIS]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS );
     mpTabControl->SetTabPage( mnEmphasisId, mpTabPages[EMPHASIS] );
     mpTabPages[EXIT] = new CustomAnimationCreateTabPage( mpTabControl, this, mnExitId, rPresets.getExitPresets(), bHasText );
-    //mpTabPages[EXIT]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_EXIT );
     mpTabControl->SetTabPage( mnExitId, mpTabPages[EXIT] );
     mpTabPages[MOTIONPATH] = new CustomAnimationCreateTabPage( mpTabControl, this, mnMPathId, rPresets.getMotionPathsPresets(), bHasText );
-    //mpTabPages[MOTIONPATH]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH );
     mpTabControl->SetTabPage( mnMPathId, mpTabPages[MOTIONPATH] );
     mpTabPages[MISCEFFECTS] = new CustomAnimationCreateTabPage( mpTabControl, this, mnMiscId, rPresets.getMiscPresets(), bHasText );
-    //mpTabPages[MISCEFFECTS]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS );
     mpTabControl->SetTabPage( mnMiscId, mpTabPages[MISCEFFECTS] );
 
     getCurrentPage()->setDuration( mfDuration );
@@ -657,8 +651,7 @@ Window * lcl_GetTopmostParent( Window * pWindow )
 
 void CustomAnimationCreateDialog::setPosition()
 {
-    SvtViewOptions aDlgOpt(
-        E_TABDIALOG, OUString::number(DLG_CUSTOMANIMATION_CREATE));
+    SvtViewOptions aDlgOpt(E_TABDIALOG, OStringToOUString(GetHelpId(), RTL_TEXTENCODING_UTF8));
     if ( aDlgOpt.Exists() )
     {
         SetWindowState( OUStringToOString(aDlgOpt.GetWindowState(),
@@ -685,8 +678,7 @@ void CustomAnimationCreateDialog::setPosition()
 void CustomAnimationCreateDialog::storePosition()
 {
     // save settings (screen position and current page)
-    SvtViewOptions aDlgOpt(
-        E_TABDIALOG, OUString::number(DLG_CUSTOMANIMATION_CREATE));
+    SvtViewOptions aDlgOpt(E_TABDIALOG, OStringToOUString(GetHelpId(), RTL_TEXTENCODING_UTF8));
     aDlgOpt.SetWindowState(OStringToOUString(
         GetWindowState(WINDOWSTATE_MASK_POS), RTL_TEXTENCODING_ASCII_US));
 }
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hrc b/sd/source/ui/animations/CustomAnimationCreateDialog.hrc
deleted file mode 100644
index 82110b5..0000000
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.hrc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SD_CUSTOMANIMATIONCREATEDIALOG_HRC
-#define _SD_CUSTOMANIMATIONCREATEDIALOG_HRC
-
-// TabPage RID_TP_CUSTOMANIMATION_ENTRANCE
-#define LB_EFFECTS              1
-#define FT_SPEED                2
-#define CB_SPEED                3
-#define CBX_PREVIEW             4
-#define STR_USERPATH            5
-
-#endif // _SD_CUSTOMANIMATIONCREATEDIALOG_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.src b/sd/source/ui/animations/CustomAnimationCreateDialog.src
deleted file mode 100644
index 5e76365..0000000
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.src
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "CustomAnimationCreateDialog.hrc"
-#include "CustomAnimation.hrc"
-
-TabDialog DLG_CUSTOMANIMATION_CREATE
-{
-    Size = MAP_APPFONT ( 162 , 244 ) ;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-
-    Text [ en-US ] = "Custom Animation" ;
-
-    TabControl 1
-    {
-        OutputSize = TRUE ;
-        Pos = MAP_APPFONT ( 3 , 3 ) ;
-        Size = MAP_APPFONT ( 156, 217 ) ;
-        PageList =
-        {
-            PageItem
-            {
-                Identifier = RID_TP_CUSTOMANIMATION_ENTRANCE ;
-                Text [ en-US ] = "Entrance" ;
-            };
-
-            PageItem
-            {
-                Identifier = RID_TP_CUSTOMANIMATION_EMPHASIS;
-                Text [ en-US ] = "Emphasis";
-            };
-
-            PageItem
-            {
-                Identifier = RID_TP_CUSTOMANIMATION_EXIT;
-                Text [ en-US ] = "Exit";
-            };
-
-            PageItem
-            {
-                Identifier = RID_TP_CUSTOMANIMATION_MOTIONPATH;
-                Text [ en-US ] = "Motion Paths";
-            };
-
-            PageItem
-            {
-                Identifier = RID_TP_CUSTOMANIMATION_MISCEFFECTS;
-                Text [ en-US ] = "Misc Effects";
-            };
-        };
-    };
-    OKButton 1
-    {
-        Pos = MAP_APPFONT ( 3 , 223 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE;
-    };
-    CancelButton 1
-    {
-        Pos = MAP_APPFONT ( 56 , 223 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE;
-    };
-    HelpButton 1
-    {
-        Pos = MAP_APPFONT ( 109 , 223 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-};
-
-TabPage RID_TP_CUSTOMANIMATION_ENTRANCE
-{
-    HelpID = "sd:TabPage:RID_TP_CUSTOMANIMATION_ENTRANCE";
-    Hide = TRUE;
-    Size = MAP_APPFONT ( 156, 217 );
-
-    ListBox LB_EFFECTS
-    {
-        HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_ENTRANCE:LB_EFFECTS";
-        Pos = MAP_APPFONT ( 3 , 3  ) ;
-        Size = MAP_APPFONT( 144, 160 );
-        OutputSize = TRUE;
-        TabStop = TRUE ;
-        Border = TRUE ;
-    };
-
-    FixedText FT_SPEED
-    {
-        OutputSize = TRUE;
-        Pos = MAP_APPFONT ( 3 , 167  ) ;
-        Size = MAP_APPFONT( 42, 8 );
-
-        Text [ en-US ] = "Speed";
-    };
-
-    ComboBox CB_SPEED
-    {
-        HelpID = "sd:ComboBox:RID_TP_CUSTOMANIMATION_ENTRANCE:CB_SPEED";
-        Pos = MAP_APPFONT ( 48 , 166 ) ;
-        Size = MAP_APPFONT ( 101, 48 );
-        TabStop = TRUE ;
-        Border = TRUE ;
-        DropDown = TRUE ;
-    };
-
-    CheckBox CBX_PREVIEW
-    {
-        HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_ENTRANCE:CBX_PREVIEW";
-        Pos = MAP_APPFONT ( 3 , 181 ) ;
-        Size = MAP_APPFONT ( 143 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Automatic preview" ;
-    };
-
-    String STR_USERPATH
-    {
-        Text [ en-US ] = "User paths";
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/uiconfig/simpress/ui/customanimationcreatedialog.ui b/sd/uiconfig/simpress/ui/customanimationcreatedialog.ui
index e8c5cfe..ca08236 100644
--- a/sd/uiconfig/simpress/ui/customanimationcreatedialog.ui
+++ b/sd/uiconfig/simpress/ui/customanimationcreatedialog.ui
@@ -3,13 +3,13 @@
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="CustomAnimationCreate">
     <property name="can_focus">False</property>
-    <property name="border_width">5</property>
+    <property name="border_width">6</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <property name="spacing">6</property>
+        <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
@@ -17,11 +17,9 @@
             <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -33,11 +31,9 @@
             <child>
               <object class="GtkButton" id="cancel">
                 <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -49,11 +45,9 @@
             <child>
               <object class="GtkButton" id="help">
                 <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -74,6 +68,11 @@
           <object class="GtkNotebook" id="tabs">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <child>
+              <placeholder/>
+            </child>
             <child type="tab">
               <object class="GtkLabel" id="entrance">
                 <property name="visible">True</property>
diff --git a/sd/uiconfig/simpress/ui/customanimationcreatetab.ui b/sd/uiconfig/simpress/ui/customanimationcreatetab.ui
index 0a8c370..4de5a0d 100644
--- a/sd/uiconfig/simpress/ui/customanimationcreatetab.ui
+++ b/sd/uiconfig/simpress/ui/customanimationcreatetab.ui
@@ -4,6 +4,7 @@
   <object class="GtkBox" id="CustomAnimationCreateTab">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
+    <property name="border_width">6</property>
     <property name="orientation">vertical</property>
     <property name="spacing">12</property>
     <child>
@@ -24,7 +25,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="halign">end</property>
-        <property name="spacing">6</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkLabel" id="effect_speed_label">
             <property name="visible">True</property>
@@ -67,11 +68,9 @@
     <child>
       <object class="GtkCheckButton" id="auto_preview">
         <property name="label" translatable="yes">_Automatic preview</property>
-        <property name="use_action_appearance">False</property>
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">False</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="xalign">0</property>
         <property name="draw_indicator">True</property>
commit 2d275be83f905f88c8c4ec982165af9102e3a920
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Wed Jul 31 08:00:39 2013 +0200

    Reduce scope of global constants
    
    Change-Id: I938c56d5d1200ada439df2a25b0d46eddf9c3a7f

diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index 1cc7aea..32442ff 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -21,6 +21,14 @@
 #include <crossrefbookmark.hxx>
 #include <ndtxt.hxx>
 
+namespace
+{
+
+const char CrossRefHeadingBookmark_NamePrefix[] = "__RefHeading__";
+const char CrossRefNumItemBookmark_NamePrefix[] = "__RefNumPara__";
+
+}
+
 namespace sw { namespace mark
 {
     CrossRefBookmark::CrossRefBookmark(const SwPaM& rPaM,
@@ -60,8 +68,6 @@ namespace sw { namespace mark
         return *static_cast<SwPosition*>(NULL);
     }
 
-    const char CrossRefHeadingBookmark_NamePrefix[] = "__RefHeading__";
-
     CrossRefHeadingBookmark::CrossRefHeadingBookmark(const SwPaM& rPaM,
         const KeyCode& rCode,
         const OUString& rName,
@@ -74,8 +80,6 @@ namespace sw { namespace mark
         return rName.match(CrossRefHeadingBookmark_NamePrefix);
     }
 
-    const char CrossRefNumItemBookmark_NamePrefix[] = "__RefNumPara__";
-
     CrossRefNumItemBookmark::CrossRefNumItemBookmark(const SwPaM& rPaM,
         const KeyCode& rCode,
         const OUString& rName,
commit 0e5634e73036767887fb64bf3de7eb0908e98a09
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Wed Jul 31 07:59:39 2013 +0200

    String to OUString
    
    Change-Id: I3290969a556d5eb824cbe6bd06984e0ac0cdbf35

diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index bc18dd1..2ee6108 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -203,7 +203,7 @@ SwCallLink::~SwCallLink()
 
             if( g_pBreakIt->GetBreakIter().is() )
             {
-                const String& rTxt = ((SwTxtNode*)pCNd)->GetTxt();
+                const OUString rTxt = ((SwTxtNode*)pCNd)->GetTxt();
                 if( !nCmp ||
                     g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp )
                      != g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp - 1 ))


More information about the Libreoffice-commits mailing list