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
cbde0ff2
Kaydet (Commit)
cbde0ff2
authored
Kas 22, 2011
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String->OUString
üst
89e27727
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
managelang.cxx
basctl/source/dlged/managelang.cxx
+15
-15
No files found.
basctl/source/dlged/managelang.cxx
Dosyayı görüntüle @
cbde0ff2
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/i18n/WordType.hpp>
#include <comphelper/string.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/unolingu.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/bindings.hxx>
#include <svtools/langtab.hxx>
#include <svtools/langtab.hxx>
...
@@ -63,7 +64,7 @@ bool localesAreEqual( const Locale& rLocaleLeft, const Locale& rLocaleRight )
...
@@ -63,7 +64,7 @@ bool localesAreEqual( const Locale& rLocaleLeft, const Locale& rLocaleRight )
}
}
namespace
{
namespace
{
long
getLongestWordWidth
(
const
String
&
rText
,
const
Window
&
rWin
)
long
getLongestWordWidth
(
const
::
rtl
::
OU
String
&
rText
,
const
Window
&
rWin
)
{
{
long
nWidth
=
0
;
long
nWidth
=
0
;
Reference
<
XBreakIterator
>
xBreakIter
(
vcl
::
unohelper
::
CreateBreakIterator
()
);
Reference
<
XBreakIterator
>
xBreakIter
(
vcl
::
unohelper
::
CreateBreakIterator
()
);
...
@@ -75,9 +76,7 @@ namespace {
...
@@ -75,9 +76,7 @@ namespace {
while
(
aBoundary
.
startPos
!=
aBoundary
.
endPos
)
while
(
aBoundary
.
startPos
!=
aBoundary
.
endPos
)
{
{
nStartPos
=
aBoundary
.
endPos
;
nStartPos
=
aBoundary
.
endPos
;
String
sWord
(
rText
.
Copy
(
::
rtl
::
OUString
sWord
(
rText
.
copy
(
aBoundary
.
startPos
,
aBoundary
.
endPos
-
aBoundary
.
startPos
));
(
sal_uInt16
)
aBoundary
.
startPos
,
(
sal_uInt16
)
aBoundary
.
endPos
-
(
sal_uInt16
)
aBoundary
.
startPos
)
);
long
nTemp
=
rWin
.
GetCtrlTextWidth
(
sWord
);
long
nTemp
=
rWin
.
GetCtrlTextWidth
(
sWord
);
if
(
nTemp
>
nWidth
)
if
(
nTemp
>
nWidth
)
nWidth
=
nTemp
;
nWidth
=
nTemp
;
...
@@ -124,10 +123,10 @@ void ManageLanguageDialog::Init()
...
@@ -124,10 +123,10 @@ void ManageLanguageDialog::Init()
{
{
// get current IDE
// get current IDE
BasicIDEShell
*
pIDEShell
=
BasicIDEGlobals
::
GetShell
();
BasicIDEShell
*
pIDEShell
=
BasicIDEGlobals
::
GetShell
();
String
sLibName
=
pIDEShell
->
GetCurLibName
();
::
rtl
::
OU
String
sLibName
=
pIDEShell
->
GetCurLibName
();
// set dialog title with library name
// set dialog title with library name
String
sText
=
GetText
();
::
rtl
::
OU
String
sText
=
GetText
();
sText
.
SearchAndReplace
(
String
::
CreateFromAscii
(
"$1"
),
sLibName
);
::
comphelper
::
string
::
replace
(
sText
,
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"$1"
)),
sLibName
);
SetText
(
sText
);
SetText
(
sText
);
// set handler
// set handler
m_aAddPB
.
SetClickHdl
(
LINK
(
this
,
ManageLanguageDialog
,
AddHdl
)
);
m_aAddPB
.
SetClickHdl
(
LINK
(
this
,
ManageLanguageDialog
,
AddHdl
)
);
...
@@ -141,7 +140,7 @@ void ManageLanguageDialog::Init()
...
@@ -141,7 +140,7 @@ void ManageLanguageDialog::Init()
void
ManageLanguageDialog
::
CalcInfoSize
()
void
ManageLanguageDialog
::
CalcInfoSize
()
{
{
String
sInfoStr
=
m_aInfoFT
.
GetText
();
::
rtl
::
OU
String
sInfoStr
=
m_aInfoFT
.
GetText
();
long
nInfoWidth
=
m_aInfoFT
.
GetSizePixel
().
Width
();
long
nInfoWidth
=
m_aInfoFT
.
GetSizePixel
().
Width
();
long
nLongWord
=
getLongestWordWidth
(
sInfoStr
,
m_aInfoFT
);
long
nLongWord
=
getLongestWordWidth
(
sInfoStr
,
m_aInfoFT
);
long
nTxtWidth
=
m_aInfoFT
.
GetCtrlTextWidth
(
sInfoStr
)
+
nLongWord
;
long
nTxtWidth
=
m_aInfoFT
.
GetCtrlTextWidth
(
sInfoStr
)
+
nLongWord
;
...
@@ -183,12 +182,13 @@ void ManageLanguageDialog::FillLanguageBox()
...
@@ -183,12 +182,13 @@ void ManageLanguageDialog::FillLanguageBox()
{
{
bool
bIsDefault
=
localesAreEqual
(
aDefaultLocale
,
pLocale
[
i
]
);
bool
bIsDefault
=
localesAreEqual
(
aDefaultLocale
,
pLocale
[
i
]
);
LanguageType
eLangType
=
SvxLocaleToLanguage
(
pLocale
[
i
]
);
LanguageType
eLangType
=
SvxLocaleToLanguage
(
pLocale
[
i
]
);
String
sLanguage
=
aLangTable
.
GetString
(
eLangType
);
::
rtl
::
OUStringBuffer
sLanguageBuf
(
aLangTable
.
GetString
(
eLangType
)
);
if
(
bIsDefault
)
if
(
bIsDefault
)
{
{
sLanguage
+=
' '
;
sLanguage
Buf
.
append
(
' '
)
;
sLanguage
+=
m_sDefLangStr
;
sLanguage
Buf
.
append
(
m_sDefLangStr
)
;
}
}
::
rtl
::
OUString
sLanguage
(
sLanguageBuf
.
makeStringAndClear
());
sal_uInt16
nPos
=
m_aLanguageLB
.
InsertEntry
(
sLanguage
);
sal_uInt16
nPos
=
m_aLanguageLB
.
InsertEntry
(
sLanguage
);
m_aLanguageLB
.
SetEntryData
(
nPos
,
new
LanguageEntry
(
sLanguage
,
pLocale
[
i
],
bIsDefault
)
);
m_aLanguageLB
.
SetEntryData
(
nPos
,
new
LanguageEntry
(
sLanguage
,
pLocale
[
i
],
bIsDefault
)
);
}
}
...
@@ -315,9 +315,9 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog( Window* pParent, Localizatio
...
@@ -315,9 +315,9 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog( Window* pParent, Localizatio
// change to "Add Interface Language" mode
// change to "Add Interface Language" mode
SetHelpId
(
HID_BASICIDE_ADDNEW_LANGUAGE
);
SetHelpId
(
HID_BASICIDE_ADDNEW_LANGUAGE
);
m_pCheckLangLB
=
new
SvxCheckListBox
(
this
,
IDEResId
(
LB_ADD_LANGUAGE
)
);
m_pCheckLangLB
=
new
SvxCheckListBox
(
this
,
IDEResId
(
LB_ADD_LANGUAGE
)
);
SetText
(
String
(
IDEResId
(
STR_ADDLANG_TITLE
)
)
);
SetText
(
ResId
::
to
String
(
IDEResId
(
STR_ADDLANG_TITLE
)
)
);
m_aLanguageFT
.
SetText
(
String
(
IDEResId
(
STR_ADDLANG_LABEL
)
)
);
m_aLanguageFT
.
SetText
(
ResId
::
to
String
(
IDEResId
(
STR_ADDLANG_LABEL
)
)
);
m_aInfoFT
.
SetText
(
String
(
IDEResId
(
STR_ADDLANG_INFO
)
)
);
m_aInfoFT
.
SetText
(
ResId
::
to
String
(
IDEResId
(
STR_ADDLANG_INFO
)
)
);
}
}
FreeResource
();
FreeResource
();
...
@@ -362,7 +362,7 @@ void SetDefaultLanguageDialog::FillLanguageBox()
...
@@ -362,7 +362,7 @@ void SetDefaultLanguageDialog::FillLanguageBox()
void
SetDefaultLanguageDialog
::
CalcInfoSize
()
void
SetDefaultLanguageDialog
::
CalcInfoSize
()
{
{
String
sInfoStr
=
m_aInfoFT
.
GetText
();
::
rtl
::
OU
String
sInfoStr
=
m_aInfoFT
.
GetText
();
long
nInfoWidth
=
m_aInfoFT
.
GetSizePixel
().
Width
();
long
nInfoWidth
=
m_aInfoFT
.
GetSizePixel
().
Width
();
long
nLongWord
=
getLongestWordWidth
(
sInfoStr
,
m_aInfoFT
);
long
nLongWord
=
getLongestWordWidth
(
sInfoStr
,
m_aInfoFT
);
long
nTxtWidth
=
m_aInfoFT
.
GetCtrlTextWidth
(
sInfoStr
)
+
nLongWord
;
long
nTxtWidth
=
m_aInfoFT
.
GetCtrlTextWidth
(
sInfoStr
)
+
nLongWord
;
...
...
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