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
e9a467ca
Kaydet (Commit)
e9a467ca
authored
Nis 02, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove static objects from static_initialization_and_destruction chain
üst
e6409de0
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
71 additions
and
58 deletions
+71
-58
core_resource.hxx
dbaccess/source/core/inc/core_resource.hxx
+0
-1
core_resource.cxx
dbaccess/source/core/resource/core_resource.cxx
+9
-4
core_resource.hxx
formula/source/core/inc/core_resource.hxx
+0
-1
core_resource.cxx
formula/source/core/resource/core_resource.cxx
+8
-3
ModuleHelper.hxx
formula/source/ui/inc/ModuleHelper.hxx
+0
-1
ModuleHelper.cxx
formula/source/ui/resource/ModuleHelper.cxx
+9
-4
ModuleHelper.hxx
reportdesign/inc/ModuleHelper.hxx
+0
-1
ModuleHelper.cxx
reportdesign/source/core/sdr/ModuleHelper.cxx
+11
-4
impex.cxx
sc/source/ui/docshell/impex.cxx
+7
-7
TemplateScanner.cxx
sd/source/ui/dlg/TemplateScanner.cxx
+19
-19
EventMultiplexer.cxx
sd/source/ui/tools/EventMultiplexer.cxx
+8
-13
No files found.
dbaccess/source/core/inc/core_resource.hxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -51,7 +51,6 @@ namespace dbaccess
class
ResourceManager
{
friend
class
OModuleClient
;
static
::
osl
::
Mutex
s_aMutex
;
/// access safety
static
sal_Int32
s_nClients
;
/// number of registered clients
static
ResMgr
*
m_pImpl
;
...
...
dbaccess/source/core/resource/core_resource.cxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -34,7 +34,7 @@
// ---- needed as long as we have no contexts for components ---
#include <vcl/svapp.hxx>
//---------------------------------------------------
#include <rtl/instance.hxx>
#include <svl/solar.hrc>
//.........................................................................
...
...
@@ -44,7 +44,12 @@ namespace dbaccess
//==================================================================
//= ResourceManager
//==================================================================
::
osl
::
Mutex
ResourceManager
::
s_aMutex
;
namespace
{
// access safety
struct
theResourceManagerMutex
:
public
rtl
::
Static
<
osl
::
Mutex
,
theResourceManagerMutex
>
{};
}
sal_Int32
ResourceManager
::
s_nClients
=
0
;
ResMgr
*
ResourceManager
::
m_pImpl
=
NULL
;
...
...
@@ -92,14 +97,14 @@ namespace dbaccess
//-------------------------------------------------------------------------
void
ResourceManager
::
registerClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theResourceManagerMutex
::
get
()
);
++
s_nClients
;
}
//-------------------------------------------------------------------------
void
ResourceManager
::
revokeClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theResourceManagerMutex
::
get
()
);
if
(
!--
s_nClients
&&
m_pImpl
)
{
delete
m_pImpl
;
...
...
formula/source/core/inc/core_resource.hxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -43,7 +43,6 @@ namespace formula
class
ResourceManager
{
friend
class
OModuleClient
;
static
::
osl
::
Mutex
s_aMutex
;
/// access safety
static
sal_Int32
s_nClients
;
/// number of registered clients
static
ResMgr
*
m_pImpl
;
...
...
formula/source/core/resource/core_resource.cxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -32,6 +32,7 @@
// ---- needed as long as we have no contexts for components ---
#include <vcl/svapp.hxx>
#include <rtl/instance.hxx>
#include <svl/solar.hrc>
//.........................................................................
...
...
@@ -41,7 +42,11 @@ namespace formula
//==================================================================
//= ResourceManager
//==================================================================
::
osl
::
Mutex
ResourceManager
::
s_aMutex
;
namespace
{
// access safety
struct
theResourceManagerMutex
:
public
rtl
::
Static
<
osl
::
Mutex
,
theResourceManagerMutex
>
{};
}
sal_Int32
ResourceManager
::
s_nClients
=
0
;
ResMgr
*
ResourceManager
::
m_pImpl
=
NULL
;
...
...
@@ -59,14 +64,14 @@ namespace formula
//-------------------------------------------------------------------------
void
ResourceManager
::
registerClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theResourceManagerMutex
::
get
()
);
++
s_nClients
;
}
//-------------------------------------------------------------------------
void
ResourceManager
::
revokeClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theResourceManagerMutex
::
get
()
);
if
(
!--
s_nClients
&&
m_pImpl
)
{
delete
m_pImpl
;
...
...
formula/source/ui/inc/ModuleHelper.hxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -49,7 +49,6 @@ namespace formula
// not implemented. OModule is a static class
protected
:
static
::
osl
::
Mutex
s_aMutex
;
/// access safety
static
sal_Int32
s_nClients
;
/// number of registered clients
static
OModuleImpl
*
s_pImpl
;
/// impl class. lives as long as at least one client for the module is registered
...
...
formula/source/ui/resource/ModuleHelper.cxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -32,13 +32,14 @@
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/instance.hxx>
#include <rtl/uri.hxx>
#include <tools/debug.hxx>
#include <svl/solar.hrc>
#define EXPAND_PROTOCOL "vnd.sun.star.expand:"
#define ENTER_MOD_METHOD() \
::osl::MutexGuard aGuard(
s_aMutex
); \
::osl::MutexGuard aGuard(
theOModuleMutex::get()
); \
ensureImpl()
//.........................................................................
...
...
@@ -98,7 +99,11 @@ ResMgr* OModuleImpl::getResManager()
//=========================================================================
//= OModule
//=========================================================================
::
osl
::
Mutex
OModule
::
s_aMutex
;
namespace
{
// access safety
struct
theOModuleMutex
:
public
rtl
::
Static
<
osl
::
Mutex
,
theOModuleMutex
>
{};
}
sal_Int32
OModule
::
s_nClients
=
0
;
OModuleImpl
*
OModule
::
s_pImpl
=
NULL
;
//-------------------------------------------------------------------------
...
...
@@ -111,14 +116,14 @@ ResMgr* OModule::getResManager()
//-------------------------------------------------------------------------
void
OModule
::
registerClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theOModuleMutex
::
get
()
);
++
s_nClients
;
}
//-------------------------------------------------------------------------
void
OModule
::
revokeClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theOModuleMutex
::
get
()
);
if
(
!--
s_nClients
&&
s_pImpl
)
{
delete
s_pImpl
;
...
...
reportdesign/inc/ModuleHelper.hxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -50,7 +50,6 @@ namespace rptui
// not implemented. OModule is a static class
protected
:
static
::
osl
::
Mutex
s_aMutex
;
/// access safety
static
sal_Int32
s_nClients
;
/// number of registered clients
static
OModuleImpl
*
s_pImpl
;
/// impl class. lives as long as at least one client for the module is registered
...
...
reportdesign/source/core/sdr/ModuleHelper.cxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -32,13 +32,14 @@
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/instance.hxx>
#include <rtl/uri.hxx>
#include <tools/debug.hxx>
#include <svl/solar.hrc>
#define EXPAND_PROTOCOL "vnd.sun.star.expand:"
#define ENTER_MOD_METHOD() \
::osl::MutexGuard aGuard(
s_aMutex
); \
::osl::MutexGuard aGuard(
theOModuleMutex::get()
); \
ensureImpl()
//.........................................................................
...
...
@@ -98,7 +99,13 @@ ResMgr* OModuleImpl::getResManager()
//=========================================================================
//= OModule
//=========================================================================
::
osl
::
Mutex
OModule
::
s_aMutex
;
namespace
{
// access safety
struct
theOModuleMutex
:
public
rtl
::
Static
<
osl
::
Mutex
,
theOModuleMutex
>
{};
}
sal_Int32
OModule
::
s_nClients
=
0
;
OModuleImpl
*
OModule
::
s_pImpl
=
NULL
;
//-------------------------------------------------------------------------
...
...
@@ -111,14 +118,14 @@ ResMgr* OModule::getResManager()
//-------------------------------------------------------------------------
void
OModule
::
registerClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theOModuleMutex
::
get
()
);
++
s_nClients
;
}
//-------------------------------------------------------------------------
void
OModule
::
revokeClient
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMutex
);
::
osl
::
MutexGuard
aGuard
(
theOModuleMutex
::
get
()
);
if
(
!--
s_nClients
&&
s_pImpl
)
{
delete
s_pImpl
;
...
...
sc/source/ui/docshell/impex.cxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -89,9 +89,9 @@ class StarBASIC;
namespace
{
const
String
SYLK_LF
=
String
::
CreateFromAscii
(
"
\x1b
:"
)
;
const
String
DOUBLE_SEMICOLON
=
String
::
CreateFromAscii
(
";;"
)
;
const
String
DOUBLE_DOUBLEQUOTE
=
String
::
CreateFromAscii
(
"
\"\"
"
)
;
const
char
SYLK_LF
[]
=
"
\x1b
:"
;
const
char
DOUBLE_SEMICOLON
[]
=
";;"
;
const
char
DOUBLE_DOUBLEQUOTE
[]
=
"
\"\"
"
;
}
enum
SylkVersion
...
...
@@ -624,11 +624,11 @@ void lcl_UnescapeSylk( String & rString, SylkVersion eVersion )
// Older versions quoted the string and doubled embedded quotes, but not
// the semicolons, which was plain wrong.
if
(
eVersion
>=
SYLK_OOO32
)
rString
.
SearchAndReplaceAll
(
DOUBLE_SEMICOLON
,
';'
);
rString
.
SearchAndReplaceAll
(
rtl
::
OUString
(
DOUBLE_SEMICOLON
)
,
';'
);
else
rString
.
SearchAndReplaceAll
(
DOUBLE_DOUBLEQUOTE
,
'"'
);
rString
.
SearchAndReplaceAll
(
rtl
::
OUString
(
DOUBLE_DOUBLEQUOTE
)
,
'"'
);
rString
.
SearchAndReplaceAll
(
SYLK_LF
,
_LF
);
rString
.
SearchAndReplaceAll
(
rtl
::
OUString
(
SYLK_LF
)
,
_LF
);
}
static
const
sal_Unicode
*
lcl_ScanSylkString
(
const
sal_Unicode
*
p
,
...
...
@@ -1857,7 +1857,7 @@ sal_Bool ScImportExport::Doc2Sylk( SvStream& rStrm )
case
CELLTYPE_EDIT
:
hasstring
:
pDoc
->
GetString
(
nCol
,
nRow
,
aRange
.
aStart
.
Tab
(),
aCellStr
);
aCellStr
.
SearchAndReplaceAll
(
_LF
,
SYLK_LF
);
aCellStr
.
SearchAndReplaceAll
(
_LF
,
rtl
::
OUString
(
SYLK_LF
)
);
aBufStr
.
AssignAscii
(
RTL_CONSTASCII_STRINGPARAM
(
"C;X"
));
aBufStr
+=
String
::
CreateFromInt32
(
c
);
...
...
sd/source/ui/dlg/TemplateScanner.cxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -52,20 +52,20 @@ using namespace ::com::sun::star::uno;
namespace
{
const
::
rtl
::
OUString
TITLE
(
RTL_CONSTASCII_USTRINGPARAM
(
"Title"
))
;
const
::
rtl
::
OUString
TARGET_DIR_URL
(
RTL_CONSTASCII_USTRINGPARAM
(
"TargetDirURL"
))
;
const
::
rtl
::
OUString
DESCRIPTION
(
RTL_CONSTASCII_USTRINGPARAM
(
"TypeDescription"
))
;
const
::
rtl
::
OUString
TARGET_URL
(
RTL_CONSTASCII_USTRINGPARAM
(
"TargetURL"
))
;
const
char
TITLE
[]
=
"Title"
;
const
char
TARGET_DIR_URL
[]
=
"TargetDirURL"
;
const
char
DESCRIPTION
[]
=
"TypeDescription"
;
const
char
TARGET_URL
[]
=
"TargetURL"
;
const
::
rtl
::
OUString
DOCTEMPLATES
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.DocumentTemplates"
))
;
const
char
DOCTEMPLATES
[]
=
"com.sun.star.frame.DocumentTemplates"
;
// These strings are used to find impress templates in the tree of
// template files. Should probably be determined dynamically.
const
::
rtl
::
OUString
IMPRESS_BIN_TEMPLATE
(
RTL_CONSTASCII_USTRINGPARAM
(
"application/vnd.stardivision.impress"
))
;
const
::
rtl
::
OUString
IMPRESS_XML_TEMPLATE
=
MIMETYPE_VND_SUN_XML_IMPRESS
;
const
char
IMPRESS_BIN_TEMPLATE
[]
=
"application/vnd.stardivision.impress"
;
const
char
IMPRESS_XML_TEMPLATE
[]
=
MIMETYPE_VND_SUN_XML_IMPRESS_ASCII
;
// The following id comes from the bugdoc in #i2764#.
const
::
rtl
::
OUString
IMPRESS_XML_TEMPLATE_B
(
RTL_CONSTASCII_USTRINGPARAM
(
"Impress 2.0"
))
;
const
::
rtl
::
OUString
IMPRESS_XML_TEMPLATE_OASIS
=
MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION
;
const
char
IMPRESS_XML_TEMPLATE_B
[]
=
"Impress 2.0"
;
const
char
IMPRESS_XML_TEMPLATE_OASIS
[]
=
MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII
;
class
FolderDescriptor
...
...
@@ -225,7 +225,7 @@ TemplateScanner::State TemplateScanner::GetTemplateRoot (void)
if
(
xFactory
.
is
())
{
Reference
<
frame
::
XDocumentTemplates
>
xTemplates
(
xFactory
->
createInstance
(
DOCTEMPLATES
),
UNO_QUERY
);
xFactory
->
createInstance
(
rtl
::
OUString
(
DOCTEMPLATES
)
),
UNO_QUERY
);
DBG_ASSERT
(
xTemplates
.
is
(),
"TemplateScanner::GetTemplateRoot: xTemplates is NULL"
);
if
(
xTemplates
.
is
())
...
...
@@ -253,9 +253,9 @@ TemplateScanner::State TemplateScanner::InitializeEntryScanning (void)
// We are interested only in three properties: the entry's name,
// its URL, and its content type.
Sequence
<
rtl
::
OUString
>
aProps
(
3
);
aProps
[
0
]
=
TITLE
;
aProps
[
1
]
=
TARGET_URL
;
aProps
[
2
]
=
DESCRIPTION
;
aProps
[
0
]
=
rtl
::
OUString
(
TITLE
)
;
aProps
[
1
]
=
rtl
::
OUString
(
TARGET_URL
)
;
aProps
[
2
]
=
rtl
::
OUString
(
DESCRIPTION
)
;
// Create a cursor to iterate over the templates in this folders.
::
ucbhelper
::
ResultSetInclude
eInclude
=
::
ucbhelper
::
INCLUDE_DOCUMENTS_ONLY
;
...
...
@@ -294,10 +294,10 @@ TemplateScanner::State TemplateScanner::ScanEntry (void)
// add a new entry to the resulting list (which is created
// first if necessary).
if
(
(
sContentType
==
MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE
)
||
(
sContentType
==
IMPRESS_XML_TEMPLATE_OASIS
)
||
(
sContentType
==
IMPRESS_BIN_TEMPLATE
)
||
(
sContentType
==
IMPRESS_XML_TEMPLATE
)
||
(
sContentType
==
IMPRESS_XML_TEMPLATE_B
))
||
(
sContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
IMPRESS_XML_TEMPLATE_OASIS
))
)
||
(
sContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
IMPRESS_BIN_TEMPLATE
))
)
||
(
sContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
IMPRESS_XML_TEMPLATE
))
)
||
(
sContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
IMPRESS_XML_TEMPLATE_B
))
))
{
::
rtl
::
OUString
sLocalisedTitle
=
SfxDocumentTemplates
::
ConvertResourceString
(
STR_TEMPLATE_NAME1_DEF
,
STR_TEMPLATE_NAME1
,
NUM_TEMPLATE_NAMES
,
sTitle
);
...
...
@@ -347,8 +347,8 @@ TemplateScanner::State TemplateScanner::InitializeFolderScanning (void)
// Define the list of properties we are interested in.
Sequence
<
rtl
::
OUString
>
aProps
(
2
);
aProps
[
0
]
=
TITLE
;
aProps
[
1
]
=
TARGET_DIR_URL
;
aProps
[
0
]
=
rtl
::
OUString
(
TITLE
)
;
aProps
[
1
]
=
rtl
::
OUString
(
TARGET_DIR_URL
)
;
// Create an cursor to iterate over the template folders.
::
ucbhelper
::
ResultSetInclude
eInclude
=
::
ucbhelper
::
INCLUDE_FOLDERS_ONLY
;
...
...
sd/source/ui/tools/EventMultiplexer.cxx
Dosyayı görüntüle @
e9a467ca
...
...
@@ -153,9 +153,6 @@ private:
::
com
::
sun
::
star
::
drawing
::
framework
::
XConfigurationController
>
mxConfigurationControllerWeak
;
static
const
::
rtl
::
OUString
msCurrentPagePropertyName
;
static
const
::
rtl
::
OUString
msEditModePropertyName
;
void
ReleaseListeners
(
void
);
void
ConnectToController
(
void
);
...
...
@@ -175,10 +172,8 @@ private:
};
const
::
rtl
::
OUString
EventMultiplexer
::
Implementation
::
msCurrentPagePropertyName
(
RTL_CONSTASCII_USTRINGPARAM
(
"CurrentPage"
));
const
::
rtl
::
OUString
EventMultiplexer
::
Implementation
::
msEditModePropertyName
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsMasterPageMode"
));
const
char
aCurrentPagePropertyName
[]
=
"CurrentPage"
;
const
char
aEditModePropertyName
[]
=
"IsMasterPageMode"
;
//===== EventMultiplexer ======================================================
...
...
@@ -441,7 +436,7 @@ void EventMultiplexer::Implementation::ConnectToController (void)
{
try
{
xSet
->
addPropertyChangeListener
(
msCurrentPagePropertyName
,
this
);
xSet
->
addPropertyChangeListener
(
rtl
::
OUString
(
aCurrentPagePropertyName
)
,
this
);
}
catch
(
const
beans
::
UnknownPropertyException
&
)
{
...
...
@@ -450,7 +445,7 @@ void EventMultiplexer::Implementation::ConnectToController (void)
try
{
xSet
->
addPropertyChangeListener
(
msEditModePropertyName
,
this
);
xSet
->
addPropertyChangeListener
(
rtl
::
OUString
(
aEditModePropertyName
)
,
this
);
}
catch
(
const
beans
::
UnknownPropertyException
&
)
{
...
...
@@ -488,7 +483,7 @@ void EventMultiplexer::Implementation::DisconnectFromController (void)
{
try
{
xSet
->
removePropertyChangeListener
(
msCurrentPagePropertyName
,
this
);
xSet
->
removePropertyChangeListener
(
rtl
::
OUString
(
aCurrentPagePropertyName
)
,
this
);
}
catch
(
const
beans
::
UnknownPropertyException
&
)
{
...
...
@@ -497,7 +492,7 @@ void EventMultiplexer::Implementation::DisconnectFromController (void)
try
{
xSet
->
removePropertyChangeListener
(
msEditModePropertyName
,
this
);
xSet
->
removePropertyChangeListener
(
rtl
::
OUString
(
aEditModePropertyName
)
,
this
);
}
catch
(
const
beans
::
UnknownPropertyException
&
)
{
...
...
@@ -560,11 +555,11 @@ void SAL_CALL EventMultiplexer::Implementation::propertyChange (
{
ThrowIfDisposed
();
if
(
rEvent
.
PropertyName
.
equals
(
msCurrentPagePropertyName
))
if
(
rEvent
.
PropertyName
.
equals
AsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
aCurrentPagePropertyName
)
))
{
CallListeners
(
EventMultiplexerEvent
::
EID_CURRENT_PAGE
);
}
else
if
(
rEvent
.
PropertyName
.
equals
(
msEditModePropertyName
))
else
if
(
rEvent
.
PropertyName
.
equals
AsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
aEditModePropertyName
)
))
{
bool
bIsMasterPageMode
(
false
);
rEvent
.
NewValue
>>=
bIsMasterPageMode
;
...
...
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