[Libreoffice-commits] core.git: 2 commits - accessibility/inc accessibility/source include/toolkit toolkit/source
Stephan Bergmann
sbergman at redhat.com
Fri Nov 15 01:31:58 PST 2013
accessibility/inc/accessibility/helper/accresmgr.hxx | 5 +
accessibility/source/helper/accresmgr.cxx | 2
include/toolkit/helper/tkresmgr.hxx | 39 +--------------
toolkit/source/awt/vclxtabpagecontainer.cxx | 1
toolkit/source/helper/tkresmgr.cxx | 48 -------------------
5 files changed, 10 insertions(+), 85 deletions(-)
New commits:
commit cef6dad4f6539c2fab0e02b24b71a15537f69034
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Nov 15 10:30:56 2013 +0100
Remove unused parts of TkResMgr
Change-Id: I33f6bb8756a3bab054068a73c8e3d71b414ddfe0
diff --git a/include/toolkit/helper/tkresmgr.hxx b/include/toolkit/helper/tkresmgr.hxx
index 6e8a170..668a1bd 100644
--- a/include/toolkit/helper/tkresmgr.hxx
+++ b/include/toolkit/helper/tkresmgr.hxx
@@ -21,45 +21,12 @@
#define INCLUDED_TOOLKIT_HELPER_TKRESMGR_HXX
#include <rtl/ustring.hxx>
-#include <vcl/image.hxx>
-class SimpleResMgr;
-class ResMgr;
+class Image;
-#define TK_RES_STRING(id) TkResMgr::loadString(id)
-
-// -----------------------------------------------------------------------------
-// TkResMgr
-// -----------------------------------------------------------------------------
-
-class TkResMgr
+namespace TkResMgr
{
- static SimpleResMgr* m_pSimpleResMgr;
- static ResMgr* m_pResMgr;
-
-private:
- // no instantiation allowed
- TkResMgr() { }
- ~TkResMgr() { }
-
- // we'll instantiate one static member of the following class,
- // which in it's dtor ensures that m_pSimpleResMgr will be deleted
- class EnsureDelete
- {
- public:
- EnsureDelete() { }
- ~EnsureDelete();
- };
- friend class EnsureDelete;
-
-protected:
- static void ensureImplExists();
-
-public:
- // loads the string with the specified resource id
- static OUString loadString( sal_uInt16 nResId );
-
- static Image getImageFromURL( const OUString& i_rImageURL );
+ Image getImageFromURL( const OUString& i_rImageURL );
};
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
index 928b4bd..47447d4 100644
--- a/toolkit/source/awt/vclxtabpagecontainer.cxx
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -20,6 +20,7 @@
#include <toolkit/awt/vclxtabpagecontainer.hxx>
#include <com/sun/star/awt/tab/XTabPageModel.hpp>
#include <com/sun/star/awt/XControl.hpp>
+#include <vcl/image.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/svapp.hxx>
diff --git a/toolkit/source/helper/tkresmgr.cxx b/toolkit/source/helper/tkresmgr.cxx
index 5b9fbce..06d14c8 100644
--- a/toolkit/source/helper/tkresmgr.cxx
+++ b/toolkit/source/helper/tkresmgr.cxx
@@ -18,65 +18,19 @@
*/
#include <toolkit/helper/tkresmgr.hxx>
-#include <tools/simplerm.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
-#include <tools/resmgr.hxx>
#include <tools/diagnose_ex.h>
-#include <vcl/svapp.hxx>
+#include <vcl/image.hxx>
using ::com::sun::star::uno::Reference;
using ::com::sun::star::graphic::XGraphic;
using ::com::sun::star::graphic::XGraphicProvider;
using namespace ::com::sun::star;
-// -----------------------------------------------------------------------------
-// TkResMgr
-// -----------------------------------------------------------------------------
-SimpleResMgr* TkResMgr::m_pSimpleResMgr = NULL;
-ResMgr* TkResMgr::m_pResMgr = NULL;
-
-// -----------------------------------------------------------------------------
-
-TkResMgr::EnsureDelete::~EnsureDelete()
-{
- delete TkResMgr::m_pSimpleResMgr;
-// delete TkResMgr::m_pResMgr;
-}
-
-// -----------------------------------------------------------------------------
-
-void TkResMgr::ensureImplExists()
-{
- if (m_pSimpleResMgr)
- return;
-
- m_pSimpleResMgr = SimpleResMgr::Create( "tk", Application::GetSettings().GetUILanguageTag() );
- m_pResMgr = ResMgr::CreateResMgr( "tk" );
-
- if (m_pSimpleResMgr)
- {
- // now that we have a impl class, make sure it's deleted on unloading the library
- static TkResMgr::EnsureDelete s_aDeleteTheImplClass;
- }
-}
-
-// -----------------------------------------------------------------------------
-OUString TkResMgr::loadString( sal_uInt16 nResId )
-{
- OUString sReturn;
-
- ensureImplExists();
- if ( m_pSimpleResMgr )
- sReturn = m_pSimpleResMgr->ReadString( nResId );
-
- return sReturn;
-}
-
-// -----------------------------------------------------------------------------
Image TkResMgr::getImageFromURL( const OUString& i_rImageURL )
{
if ( i_rImageURL.isEmpty() )
commit 2549be5a75ef2a17e56d5392f6c1592275abf65e
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Thu Nov 14 16:33:23 2013 +0000
Add namespace to accessbility's TkResMgr.
Previously this conflicted with include/toolkit/helper/tkresmgr.hxx,
breaking the Android build.
Change-Id: I195e18e42a5978fd7d415a8afaa007b3bee33190
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/accessibility/inc/accessibility/helper/accresmgr.hxx b/accessibility/inc/accessibility/helper/accresmgr.hxx
index e363590..261976f 100644
--- a/accessibility/inc/accessibility/helper/accresmgr.hxx
+++ b/accessibility/inc/accessibility/helper/accresmgr.hxx
@@ -24,11 +24,13 @@
class SimpleResMgr;
-#define TK_RES_STRING(id) TkResMgr::loadString(id)
+#define TK_RES_STRING(id) ::accessibility::TkResMgr::loadString(id)
// -----------------------------------------------------------------------------
// TkResMgr
// -----------------------------------------------------------------------------
+namespace accessibility
+{
class TkResMgr
{
@@ -57,6 +59,7 @@ public:
static OUString loadString( sal_uInt16 nResId );
};
+}
#endif // ACCESSIBILITY_HELPER_TKARESMGR_HXX
diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx
index 5487bda..953ebde 100644
--- a/accessibility/source/helper/accresmgr.cxx
+++ b/accessibility/source/helper/accresmgr.cxx
@@ -22,7 +22,7 @@
#include <tools/simplerm.hxx>
#include <vcl/svapp.hxx>
-
+using namespace accessibility;
// -----------------------------------------------------------------------------
// TkResMgr
// -----------------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list