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
d6407c88
Kaydet (Commit)
d6407c88
authored
Ara 06, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert search dialog to .ui
Change-Id: I737da11ed6978edf824f00dfb3dfc29c2c5416ed
üst
c2c7e4d8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
211 deletions
+48
-211
AllLangResTarget_sfx2.mk
sfx2/AllLangResTarget_sfx2.mk
+0
-1
UIConfig_sfx.mk
sfx2/UIConfig_sfx.mk
+1
-0
srchdlg.hxx
sfx2/inc/srchdlg.hxx
+15
-18
srchdlg.cxx
sfx2/source/dialog/srchdlg.cxx
+32
-51
srchdlg.hrc
sfx2/source/dialog/srchdlg.hrc
+0
-36
srchdlg.src
sfx2/source/dialog/srchdlg.src
+0
-103
helpid.hrc
sfx2/source/inc/helpid.hrc
+0
-2
searchdialog.ui
sfx2/uiconfig/ui/searchdialog.ui
+0
-0
No files found.
sfx2/AllLangResTarget_sfx2.mk
Dosyayı görüntüle @
d6407c88
...
...
@@ -48,7 +48,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/inputdlg.src \
sfx2/source/dialog/newstyle.src \
sfx2/source/dialog/recfloat.src \
sfx2/source/dialog/srchdlg.src \
sfx2/source/dialog/taskpane.src \
sfx2/source/dialog/templateinfodlg.src \
sfx2/source/dialog/templdlg.src \
...
...
sfx2/UIConfig_sfx.mk
Dosyayı görüntüle @
d6407c88
...
...
@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/password \
sfx2/uiconfig/ui/printeroptionsdialog \
sfx2/uiconfig/ui/querysavedialog \
sfx2/uiconfig/ui/searchdialog \
sfx2/uiconfig/ui/securityinfopage \
sfx2/uiconfig/ui/singletabdialog \
sfx2/uiconfig/ui/versionsofdialog \
...
...
sfx2/inc/srchdlg.hxx
Dosyayı görüntüle @
d6407c88
...
...
@@ -36,14 +36,12 @@ namespace sfx2 {
class
SearchDialog
:
public
ModelessDialog
{
private
:
FixedText
m_aSearchLabel
;
ComboBox
m_aSearchEdit
;
CheckBox
m_aWholeWordsBox
;
CheckBox
m_aMatchCaseBox
;
CheckBox
m_aWrapAroundBox
;
CheckBox
m_aBackwardsBox
;
PushButton
m_aFindBtn
;
CancelButton
m_aCancelBtn
;
ComboBox
*
m_pSearchEdit
;
CheckBox
*
m_pWholeWordsBox
;
CheckBox
*
m_pMatchCaseBox
;
CheckBox
*
m_pWrapAroundBox
;
CheckBox
*
m_pBackwardsBox
;
PushButton
*
m_pFindBtn
;
Link
m_aFindHdl
;
Link
m_aCloseHdl
;
...
...
@@ -58,25 +56,24 @@ private:
void
SaveConfig
();
DECL_LINK
(
FindHdl
,
void
*
);
DECL_LINK
(
ToggleHdl
,
void
*
);
public
:
SearchDialog
(
Window
*
pWindow
,
const
OUString
&
rConfigName
);
~
SearchDialog
();
inline
void
SetFindHdl
(
const
Link
&
rLink
)
{
m_aFindHdl
=
rLink
;
}
inline
void
SetCloseHdl
(
const
Link
&
rLink
)
{
m_aCloseHdl
=
rLink
;
}
void
SetFindHdl
(
const
Link
&
rLink
)
{
m_aFindHdl
=
rLink
;
}
void
SetCloseHdl
(
const
Link
&
rLink
)
{
m_aCloseHdl
=
rLink
;
}
inline
OUString
GetSearchText
()
const
{
return
m_aSearchEdit
.
GetText
();
}
inline
void
SetSearchText
(
const
OUString
&
_rText
)
{
m_aSearchEdit
.
SetText
(
_rText
);
}
inline
bool
IsOnlyWholeWords
()
const
{
return
(
m_aWholeWordsBox
.
IsChecked
()
!=
sal_False
);
}
inline
bool
IsMarchCase
()
const
{
return
(
m_aMatchCaseBox
.
IsChecked
()
!=
sal_False
);
}
inline
bool
IsWrapAround
()
const
{
return
(
m_aWrapAroundBox
.
IsChecked
()
!=
sal_False
);
}
inline
bool
IsSearchBackwards
()
const
{
return
(
m_aBackwardsBox
.
IsChecked
()
!=
sal_False
);
}
OUString
GetSearchText
()
const
{
return
m_pSearchEdit
->
GetText
();
}
void
SetSearchText
(
const
OUString
&
_rText
)
{
m_pSearchEdit
->
SetText
(
_rText
);
}
bool
IsOnlyWholeWords
()
const
{
return
(
m_pWholeWordsBox
->
IsChecked
()
);
}
bool
IsMarchCase
()
const
{
return
(
m_pMatchCaseBox
->
IsChecked
()
);
}
bool
IsWrapAround
()
const
{
return
(
m_pWrapAroundBox
->
IsChecked
()
);
}
bool
IsSearchBackwards
()
const
{
return
(
m_pBackwardsBox
->
IsChecked
()
);
}
void
SetFocusOnEdit
();
virtual
sal_Bool
Close
();
virtual
sal_Bool
Close
();
virtual
void
Move
();
virtual
void
StateChanged
(
StateChangedType
nStateChange
);
};
...
...
sfx2/source/dialog/srchdlg.cxx
Dosyayı görüntüle @
d6407c88
...
...
@@ -23,7 +23,6 @@
#include <sfx2/sfxresid.hxx>
#include <sfx2/sfxuno.hxx>
#include "srchdlg.hrc"
#include "dialog.hrc"
#include <tools/debug.hxx>
#include <unotools/viewoptions.hxx>
...
...
@@ -40,35 +39,25 @@ namespace sfx2 {
// SearchDialog
// ============================================================================
SearchDialog
::
SearchDialog
(
Window
*
pWindow
,
const
OUString
&
rConfigName
)
:
ModelessDialog
(
pWindow
,
SfxResId
(
RID_DLG_SEARCH
)
),
m_aSearchLabel
(
this
,
SfxResId
(
FT_SEARCH
)
),
m_aSearchEdit
(
this
,
SfxResId
(
ED_SEARCH
)
),
m_aWholeWordsBox
(
this
,
SfxResId
(
CB_WHOLEWORDS
)
),
m_aMatchCaseBox
(
this
,
SfxResId
(
CB_MATCHCASE
)
),
m_aWrapAroundBox
(
this
,
SfxResId
(
CB_WRAPAROUND
)
),
m_aBackwardsBox
(
this
,
SfxResId
(
CB_BACKWARDS
)
),
m_aFindBtn
(
this
,
SfxResId
(
PB_FIND
)
),
m_aCancelBtn
(
this
,
SfxResId
(
PB_CANCELFIND
)
),
m_sToggleText
(
SfxResId
(
STR_TOGGLE
).
toString
()
),
m_sConfigName
(
rConfigName
),
m_bIsConstructed
(
false
)
SearchDialog
::
SearchDialog
(
Window
*
pWindow
,
const
OUString
&
rConfigName
)
:
ModelessDialog
(
pWindow
,
"SearchDialog"
,
"sfx/ui/searchdialog.ui"
)
,
m_sConfigName
(
rConfigName
)
,
m_bIsConstructed
(
false
)
{
FreeResource
();
get
(
m_pSearchEdit
,
"searchterm"
);
get
(
m_pWholeWordsBox
,
"wholewords"
);
get
(
m_pMatchCaseBox
,
"matchcase"
);
get
(
m_pWrapAroundBox
,
"wrap"
);
get
(
m_pBackwardsBox
,
"backwards"
);
get
(
m_pFindBtn
,
"search"
);
// set handler
m_aFindBtn
.
SetClickHdl
(
LINK
(
this
,
SearchDialog
,
FindHdl
)
);
m_aBackwardsBox
.
SetClickHdl
(
LINK
(
this
,
SearchDialog
,
ToggleHdl
)
);
m_pFindBtn
->
SetClickHdl
(
LINK
(
this
,
SearchDialog
,
FindHdl
)
);
// load config: old search strings and the status of the check boxes
LoadConfig
();
// we need to change the text of the WrapAround box, depends on the status of the Backwards box
if
(
m_aBackwardsBox
.
IsChecked
()
)
ToggleHdl
(
&
m_aBackwardsBox
);
// the search edit should have the focus
m_
aSearchEdit
.
GrabFocus
();
m_
pSearchEdit
->
GrabFocus
();
}
SearchDialog
::~
SearchDialog
()
...
...
@@ -91,19 +80,19 @@ void SearchDialog::LoadConfig()
DBG_ASSERT
(
comphelper
::
string
::
getTokenCount
(
sUserData
,
';'
)
==
5
,
"invalid config data"
);
sal_Int32
nIdx
=
0
;
OUString
sSearchText
=
sUserData
.
getToken
(
0
,
';'
,
nIdx
);
m_
aWholeWordsBox
.
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
m_
aMatchCaseBox
.
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
m_
aWrapAroundBox
.
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
m_
aBackwardsBox
.
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
m_
pWholeWordsBox
->
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
m_
pMatchCaseBox
->
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
m_
pWrapAroundBox
->
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
m_
pBackwardsBox
->
Check
(
sUserData
.
getToken
(
0
,
';'
,
nIdx
).
toInt32
()
==
1
);
nIdx
=
0
;
while
(
nIdx
!=
-
1
)
m_
aSearchEdit
.
InsertEntry
(
sSearchText
.
getToken
(
0
,
'\t'
,
nIdx
)
);
m_
aSearchEdit
.
SelectEntryPos
(
0
);
m_
pSearchEdit
->
InsertEntry
(
sSearchText
.
getToken
(
0
,
'\t'
,
nIdx
)
);
m_
pSearchEdit
->
SelectEntryPos
(
0
);
}
}
else
m_
aWrapAroundBox
.
Check
(
sal_True
);
m_
pWrapAroundBox
->
Check
(
sal_True
);
}
void
SearchDialog
::
SaveConfig
()
...
...
@@ -111,21 +100,21 @@ void SearchDialog::SaveConfig()
SvtViewOptions
aViewOpt
(
E_DIALOG
,
m_sConfigName
);
aViewOpt
.
SetWindowState
(
OStringToOUString
(
m_sWinState
,
RTL_TEXTENCODING_ASCII_US
));
OUString
sUserData
;
sal_uInt16
i
=
0
,
nCount
=
std
::
min
(
m_
aSearchEdit
.
GetEntryCount
(),
MAX_SAVE_COUNT
);
sal_uInt16
i
=
0
,
nCount
=
std
::
min
(
m_
pSearchEdit
->
GetEntryCount
(),
MAX_SAVE_COUNT
);
for
(
;
i
<
nCount
;
++
i
)
{
sUserData
+=
m_
aSearchEdit
.
GetEntry
(
i
);
sUserData
+=
m_
pSearchEdit
->
GetEntry
(
i
);
sUserData
+=
"
\t
"
;
}
sUserData
=
comphelper
::
string
::
stripStart
(
sUserData
,
'\t'
);
sUserData
+=
";"
;
sUserData
+=
OUString
::
number
(
m_
aWholeWordsBox
.
IsChecked
()
?
1
:
0
);
sUserData
+=
OUString
::
number
(
m_
pWholeWordsBox
->
IsChecked
()
?
1
:
0
);
sUserData
+=
";"
;
sUserData
+=
OUString
::
number
(
m_
aMatchCaseBox
.
IsChecked
()
?
1
:
0
);
sUserData
+=
OUString
::
number
(
m_
pMatchCaseBox
->
IsChecked
()
?
1
:
0
);
sUserData
+=
";"
;
sUserData
+=
OUString
::
number
(
m_
aWrapAroundBox
.
IsChecked
()
?
1
:
0
);
sUserData
+=
OUString
::
number
(
m_
pWrapAroundBox
->
IsChecked
()
?
1
:
0
);
sUserData
+=
";"
;
sUserData
+=
OUString
::
number
(
m_
aBackwardsBox
.
IsChecked
()
?
1
:
0
);
sUserData
+=
OUString
::
number
(
m_
pBackwardsBox
->
IsChecked
()
?
1
:
0
);
Any
aUserItem
=
makeAny
(
OUString
(
sUserData
)
);
aViewOpt
.
SetUserItem
(
"UserItem"
,
aUserItem
);
...
...
@@ -133,29 +122,21 @@ void SearchDialog::SaveConfig()
IMPL_LINK_NOARG
(
SearchDialog
,
FindHdl
)
{
OUString
sSrchTxt
=
m_
aSearchEdit
.
GetText
();
sal_uInt16
nPos
=
m_
aSearchEdit
.
GetEntryPos
(
sSrchTxt
);
OUString
sSrchTxt
=
m_
pSearchEdit
->
GetText
();
sal_uInt16
nPos
=
m_
pSearchEdit
->
GetEntryPos
(
sSrchTxt
);
if
(
nPos
>
0
&&
nPos
!=
COMBOBOX_ENTRY_NOTFOUND
)
m_
aSearchEdit
.
RemoveEntryAt
(
nPos
);
m_
pSearchEdit
->
RemoveEntryAt
(
nPos
);
if
(
nPos
>
0
)
m_
aSearchEdit
.
InsertEntry
(
sSrchTxt
,
0
);
m_
pSearchEdit
->
InsertEntry
(
sSrchTxt
,
0
);
m_aFindHdl
.
Call
(
this
);
return
0
;
}
IMPL_LINK_NOARG
(
SearchDialog
,
ToggleHdl
)
{
OUString
sTemp
=
m_aWrapAroundBox
.
GetText
();
m_aWrapAroundBox
.
SetText
(
m_sToggleText
);
m_sToggleText
=
sTemp
;
return
0
;
}
void
SearchDialog
::
SetFocusOnEdit
()
{
Selection
aSelection
(
0
,
m_
aSearchEdit
.
GetText
().
getLength
()
);
m_
aSearchEdit
.
SetSelection
(
aSelection
);
m_
aSearchEdit
.
GrabFocus
();
Selection
aSelection
(
0
,
m_
pSearchEdit
->
GetText
().
getLength
()
);
m_
pSearchEdit
->
SetSelection
(
aSelection
);
m_
pSearchEdit
->
GrabFocus
();
}
sal_Bool
SearchDialog
::
Close
()
...
...
sfx2/source/dialog/srchdlg.hrc
deleted
100644 → 0
Dosyayı görüntüle @
c2c7e4d8
/* -*- 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 _SFX_SRCHDLG_HRC_
#define _SFX_SRCHDLG_HRC_
#define FT_SEARCH 10
#define ED_SEARCH 11
#define FL_OPTIONS 12
#define CB_WHOLEWORDS 13
#define CB_MATCHCASE 14
#define CB_WRAPAROUND 15
#define CB_BACKWARDS 16
#define PB_FIND 17
#define PB_CANCELFIND 18
#define STR_TOGGLE 50
#endif // _SFX_SRCHDLG_HRC_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/dialog/srchdlg.src
deleted
100644 → 0
Dosyayı görüntüle @
c2c7e4d8
/* -*- 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 "srchdlg.hrc"
#include "dialog.hrc"
#include "helpid.hrc"
ModelessDialog RID_DLG_SEARCH
{
HelpId = HID_SEARCHDIALOG;
OutputSize = TRUE;
Moveable = TRUE;
Closeable = TRUE;
Hide = TRUE;
Size = MAP_APPFONT( 218, 84 );
Text [ en-US ] = "Find on this Page";
FixedText FT_SEARCH
{
Pos = MAP_APPFONT( 6, 3 );
Size = MAP_APPFONT( 150, 8 );
Text [ en-US ] = "~Search for";
};
ComboBox ED_SEARCH
{
HelpID = "sfx2:ComboBox:RID_DLG_SEARCH:ED_SEARCH";
Border = TRUE;
Pos = MAP_APPFONT( 6, 14 );
Size = MAP_APPFONT( 150, 50 );
DropDown = TRUE ;
TabStop = TRUE;
};
CheckBox CB_WHOLEWORDS
{
HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_WHOLEWORDS";
Pos = MAP_APPFONT( 6, 29 );
Size = MAP_APPFONT( 150, 10 );
Text [ en-US ] = "~Whole words only" ;
TabStop = TRUE;
};
CheckBox CB_MATCHCASE
{
HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_MATCHCASE";
Pos = MAP_APPFONT( 6, 42 );
Size = MAP_APPFONT( 150, 10 );
Text[ en-US ] = "~Match case";
TabStop = TRUE;
};
CheckBox CB_WRAPAROUND
{
HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_WRAPAROUND";
Pos = MAP_APPFONT( 6, 55 );
Size = MAP_APPFONT( 150, 10 );
Text [ en-US ] = "Wrap ~around" ;
TabStop = TRUE;
};
CheckBox CB_BACKWARDS
{
HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_BACKWARDS";
Pos = MAP_APPFONT( 6, 68 );
Size = MAP_APPFONT( 150, 10 );
Text [ en-US ] = "~Backwards" ;
TabStop = TRUE;
};
PushButton PB_FIND
{
HelpID = "sfx2:PushButton:RID_DLG_SEARCH:PB_FIND";
Pos = MAP_APPFONT( 162, 6 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "~Find" ;
TabStop = TRUE;
DefButton = TRUE ;
};
CancelButton PB_CANCELFIND
{
Pos = MAP_APPFONT( 162, 23 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "~Close" ;
TabStop = TRUE;
};
String STR_TOGGLE
{
Text [ en-US ] = "Wrap ~around" ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/inc/helpid.hrc
Dosyayı görüntüle @
d6407c88
...
...
@@ -122,8 +122,6 @@
#define HID_CONFIG_SAVE "SFX2_HID_CONFIG_SAVE"
#define HID_SEARCHDIALOG "SFX2_HID_SEARCHDIALOG"
#define HID_XMLSEC_QUERY_SAVEBEFORESIGN "SFX2_HID_XMLSEC_QUERY_SAVEBEFORESIGN"
#define HID_XMLSECDLG_MACROWARN "SFX2_HID_XMLSECDLG_MACROWARN"
#define HID_XMLSEC_INFO_WRONGDOCFORMAT "SFX2_HID_XMLSEC_INFO_WRONGDOCFORMAT"
...
...
sfx2/uiconfig/ui/searchdialog.ui
0 → 100644
Dosyayı görüntüle @
d6407c88
This diff is collapsed.
Click to expand it.
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