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
c9c1caa4
Kaydet (Commit)
c9c1caa4
authored
Şub 27, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SVX_SEARCHAPP_ constants to enum class
Change-Id: I2b9d379e56e0af655aa06afb5391140de952b9d6
üst
10bc10dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
srchitem.hxx
include/svl/srchitem.hxx
+11
-7
global.cxx
sc/source/core/data/global.cxx
+2
-2
sdmod.cxx
sd/source/ui/app/sdmod.cxx
+1
-1
srchitem.cxx
svl/source/items/srchitem.cxx
+7
-3
srchdlg.cxx
svx/source/dialog/srchdlg.cxx
+4
-4
No files found.
include/svl/srchitem.hxx
Dosyayı görüntüle @
c9c1caa4
...
@@ -45,10 +45,14 @@ enum class SvxSearchCmd
...
@@ -45,10 +45,14 @@ enum class SvxSearchCmd
#define SVX_SEARCHIN_FORMULA ((sal_uInt16)0)
#define SVX_SEARCHIN_FORMULA ((sal_uInt16)0)
#define SVX_SEARCHIN_VALUE ((sal_uInt16)1)
#define SVX_SEARCHIN_VALUE ((sal_uInt16)1)
#define SVX_SEARCHIN_NOTE ((sal_uInt16)2)
#define SVX_SEARCHIN_NOTE ((sal_uInt16)2)
#define SVX_SEARCHAPP_WRITER ((sal_uInt16)0)
#define SVX_SEARCHAPP_CALC ((sal_uInt16)1)
enum
class
SvxSearchApp
#define SVX_SEARCHAPP_DRAW ((sal_uInt16)2)
{
#define SVX_SEARCHAPP_BASE ((sal_uInt16)3)
WRITER
=
0
,
CALC
=
1
,
DRAW
=
2
,
BASE
=
3
,
};
// class SvxSearchItem ---------------------------------------------------
// class SvxSearchItem ---------------------------------------------------
...
@@ -64,7 +68,7 @@ class SVL_DLLPUBLIC SvxSearchItem :
...
@@ -64,7 +68,7 @@ class SVL_DLLPUBLIC SvxSearchItem :
// Calc-specific
// Calc-specific
sal_uInt16
nCellType
;
// Search in Formulas/Values/Notes
sal_uInt16
nCellType
;
// Search in Formulas/Values/Notes
sal_uInt16
nAppFlag
;
// application which the dialog is for
SvxSearchApp
nAppFlag
;
// application which the dialog is for
bool
bRowDirection
;
// search direction: row-wise/column-wise
bool
bRowDirection
;
// search direction: row-wise/column-wise
bool
bAllTables
;
// search in all sheets
bool
bAllTables
;
// search in all sheets
bool
bSearchFiltered
;
// search filtered cells.
bool
bSearchFiltered
;
// search filtered cells.
...
@@ -146,8 +150,8 @@ public:
...
@@ -146,8 +150,8 @@ public:
bool
GetNotes
()
const
{
return
bNotes
;
}
bool
GetNotes
()
const
{
return
bNotes
;
}
void
SetNotes
(
bool
bNew
)
{
bNotes
=
bNew
;
}
void
SetNotes
(
bool
bNew
)
{
bNotes
=
bNew
;
}
sal_uInt16
GetAppFlag
()
const
{
return
nAppFlag
;
}
SvxSearchApp
GetAppFlag
()
const
{
return
nAppFlag
;
}
void
SetAppFlag
(
sal_uInt16
nNewAppFlag
)
{
nAppFlag
=
nNewAppFlag
;
}
void
SetAppFlag
(
SvxSearchApp
nNewAppFlag
)
{
nAppFlag
=
nNewAppFlag
;
}
inline
bool
IsLevenshtein
()
const
;
inline
bool
IsLevenshtein
()
const
;
void
SetLevenshtein
(
bool
bVal
);
void
SetLevenshtein
(
bool
bVal
);
...
...
sc/source/core/data/global.cxx
Dosyayı görüntüle @
c9c1caa4
...
@@ -232,7 +232,7 @@ const SvxSearchItem& ScGlobal::GetSearchItem()
...
@@ -232,7 +232,7 @@ const SvxSearchItem& ScGlobal::GetSearchItem()
if
(
!
pSearchItem
)
if
(
!
pSearchItem
)
{
{
pSearchItem
=
new
SvxSearchItem
(
SID_SEARCH_ITEM
);
pSearchItem
=
new
SvxSearchItem
(
SID_SEARCH_ITEM
);
pSearchItem
->
SetAppFlag
(
S
VX_SEARCHAPP_
CALC
);
pSearchItem
->
SetAppFlag
(
S
vxSearchApp
::
CALC
);
}
}
return
*
pSearchItem
;
return
*
pSearchItem
;
}
}
...
@@ -244,7 +244,7 @@ void ScGlobal::SetSearchItem( const SvxSearchItem& rNew )
...
@@ -244,7 +244,7 @@ void ScGlobal::SetSearchItem( const SvxSearchItem& rNew )
pSearchItem
=
static_cast
<
SvxSearchItem
*>
(
rNew
.
Clone
());
pSearchItem
=
static_cast
<
SvxSearchItem
*>
(
rNew
.
Clone
());
pSearchItem
->
SetWhich
(
SID_SEARCH_ITEM
);
pSearchItem
->
SetWhich
(
SID_SEARCH_ITEM
);
pSearchItem
->
SetAppFlag
(
S
VX_SEARCHAPP_
CALC
);
pSearchItem
->
SetAppFlag
(
S
vxSearchApp
::
CALC
);
}
}
void
ScGlobal
::
ClearAutoFormat
()
void
ScGlobal
::
ClearAutoFormat
()
...
...
sd/source/ui/app/sdmod.cxx
Dosyayı görüntüle @
c9c1caa4
...
@@ -83,7 +83,7 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
...
@@ -83,7 +83,7 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
{
{
SetName
(
OUString
(
"StarDraw"
)
);
// Do not translate!
SetName
(
OUString
(
"StarDraw"
)
);
// Do not translate!
pSearchItem
=
new
SvxSearchItem
(
SID_SEARCH_ITEM
);
pSearchItem
=
new
SvxSearchItem
(
SID_SEARCH_ITEM
);
pSearchItem
->
SetAppFlag
(
S
VX_SEARCHAPP_
DRAW
);
pSearchItem
->
SetAppFlag
(
S
vxSearchApp
::
DRAW
);
StartListening
(
*
SfxGetpApp
()
);
StartListening
(
*
SfxGetpApp
()
);
SvxErrorHandler
::
ensure
();
SvxErrorHandler
::
ensure
();
mpErrorHdl
=
new
SfxErrorHandler
(
RID_SD_ERRHDL
,
mpErrorHdl
=
new
SfxErrorHandler
(
RID_SD_ERRHDL
,
...
...
svl/source/items/srchitem.cxx
Dosyayı görüntüle @
c9c1caa4
...
@@ -114,7 +114,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
...
@@ -114,7 +114,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
eFamily
(
SFX_STYLE_FAMILY_PARA
),
eFamily
(
SFX_STYLE_FAMILY_PARA
),
nCommand
(
SvxSearchCmd
::
FIND
),
nCommand
(
SvxSearchCmd
::
FIND
),
nCellType
(
SVX_SEARCHIN_FORMULA
),
nCellType
(
SVX_SEARCHIN_FORMULA
),
nAppFlag
(
S
VX_SEARCHAPP_
WRITER
),
nAppFlag
(
S
vxSearchApp
::
WRITER
),
bRowDirection
(
true
),
bRowDirection
(
true
),
bAllTables
(
false
),
bAllTables
(
false
),
bSearchFiltered
(
false
),
bSearchFiltered
(
false
),
...
@@ -377,7 +377,7 @@ bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMembe
...
@@ -377,7 +377,7 @@ bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMembe
aSeq
[
3
].
Name
=
SRCH_PARA_CELLTYPE
;
aSeq
[
3
].
Name
=
SRCH_PARA_CELLTYPE
;
aSeq
[
3
].
Value
<<=
nCellType
;
aSeq
[
3
].
Value
<<=
nCellType
;
aSeq
[
4
].
Name
=
SRCH_PARA_APPFLAG
;
aSeq
[
4
].
Name
=
SRCH_PARA_APPFLAG
;
aSeq
[
4
].
Value
<<=
nAppFlag
;
aSeq
[
4
].
Value
<<=
static_cast
<
sal_uInt16
>
(
nAppFlag
)
;
aSeq
[
5
].
Name
=
SRCH_PARA_ROWDIR
;
aSeq
[
5
].
Name
=
SRCH_PARA_ROWDIR
;
aSeq
[
5
].
Value
<<=
bRowDirection
;
aSeq
[
5
].
Value
<<=
bRowDirection
;
aSeq
[
6
].
Name
=
SRCH_PARA_ALLTABLES
;
aSeq
[
6
].
Name
=
SRCH_PARA_ALLTABLES
;
...
@@ -497,8 +497,12 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM
...
@@ -497,8 +497,12 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM
}
}
else
if
(
aSeq
[
i
].
Name
==
SRCH_PARA_APPFLAG
)
else
if
(
aSeq
[
i
].
Name
==
SRCH_PARA_APPFLAG
)
{
{
if
(
aSeq
[
i
].
Value
>>=
nAppFlag
)
sal_uInt16
nTmp
;
if
(
aSeq
[
i
].
Value
>>=
nTmp
)
{
nAppFlag
=
static_cast
<
SvxSearchApp
>
(
nTmp
);
++
nConvertedCount
;
++
nConvertedCount
;
}
}
}
else
if
(
aSeq
[
i
].
Name
==
SRCH_PARA_ROWDIR
)
else
if
(
aSeq
[
i
].
Name
==
SRCH_PARA_ROWDIR
)
{
{
...
...
svx/source/dialog/srchdlg.cxx
Dosyayı görüntüle @
c9c1caa4
...
@@ -725,7 +725,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
...
@@ -725,7 +725,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
ToggleSaveToModule
aNoModuleSave
(
*
this
,
false
);
ToggleSaveToModule
aNoModuleSave
(
*
this
,
false
);
SvtSearchOptions
aOpt
;
SvtSearchOptions
aOpt
;
bWriter
=
(
pSearchItem
->
GetAppFlag
()
==
S
VX_SEARCHAPP_
WRITER
);
bWriter
=
(
pSearchItem
->
GetAppFlag
()
==
S
vxSearchApp
::
WRITER
);
if
(
(
nModifyFlag
&
MODIFY_WORD
)
==
0
)
if
(
(
nModifyFlag
&
MODIFY_WORD
)
==
0
)
m_pWordBtn
->
Check
(
pSearchItem
->
GetWordOnly
()
);
m_pWordBtn
->
Check
(
pSearchItem
->
GetWordOnly
()
);
...
@@ -755,7 +755,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
...
@@ -755,7 +755,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
ShowOptionalControls_Impl
();
ShowOptionalControls_Impl
();
bool
bDraw
=
false
;
bool
bDraw
=
false
;
if
(
pSearchItem
->
GetAppFlag
()
==
S
VX_SEARCHAPP_
CALC
)
if
(
pSearchItem
->
GetAppFlag
()
==
S
vxSearchApp
::
CALC
)
{
{
m_pCalcGrid
->
Show
();
m_pCalcGrid
->
Show
();
Link
aLink
=
LINK
(
this
,
SvxSearchDialog
,
FlagHdl_Impl
);
Link
aLink
=
LINK
(
this
,
SvxSearchDialog
,
FlagHdl_Impl
);
...
@@ -802,7 +802,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
...
@@ -802,7 +802,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
{
{
m_pWordBtn
->
SetText
(
aCalcStr
.
getToken
(
1
,
'#'
)
);
m_pWordBtn
->
SetText
(
aCalcStr
.
getToken
(
1
,
'#'
)
);
if
(
pSearchItem
->
GetAppFlag
()
==
S
VX_SEARCHAPP_
DRAW
)
if
(
pSearchItem
->
GetAppFlag
()
==
S
vxSearchApp
::
DRAW
)
{
{
m_pSearchAllBtn
->
Hide
();
m_pSearchAllBtn
->
Hide
();
...
@@ -1351,7 +1351,7 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd )
...
@@ -1351,7 +1351,7 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd )
bSet
=
false
;
bSet
=
false
;
// Calc allows searching for empty cells.
// Calc allows searching for empty cells.
bool
bAllowEmptySearch
=
(
pSearchItem
->
GetAppFlag
()
==
S
VX_SEARCHAPP_
CALC
);
bool
bAllowEmptySearch
=
(
pSearchItem
->
GetAppFlag
()
==
S
vxSearchApp
::
CALC
);
if
(
pEd
==
m_pSearchLB
||
pEd
==
m_pReplaceLB
)
if
(
pEd
==
m_pSearchLB
||
pEd
==
m_pReplaceLB
)
{
{
...
...
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