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
1ed3387a
Kaydet (Commit)
1ed3387a
authored
Şub 12, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Made similar change to SetData() of ScEditCell.
Change-Id: Ie1475eb19a4ad41e5eac1ca00419a1af5c207b12
üst
0585322e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
28 deletions
+65
-28
cell.hxx
sc/inc/cell.hxx
+26
-2
cell2.cxx
sc/source/core/data/cell2.cxx
+16
-8
column2.cxx
sc/source/core/data/column2.cxx
+2
-6
documen8.cxx
sc/source/core/data/documen8.cxx
+3
-6
undoblk3.cxx
sc/source/ui/undo/undoblk3.cxx
+12
-2
undocell.cxx
sc/source/ui/undo/undocell.cxx
+2
-2
spelleng.cxx
sc/source/ui/view/spelleng.cxx
+4
-2
No files found.
sc/inc/cell.hxx
Dosyayı görüntüle @
1ed3387a
...
@@ -262,8 +262,32 @@ public:
...
@@ -262,8 +262,32 @@ public:
// for line breaks
// for line breaks
ScEditCell
(
const
rtl
::
OUString
&
rString
,
ScDocument
*
);
ScEditCell
(
const
rtl
::
OUString
&
rString
,
ScDocument
*
);
void
SetData
(
const
EditTextObject
*
pObject
,
/**
const
SfxItemPool
*
pFromPool
/* = NULL */
);
* Remove the text data as well as string cache.
*/
void
ClearData
();
/**
* Set new text data. This method clones the passed text data and stores
* the clone; the caller is responsible for deleting the text data
* instance after the call.
*
* @param rObject text object to clone from.
* @param pFromPool pointer to SfxItemPool instance that the new text
* object that is to be stored in the cell instance
* should use. If it's NULL, it uses the default pool
* for edit cells from the document instance (one
* returned from GetEditPool()).
*/
void
SetData
(
const
EditTextObject
&
rObject
,
const
SfxItemPool
*
pFromPool
);
/**
* Set new text data. The passed text data instance will be owned by the
* cell. The caller must ensure that the text data uses the SfxItemPool
* instance returned from ScDocument::GetEditPool().
*/
void
SetData
(
EditTextObject
*
pObject
);
rtl
::
OUString
GetString
()
const
;
rtl
::
OUString
GetString
()
const
;
const
EditTextObject
*
GetData
()
const
;
const
EditTextObject
*
GetData
()
const
;
...
...
sc/source/core/data/cell2.cxx
Dosyayı görüntüle @
1ed3387a
...
@@ -96,16 +96,24 @@ ScEditCell::~ScEditCell()
...
@@ -96,16 +96,24 @@ ScEditCell::~ScEditCell()
#endif
#endif
}
}
void
ScEditCell
::
SetData
(
const
EditTextObject
*
pObject
,
void
ScEditCell
::
ClearData
()
const
SfxItemPool
*
pFromPool
)
{
{
if
(
pString
)
delete
pString
;
{
pString
=
NULL
;
delete
pString
;
pString
=
NULL
;
}
delete
pData
;
delete
pData
;
SetTextObject
(
pObject
,
pFromPool
);
pData
=
NULL
;
}
void
ScEditCell
::
SetData
(
const
EditTextObject
&
rObject
,
const
SfxItemPool
*
pFromPool
)
{
ClearData
();
SetTextObject
(
&
rObject
,
pFromPool
);
}
void
ScEditCell
::
SetData
(
EditTextObject
*
pObject
)
{
ClearData
();
pData
=
pObject
;
}
}
rtl
::
OUString
ScEditCell
::
GetString
()
const
rtl
::
OUString
ScEditCell
::
GetString
()
const
...
...
sc/source/core/data/column2.cxx
Dosyayı görüntüle @
1ed3387a
...
@@ -908,9 +908,7 @@ void ScColumn::RemoveAutoSpellObj()
...
@@ -908,9 +908,7 @@ void ScColumn::RemoveAutoSpellObj()
ScEditAttrTester
aTester
(
pEngine
);
ScEditAttrTester
aTester
(
pEngine
);
if
(
aTester
.
NeedsObject
()
)
// only remove spelling errors
if
(
aTester
.
NeedsObject
()
)
// only remove spelling errors
{
{
EditTextObject
*
pNewData
=
pEngine
->
CreateTextObject
();
// without BIGOBJ
pOldCell
->
SetData
(
pEngine
->
CreateTextObject
());
pOldCell
->
SetData
(
pNewData
,
pEngine
->
GetEditTextObjectPool
()
);
delete
pNewData
;
}
}
else
// create a string
else
// create a string
{
{
...
@@ -975,9 +973,7 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
...
@@ -975,9 +973,7 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
sal_uInt32
nWantBig
=
bSpellErrors
?
EE_CNTRL_ALLOWBIGOBJS
:
0
;
sal_uInt32
nWantBig
=
bSpellErrors
?
EE_CNTRL_ALLOWBIGOBJS
:
0
;
if
(
(
nCtrl
&
EE_CNTRL_ALLOWBIGOBJS
)
!=
nWantBig
)
if
(
(
nCtrl
&
EE_CNTRL_ALLOWBIGOBJS
)
!=
nWantBig
)
pEngine
->
SetControlWord
(
(
nCtrl
&
~
EE_CNTRL_ALLOWBIGOBJS
)
|
nWantBig
);
pEngine
->
SetControlWord
(
(
nCtrl
&
~
EE_CNTRL_ALLOWBIGOBJS
)
|
nWantBig
);
EditTextObject
*
pNewData
=
pEngine
->
CreateTextObject
();
pOldCell
->
SetData
(
pEngine
->
CreateTextObject
());
pOldCell
->
SetData
(
pNewData
,
pEngine
->
GetEditTextObjectPool
()
);
delete
pNewData
;
}
}
else
// create String
else
// create String
{
{
...
...
sc/source/core/data/documen8.cxx
Dosyayı görüntüle @
1ed3387a
...
@@ -741,15 +741,12 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
...
@@ -741,15 +741,12 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
if
(
bNeedEdit
)
if
(
bNeedEdit
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
std
::
auto_ptr
<
EditTextObject
>
pNewData
(
pEngine
->
CreateTextObject
());
SAL_WNODEPRECATED_DECLARATIONS_POP
if
(
eType
==
CELLTYPE_EDIT
)
if
(
eType
==
CELLTYPE_EDIT
)
//
SetData will create a clone of pNewData and stores the clone
.
//
The cell will take ownership of pNewData
.
static_cast
<
ScEditCell
*>
(
pCell
)
->
SetData
(
p
NewData
.
get
(),
pEngine
->
GetEditTextObjectPool
());
static_cast
<
ScEditCell
*>
(
pCell
)
->
SetData
(
p
Engine
->
CreateTextObject
());
else
else
// The cell will take ownership of pNewData.
// The cell will take ownership of pNewData.
PutCell
(
nCol
,
nRow
,
nTab
,
new
ScEditCell
(
p
NewData
.
release
(),
this
));
PutCell
(
nCol
,
nRow
,
nTab
,
new
ScEditCell
(
p
Engine
->
CreateTextObject
(),
this
));
}
}
else
// einfacher String
else
// einfacher String
PutCell
(
nCol
,
nRow
,
nTab
,
new
ScStringCell
(
pEngine
->
GetText
()
)
);
PutCell
(
nCol
,
nRow
,
nTab
,
new
ScStringCell
(
pEngine
->
GetText
()
)
);
...
...
sc/source/ui/undo/undoblk3.cxx
Dosyayı görüntüle @
1ed3387a
...
@@ -444,9 +444,19 @@ void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
...
@@ -444,9 +444,19 @@ void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
ScEditCell
*
pEditCell
=
static_cast
<
ScEditCell
*>
(
pCell
);
ScEditCell
*
pEditCell
=
static_cast
<
ScEditCell
*>
(
pCell
);
if
(
bUndo
)
if
(
bUndo
)
pEditCell
->
SetData
(
pItem
->
GetOldData
(),
NULL
);
{
if
(
pItem
->
GetOldData
())
pEditCell
->
SetData
(
*
pItem
->
GetOldData
(),
NULL
);
else
pEditCell
->
ClearData
();
}
else
else
pEditCell
->
SetData
(
pItem
->
GetNewData
(),
NULL
);
{
if
(
pItem
->
GetNewData
())
pEditCell
->
SetData
(
*
pItem
->
GetNewData
(),
NULL
);
else
pEditCell
->
ClearData
();
}
}
}
}
}
...
...
sc/source/ui/undo/undocell.cxx
Dosyayı görüntüle @
1ed3387a
...
@@ -103,8 +103,8 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share
...
@@ -103,8 +103,8 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share
ScBaseCell
*
pCell
;
ScBaseCell
*
pCell
;
pDoc
->
GetCell
(
nCol
,
nRow
,
nTab
,
pCell
);
pDoc
->
GetCell
(
nCol
,
nRow
,
nTab
,
pCell
);
if
(
pCell
&&
pCell
->
GetCellType
()
==
CELLTYPE_EDIT
&&
pEditData
.
get
()
)
if
(
pCell
&&
pCell
->
GetCellType
()
==
CELLTYPE_EDIT
&&
pEditData
)
static_cast
<
ScEditCell
*>
(
pCell
)
->
SetData
(
pEditData
.
get
()
,
NULL
);
static_cast
<
ScEditCell
*>
(
pCell
)
->
SetData
(
*
pEditData
,
NULL
);
ScTabViewShell
*
pViewShell
=
ScTabViewShell
::
GetActiveViewShell
();
ScTabViewShell
*
pViewShell
=
ScTabViewShell
::
GetActiveViewShell
();
if
(
pViewShell
)
if
(
pViewShell
)
...
...
sc/source/ui/view/spelleng.cxx
Dosyayı görüntüle @
1ed3387a
...
@@ -42,6 +42,8 @@
...
@@ -42,6 +42,8 @@
#include "globstr.hrc"
#include "globstr.hrc"
#include "markdata.hxx"
#include "markdata.hxx"
#include <boost/scoped_ptr.hpp>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
ScConversionEngineBase
::
ScConversionEngineBase
(
ScConversionEngineBase
::
ScConversionEngineBase
(
...
@@ -118,8 +120,8 @@ bool ScConversionEngineBase::FindNextConversionCell()
...
@@ -118,8 +120,8 @@ bool ScConversionEngineBase::FindNextConversionCell()
if
(
pCell
)
if
(
pCell
)
{
{
ScEditCell
*
pEditCell
=
static_cast
<
ScEditCell
*
>
(
pCell
);
ScEditCell
*
pEditCell
=
static_cast
<
ScEditCell
*
>
(
pCell
);
::
std
::
auto_ptr
<
EditTextObject
>
pEditObj
(
CreateTextObject
()
);
boost
::
scoped_ptr
<
EditTextObject
>
pEditObj
(
CreateTextObject
()
);
pEditCell
->
SetData
(
pEditObj
.
get
(),
GetEditTextObjectPool
()
);
pEditCell
->
SetData
(
*
pEditObj
,
GetEditTextObjectPool
()
);
}
}
}
}
else
else
...
...
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