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
af4ae63b
Kaydet (Commit)
af4ae63b
authored
Mar 27, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
svx/source/inc/trace.hxx -> SAL_INFO
Change-Id: I019f41aeb41ec150087e6f544cff3b36719d1845
üst
d7ea9c2c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
197 deletions
+22
-197
log-areas.dox
sal/inc/sal/log-areas.dox
+1
-0
Library_svxcore.mk
svx/Library_svxcore.mk
+0
-1
fmgridcl.cxx
svx/source/fmcomp/fmgridcl.cxx
+1
-2
gridctrl.cxx
svx/source/fmcomp/gridctrl.cxx
+20
-27
trace.cxx
svx/source/fmcomp/trace.cxx
+0
-105
trace.hxx
svx/source/inc/trace.hxx
+0
-62
No files found.
sal/inc/sal/log-areas.dox
Dosyayı görüntüle @
af4ae63b
...
...
@@ -188,6 +188,7 @@ certain functionality.
@section svx
@li @c svx.dialog
@li @c svx.fmcomp
@li @c svx.form
@li @c svx.stbcrtls - StatusBarControl
@li @c svx.table
...
...
svx/Library_svxcore.mk
Dosyayı görüntüle @
af4ae63b
...
...
@@ -389,7 +389,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/fmcomp/gridcell \
svx/source/fmcomp/gridcols \
svx/source/fmcomp/gridctrl \
svx/source/fmcomp/trace \
svx/source/fmcomp/xmlexchg \
svx/source/form/dataaccessdescriptor \
svx/source/form/datalistener \
...
...
svx/source/fmcomp/fmgridcl.cxx
Dosyayı görüntüle @
af4ae63b
...
...
@@ -33,7 +33,6 @@
#include "svx/fmgridcl.hxx"
#include "svx/svxdlg.hxx"
#include "svx/svxids.hrc"
#include "trace.hxx"
#include <com/sun/star/form/XConfirmDeleteListener.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
...
...
@@ -1404,7 +1403,7 @@ void FmGridControl::DeleteSelectedRows()
//------------------------------------------------------------------------------
void
FmGridControl
::
positioned
(
const
::
com
::
sun
::
star
::
lang
::
EventObject
&
/*rEvent*/
)
{
TRACE_RANGE
(
"FmGridControl::positioned"
);
SAL_INFO
(
"svx.fmcmop"
,
"FmGridControl::positioned"
);
// position on the data source (force it to be done in the main thread)
implAdjustInSolarThread
(
sal_False
);
}
...
...
svx/source/fmcomp/gridctrl.cxx
Dosyayı görüntüle @
af4ae63b
...
...
@@ -56,7 +56,6 @@
#include <comphelper/stl_types.hxx>
#include <comphelper/property.hxx>
#include "trace.hxx"
#include <algorithm>
...
...
@@ -72,7 +71,7 @@ using namespace ::com::sun::star::datatransfer;
using
namespace
::
com
::
sun
::
star
::
container
;
using
namespace
com
::
sun
::
star
::
accessibility
;
#define ROWSTATUS(row)
!row.Is() ? "NULL" : row->GetStatus() == GRS_CLEAN ? "CLEAN" : row->GetStatus() == GRS_MODIFIED ? "MODIFIED" : row->GetStatus() == GRS_DELETED ? "DELETED" : "INVALID"
#define ROWSTATUS(row)
(!row.Is() ? "NULL" : row->GetStatus() == GRS_CLEAN ? "CLEAN" : row->GetStatus() == GRS_MODIFIED ? "MODIFIED" : row->GetStatus() == GRS_DELETED ? "DELETED" : "INVALID")
#define DEFAULT_BROWSE_MODE \
...
...
@@ -2223,7 +2222,7 @@ void DbGridControl::setDisplaySynchron(sal_Bool bSync)
//------------------------------------------------------------------------------
void
DbGridControl
::
AdjustDataSource
(
sal_Bool
bFull
)
{
TRACE_RANGE
(
"DbGridControl::AdjustDataSource"
);
SAL_INFO
(
"svx.fmcomp"
,
"DbGridControl::AdjustDataSource"
);
SolarMutexGuard
aGuard
;
// wird die aktuelle Zeile gerade neu bestimmt,
// wird kein abgleich vorgenommen
...
...
@@ -2251,7 +2250,7 @@ void DbGridControl::AdjustDataSource(sal_Bool bFull)
// position of my data cursor is the same as the position our current row points tpo
// sync the status, repaint, done
DBG_ASSERT
(
m_xDataRow
==
m_xCurrentRow
,
"Fehler in den Datenzeilen"
);
TRACE_RANGE_MESSAGE1
(
"same position, new state : %s"
,
ROWSTATUS
(
m_xCurrentRow
));
SAL_INFO
(
"svx.fmcomp"
,
"same position, new state: "
<<
ROWSTATUS
(
m_xCurrentRow
));
RowModified
(
m_nCurrentPos
);
return
;
}
...
...
@@ -2767,7 +2766,7 @@ void DbGridControl::PostExecuteRowContextMenu(sal_uInt16 /*nRow*/, const PopupMe
//------------------------------------------------------------------------------
void
DbGridControl
::
DataSourcePropertyChanged
(
const
PropertyChangeEvent
&
evt
)
throw
(
RuntimeException
)
{
TRACE_RANGE
(
"DbGridControl::DataSourcePropertyChanged"
);
SAL_INFO
(
"svx.fmcomp"
,
"DbGridControl::DataSourcePropertyChanged"
);
SolarMutexGuard
aGuard
;
// prop "IsModified" changed ?
// during update don't care about the modified state
...
...
@@ -2812,7 +2811,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th
m_xCurrentRow
->
SetStatus
(
::
comphelper
::
getBOOL
(
evt
.
NewValue
)
?
GRS_MODIFIED
:
GRS_CLEAN
);
m_xCurrentRow
->
SetNew
(
bIsNew
);
InvalidateStatusCell
(
m_nCurrentPos
);
TRACE_RANGE_MESSAGE1
(
"modified flag changed, new state : %s"
,
ROWSTATUS
(
m_xCurrentRow
));
SAL_INFO
(
"svx.fmcomp"
,
"modified flag changed, new state: "
<<
ROWSTATUS
(
m_xCurrentRow
));
}
}
}
...
...
@@ -2998,13 +2997,13 @@ void DbGridControl::InitController(CellControllerRef& /*rController*/, long /*nR
//------------------------------------------------------------------------------
void
DbGridControl
::
CellModified
()
{
TRACE_RANGE
(
"DbGridControl::CellModified"
);
SAL_INFO
(
"svx.fmcomp"
,
"DbGridControl::CellModified"
);
{
::
osl
::
MutexGuard
aGuard
(
m_aAdjustSafety
);
if
(
m_nAsynAdjustEvent
)
{
TRACE_RANGE_MESSAGE1
(
"forcing a synchron call to "
,
m_bPendingAdjustRows
?
"AdjustRows"
:
"AdustDataSource"
);
SAL_INFO
(
"svx.fmcomp"
,
"forcing a synchron call to "
<<
(
m_bPendingAdjustRows
?
"AdjustRows"
:
"AdustDataSource"
)
);
RemoveUserEvent
(
m_nAsynAdjustEvent
);
m_nAsynAdjustEvent
=
0
;
...
...
@@ -3024,7 +3023,7 @@ void DbGridControl::CellModified()
if
(
m_xCurrentRow
->
IsNew
())
{
m_xCurrentRow
->
SetStatus
(
GRS_MODIFIED
);
TRACE_RANGE_MESSAGE
(
"current row is new, new state
: MODIFIED"
);
SAL_INFO
(
"svx.fmcomp"
,
"current row is new, new state
: MODIFIED"
);
// wenn noch keine Zeile hinzugefuegt wurde, dann neue hinzunehmen
if
(
m_nCurrentPos
==
GetRowCount
()
-
1
)
{
...
...
@@ -3037,9 +3036,9 @@ void DbGridControl::CellModified()
else
if
(
m_xCurrentRow
->
GetStatus
()
!=
GRS_MODIFIED
)
{
m_xCurrentRow
->
SetState
(
m_pDataCursor
,
sal_False
);
TRACE_RANGE_MESSAGE1
(
"current row is not new, after SetState, new state : %s"
,
ROWSTATUS
(
m_xCurrentRow
));
SAL_INFO
(
"svx.fmcomp"
,
"current row is not new, after SetState, new state: "
<<
ROWSTATUS
(
m_xCurrentRow
));
m_xCurrentRow
->
SetStatus
(
GRS_MODIFIED
);
TRACE_RANGE_MESSAGE
(
"current row is not new, new state
: MODIFIED"
);
SAL_INFO
(
"svx.fmcomp"
,
"current row is not new, new state
: MODIFIED"
);
InvalidateStatusCell
(
m_nCurrentPos
);
}
}
...
...
@@ -3193,7 +3192,7 @@ sal_Bool DbGridControl::IsInsertionRow(long nRow) const
//------------------------------------------------------------------------------
sal_Bool
DbGridControl
::
SaveModified
()
{
TRACE_RANGE
(
"DbGridControl::SaveModified"
);
SAL_INFO
(
"svx.fmcomp"
,
"DbGridControl::SaveModified"
);
DBG_ASSERT
(
IsValid
(
m_xCurrentRow
),
"GridControl:: Invalid row"
);
if
(
!
IsValid
(
m_xCurrentRow
))
return
sal_True
;
...
...
@@ -3223,15 +3222,13 @@ sal_Bool DbGridControl::SaveModified()
if
(
IsValid
(
m_xCurrentRow
)
)
{
m_xCurrentRow
->
SetState
(
m_pDataCursor
,
sal_False
);
TRACE_RANGE_MESSAGE1
(
"explicit SetState, new state : %s"
,
ROWSTATUS
(
m_xCurrentRow
));
SAL_INFO
(
"svx.fmcomp"
,
"explicit SetState, new state: "
<<
ROWSTATUS
(
m_xCurrentRow
));
InvalidateStatusCell
(
m_nCurrentPos
);
}
#ifdef DBG_UTIL
else
{
TRACE_RANGE_MESSAGE1
(
"no SetState, new state : %s"
,
ROWSTATUS
(
m_xCurrentRow
));
SAL_INFO
(
"svx.fmcomp"
,
"no SetState, new state: "
<<
ROWSTATUS
(
m_xCurrentRow
));
}
#endif
}
else
{
...
...
@@ -3245,7 +3242,7 @@ sal_Bool DbGridControl::SaveModified()
//------------------------------------------------------------------------------
sal_Bool
DbGridControl
::
SaveRow
()
{
TRACE_RANGE
(
"DbGridControl::SaveRow"
);
SAL_INFO
(
"svx.fmcomp"
,
"DbGridControl::SaveRow"
);
// gueltige Zeile
if
(
!
IsValid
(
m_xCurrentRow
)
||
!
IsModified
())
return
sal_True
;
...
...
@@ -3283,7 +3280,7 @@ sal_Bool DbGridControl::SaveRow()
// if we are appending we still sit on the insert row
// we don't move just clear the flags not to move on the current row
m_xCurrentRow
->
SetState
(
m_pDataCursor
,
sal_False
);
TRACE_RANGE_MESSAGE1
(
"explicit SetState after a successfull update, new state : %s"
,
ROWSTATUS
(
m_xCurrentRow
));
SAL_INFO
(
"svx.fmcomp"
,
"explicit SetState after a successfull update, new state: "
<<
ROWSTATUS
(
m_xCurrentRow
));
m_xCurrentRow
->
SetNew
(
sal_False
);
// adjust the seekcursor if it is on the same position as the datacursor
...
...
@@ -3541,27 +3538,23 @@ sal_uInt16 DbGridControl::GetModelColumnPos( sal_uInt16 nId ) const
//------------------------------------------------------------------------------
void
DbGridControl
::
implAdjustInSolarThread
(
sal_Bool
_bRows
)
{
TRACE_RANGE
(
"DbGridControl::implAdjustInSolarThread"
);
SAL_INFO
(
"svx.fmcomp"
,
"DbGridControl::implAdjustInSolarThread"
);
::
osl
::
MutexGuard
aGuard
(
m_aAdjustSafety
);
if
(
::
osl
::
Thread
::
getCurrentIdentifier
()
!=
Application
::
GetMainThreadIdentifier
())
{
m_nAsynAdjustEvent
=
PostUserEvent
(
LINK
(
this
,
DbGridControl
,
OnAsyncAdjust
),
reinterpret_cast
<
void
*
>
(
_bRows
));
m_bPendingAdjustRows
=
_bRows
;
#ifdef DBG_UTIL
if
(
_bRows
)
TRACE_RANGE_MESSAGE
(
"posting an AdjustRows"
)
SAL_INFO
(
"svx.fmcomp"
,
"posting an AdjustRows"
);
else
TRACE_RANGE_MESSAGE
(
"posting an AdjustDataSource"
)
#endif
SAL_INFO
(
"svx.fmcomp"
,
"posting an AdjustDataSource"
);
}
else
{
#ifdef DBG_UTIL
if
(
_bRows
)
TRACE_RANGE_MESSAGE
(
"doing an AdjustRows"
)
SAL_INFO
(
"svx.fmcomp"
,
"doing an AdjustRows"
);
else
TRACE_RANGE_MESSAGE
(
"doing an AdjustDataSource"
)
#endif
SAL_INFO
(
"svx.fmcomp"
,
"doing an AdjustDataSource"
);
// always adjust the rows before adjusting the data source
// If this is not necessary (because the row count did not change), nothing is done
// The problem is that we can't rely on the order of which the calls come in: If the cursor was moved
...
...
svx/source/fmcomp/trace.cxx
deleted
100644 → 0
Dosyayı görüntüle @
d7ea9c2c
/* -*- 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 "trace.hxx"
#include <tools/debug.hxx>
#include <rtl/strbuf.hxx>
#if defined(DBG_UTIL)
//==============================================================================
//------------------------------------------------------------------------------
::
osl
::
Mutex
Tracer
::
s_aMapSafety
;
::
std
::
map
<
::
oslThreadIdentifier
,
sal_Int32
,
::
std
::
less
<
oslThreadIdentifier
>
>
Tracer
::
s_aThreadIndents
;
//------------------------------------------------------------------------------
Tracer
::
Tracer
(
const
char
*
_pBlockDescription
)
:
m_sBlockDescription
(
_pBlockDescription
)
{
::
osl
::
MutexGuard
aGuard
(
s_aMapSafety
);
sal_uInt32
nIndent
=
s_aThreadIndents
[
::
osl
::
Thread
::
getCurrentIdentifier
()
]
++
;
rtl
::
OStringBuffer
sMessage
;
sMessage
.
append
(
static_cast
<
sal_Int32
>
(
::
osl
::
Thread
::
getCurrentIdentifier
()));
sMessage
.
append
(
'\t'
);
while
(
nIndent
--
)
sMessage
.
append
(
'\t'
);
sMessage
.
append
(
m_sBlockDescription
);
sMessage
.
append
(
RTL_CONSTASCII_STRINGPARAM
(
" {"
));
OSL_TRACE
(
sMessage
.
getStr
());
}
//------------------------------------------------------------------------------
Tracer
::~
Tracer
()
{
::
osl
::
MutexGuard
aGuard
(
s_aMapSafety
);
sal_Int32
nIndent
=
--
s_aThreadIndents
[
::
osl
::
Thread
::
getCurrentIdentifier
()
];
rtl
::
OStringBuffer
sMessage
;
sMessage
.
append
(
static_cast
<
sal_Int32
>
(
::
osl
::
Thread
::
getCurrentIdentifier
()));
sMessage
.
append
(
'\t'
);
while
(
nIndent
--
)
sMessage
.
append
(
'\t'
);
sMessage
.
append
(
RTL_CONSTASCII_STRINGPARAM
(
"} // "
));
sMessage
.
append
(
m_sBlockDescription
);
OSL_TRACE
(
sMessage
.
getStr
());
}
//------------------------------------------------------------------------------
void
Tracer
::
TraceString
(
const
char
*
_pMessage
)
{
::
osl
::
MutexGuard
aGuard
(
s_aMapSafety
);
sal_Int32
nIndent
=
s_aThreadIndents
[
::
osl
::
Thread
::
getCurrentIdentifier
()
];
rtl
::
OStringBuffer
sMessage
;
sMessage
.
append
(
static_cast
<
sal_Int32
>
(
::
osl
::
Thread
::
getCurrentIdentifier
()));
sMessage
.
append
(
'\t'
);
while
(
nIndent
--
)
sMessage
.
append
(
'\t'
);
sMessage
.
append
(
m_sBlockDescription
);
sMessage
.
append
(
RTL_CONSTASCII_STRINGPARAM
(
": "
));
sMessage
.
append
(
_pMessage
);
OSL_TRACE
(
sMessage
.
getStr
());
}
//------------------------------------------------------------------------------
void
Tracer
::
TraceString1StringParam
(
const
char
*
_pMessage
,
const
char
*
_pParam
)
{
::
osl
::
MutexGuard
aGuard
(
s_aMapSafety
);
sal_Int32
nIndent
=
s_aThreadIndents
[
::
osl
::
Thread
::
getCurrentIdentifier
()
];
rtl
::
OStringBuffer
sMessage
;
sMessage
.
append
(
static_cast
<
sal_Int32
>
(
::
osl
::
Thread
::
getCurrentIdentifier
()));
sMessage
.
append
(
'\t'
);
while
(
nIndent
--
)
sMessage
.
append
(
'\t'
);
sMessage
.
append
(
m_sBlockDescription
);
sMessage
.
append
(
RTL_CONSTASCII_STRINGPARAM
(
": "
));
sMessage
.
append
(
_pMessage
);
OSL_TRACE
(
sMessage
.
getStr
(),
_pParam
);
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/inc/trace.hxx
deleted
100644 → 0
Dosyayı görüntüle @
d7ea9c2c
/* -*- 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 _TRACE_HXX_
#define _TRACE_HXX_
#if defined(DBG_UTIL)
#include <tools/string.hxx>
#include <osl/thread.hxx>
#include <osl/mutex.hxx>
#include <comphelper/stl_types.hxx>
class
Tracer
{
rtl
::
OString
m_sBlockDescription
;
DECLARE_STL_STDKEY_MAP
(
::
oslThreadIdentifier
,
sal_Int32
,
MapThreadId2Int
);
static
MapThreadId2Int
s_aThreadIndents
;
static
::
osl
::
Mutex
s_aMapSafety
;
public
:
Tracer
(
const
char
*
_pBlockDescription
);
~
Tracer
();
void
TraceString
(
const
char
*
_pMessage
);
void
TraceString1StringParam
(
const
char
*
_pMessage
,
const
char
*
_pParam
);
};
#define TRACE_RANGE(range_description) Tracer aTrace(range_description);
#define TRACE_RANGE_MESSAGE(message) { aTrace.TraceString(message); }
#define TRACE_RANGE_MESSAGE1(message, param) { aTrace.TraceString1StringParam(message, param); }
#else
#define TRACE_RANGE(range_description) ;
#define TRACE_RANGE_MESSAGE(message) ;
#define TRACE_RANGE_MESSAGE1(message, param) ;
#endif
#endif // _TRACE_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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