Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
94b0c220
Kaydet (Commit)
94b0c220
authored
Eki 06, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:mergeclasses
Change-Id: Ia19514d33fd025a1df9d26b94e2d39113d122392
üst
2e658321
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
23 deletions
+11
-23
mergeclasses.results
compilerplugins/clang/mergeclasses.results
+0
-1
oooresourceloader.cxx
extensions/source/resource/oooresourceloader.cxx
+11
-22
No files found.
compilerplugins/clang/mergeclasses.results
Dosyayı görüntüle @
94b0c220
...
...
@@ -161,7 +161,6 @@ merge dbmm::IProgressConsumer with dbmm::ProgressDelegator
merge dbmm::MacroMigrationModuleClient with dbmm::MacroMigrationDialogService
merge dbp::OModuleResourceClient with dbp::OUnoAutoPilot
merge dbtools::ISQLStatementHelper with connectivity::mysql::OTables
merge extensions::resource::IResourceType with extensions::resource::StringResourceAccess
merge formula::ExternalReferenceHelper with ScExternalRefManager
merge formula::IStructHelper with formula::StructPage
merge framework::IComboBoxListener with framework::ComboboxToolbarController
...
...
extensions/source/resource/oooresourceloader.cxx
Dosyayı görüntüle @
94b0c220
...
...
@@ -39,13 +39,14 @@ namespace extensions { namespace resource
{
/** encapsulates access to a fixed resource type
*/
class
IResourceType
class
StringResourceAccess
{
public
:
StringResourceAccess
();
/** returns the RESOURCE_TYPE associated with this instance
*/
virtual
RESOURCE_TYPE
getResourceType
()
const
=
0
;
static
RESOURCE_TYPE
getResourceType
();
/** reads a single resource from the given resource manager
@param _resourceManager
the resource manager to read from
...
...
@@ -57,31 +58,19 @@ namespace extensions { namespace resource
the caller checked via <code>_resourceManager.IsAvailable( getResourceType(), _resourceId )</code>
that the required resource really exists
*/
virtual
Any
getResource
(
SimpleResMgr
&
_resourceManager
,
sal_Int32
_resourceId
)
const
=
0
;
virtual
~
IResourceType
()
{
};
};
class
StringResourceAccess
:
public
IResourceType
{
public
:
StringResourceAccess
();
// IResourceType
virtual
RESOURCE_TYPE
getResourceType
()
const
SAL_OVERRIDE
;
virtual
Any
getResource
(
SimpleResMgr
&
_resourceManager
,
sal_Int32
_resourceId
)
const
SAL_OVERRIDE
;
static
Any
getResource
(
SimpleResMgr
&
_resourceManager
,
sal_Int32
_resourceId
);
};
StringResourceAccess
::
StringResourceAccess
()
{
}
RESOURCE_TYPE
StringResourceAccess
::
getResourceType
()
const
RESOURCE_TYPE
StringResourceAccess
::
getResourceType
()
{
return
RSC_STRING
;
}
Any
StringResourceAccess
::
getResource
(
SimpleResMgr
&
_resourceManager
,
sal_Int32
_resourceId
)
const
Any
StringResourceAccess
::
getResource
(
SimpleResMgr
&
_resourceManager
,
sal_Int32
_resourceId
)
{
OSL_PRECOND
(
_resourceManager
.
IsAvailable
(
getResourceType
(),
_resourceId
),
"StringResourceAccess::getResource: precondition not met!"
);
Any
aResource
;
...
...
@@ -94,7 +83,7 @@ namespace extensions { namespace resource
class
OpenOfficeResourceBundle
:
public
OpenOfficeResourceBundle_Base
{
private
:
typedef
std
::
shared_ptr
<
IResourceType
>
ResourceTypePtr
;
typedef
std
::
shared_ptr
<
StringResourceAccess
>
ResourceTypePtr
;
typedef
::
std
::
map
<
OUString
,
ResourceTypePtr
>
ResourceTypes
;
::
osl
::
Mutex
m_aMutex
;
...
...
@@ -257,11 +246,11 @@ namespace extensions { namespace resource
if
(
!
impl_getResourceTypeAndId_nothrow
(
_key
,
resourceType
,
resourceId
)
)
return
false
;
if
(
!
m_pResourceManager
->
IsAvailable
(
resourceType
->
getResourceType
(),
resourceId
)
)
if
(
!
m_pResourceManager
->
IsAvailable
(
StringResourceAccess
::
getResourceType
(),
resourceId
)
)
// no such resource with the given type/id
return
false
;
_out_Element
=
resourceType
->
getResource
(
*
m_pResourceManager
,
resourceId
);
_out_Element
=
StringResourceAccess
::
getResource
(
*
m_pResourceManager
,
resourceId
);
return
_out_Element
.
hasValue
();
}
...
...
@@ -308,7 +297,7 @@ namespace extensions { namespace resource
if
(
!
impl_getResourceTypeAndId_nothrow
(
_key
,
resourceType
,
resourceId
)
)
return
sal_False
;
if
(
!
m_pResourceManager
->
IsAvailable
(
resourceType
->
getResourceType
(),
resourceId
)
)
if
(
!
m_pResourceManager
->
IsAvailable
(
StringResourceAccess
::
getResourceType
(),
resourceId
)
)
return
sal_False
;
return
sal_True
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment