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
06f18dc7
Kaydet (Commit)
06f18dc7
authored
Haz 28, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ditch used stuff, and make it less horrifically ugly
üst
3344a577
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
120 deletions
+32
-120
about.cxx
cui/source/dialogs/about.cxx
+26
-96
about.hrc
cui/source/dialogs/about.hrc
+5
-7
about.src
cui/source/dialogs/about.src
+1
-5
about.hxx
cui/source/inc/about.hxx
+0
-12
No files found.
cui/source/dialogs/about.cxx
Dosyayı görüntüle @
06f18dc7
...
...
@@ -90,14 +90,9 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aVersionText
(
this
,
ResId
(
ABOUT_FTXT_VERSION
,
*
rId
.
GetResMgr
()
)
),
aCopyrightText
(
this
,
ResId
(
ABOUT_FTXT_COPYRIGHT
,
*
rId
.
GetResMgr
()
)
),
aInfoLink
(
this
,
ResId
(
ABOUT_FTXT_LINK
,
*
rId
.
GetResMgr
()
)
),
aAccelStr
(
ResId
(
ABOUT_STR_ACCEL
,
*
rId
.
GetResMgr
()
)
),
aVersionTextStr
(
ResId
(
ABOUT_STR_VERSION
,
*
rId
.
GetResMgr
()
)
),
aCopyrightTextStr
(
ResId
(
ABOUT_STR_COPYRIGHT
,
*
rId
.
GetResMgr
()
)
),
aLinkStr
(
ResId
(
ABOUT_STR_LINK
,
*
rId
.
GetResMgr
()
)
),
aTimer
(),
nOff
(
0
),
m_nDeltaWidth
(
0
),
m_nPendingScrolls
(
0
)
aLinkStr
(
ResId
(
ABOUT_STR_LINK
,
*
rId
.
GetResMgr
()
)
)
{
rtl
::
OUString
sProduct
;
utl
::
ConfigManager
::
GetDirectConfigProperty
(
utl
::
ConfigManager
::
PRODUCTNAME
)
>>=
sProduct
;
...
...
@@ -122,28 +117,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
#endif
aVersionText
.
SetText
(
sVersion
);
// Initialization call for developers
if
(
aAccelStr
.
Len
()
&&
ByteString
(
U2S
(
aAccelStr
)).
IsAlphaAscii
()
)
{
Accelerator
*
pAccel
=
0
,
*
pPrevAccel
=
0
,
*
pFirstAccel
=
0
;
aAccelStr
.
ToUpperAscii
();
for
(
sal_uInt16
i
=
0
;
i
<
aAccelStr
.
Len
();
++
i
)
{
pPrevAccel
=
pAccel
;
pAccel
=
new
Accelerator
;
aAccelList
.
push_back
(
pAccel
);
sal_uInt16
nKey
=
aAccelStr
.
GetChar
(
i
)
-
'A'
+
KEY_A
;
pAccel
->
InsertItem
(
1
,
KeyCode
(
nKey
,
KEY_MOD1
)
);
if
(
i
>
0
)
pPrevAccel
->
SetAccel
(
1
,
pAccel
);
if
(
i
==
0
)
pFirstAccel
=
pAccel
;
}
pAccel
->
SetSelectHdl
(
LINK
(
this
,
AboutDialog
,
AccelSelectHdl
)
);
GetpApp
()
->
InsertAccel
(
pFirstAccel
);
}
// set for background and text the correct system color
const
StyleSettings
&
rSettings
=
GetSettings
().
GetStyleSettings
();
Color
aWhiteCol
(
rSettings
.
GetWindowColor
()
);
...
...
@@ -183,51 +156,55 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
Size
aVTSize
=
aVersionText
.
CalcMinimumSize
();
long
nY
=
aAppLogoSiz
.
Height
()
+
(
a6Size
.
Height
()
*
2
);
long
nDlgMargin
=
a6Size
.
Width
()
*
3
;
long
nCtrlMargin
=
a
VTSize
.
Height
()
+
(
a6Size
.
Height
()
*
2
)
;
long
nCtrlMargin
=
a
6Size
.
Height
()
*
2
;
long
nTextWidth
=
aOutSiz
.
Width
()
-
nDlgMargin
;
// finally set the aVersionText widget position and size
Size
aVTCopySize
=
aVTSize
;
Point
aVTCopyPnt
;
aVTCopySize
.
Width
()
=
nTextWidth
;
aVTCopySize
.
Width
()
=
nTextWidth
;
aVTCopyPnt
.
X
()
=
(
aOutSiz
.
Width
()
-
aVTCopySize
.
Width
()
)
/
2
;
aVTCopyPnt
.
Y
()
=
nY
;
aVersionText
.
SetPosSizePixel
(
aVTCopyPnt
,
aVTCopySize
);
nY
+=
aVTSize
.
Height
();
nY
+=
nCtrlMargin
;
// OK-Button-Position (at the bottom and centered)
Size
aOKSiz
=
aOKButton
.
GetSizePixel
();
Point
aOKPnt
=
aOKButton
.
GetPosPixel
();
// FixedHyperlink with more info link
Point
aLinkPnt
=
aInfoLink
.
GetPosPixel
();
Size
aLinkSize
=
aInfoLink
.
GetSizePixel
();
// Multiline edit with Copyright-Text
Point
aCopyPnt
=
aCopyrightText
.
GetPosPixel
();
Size
aCopySize
=
aCopyrightText
.
GetSizePixel
();
aCopySize
.
Width
()
=
nTextWidth
;
aCopySize
.
Height
()
=
aOutSiz
.
Height
()
-
nY
-
(
aOKSiz
.
Height
()
*
2
)
-
3
*
aLinkSize
.
Height
()
-
nCtrlMargin
;
// preferred Version widget size
Size
aCTSize
=
aCopyrightText
.
CalcMinimumSize
();
aCopyPnt
.
X
()
=
(
aOutSiz
.
Width
()
-
aCopySize
.
Width
()
)
/
2
;
aCopyPnt
.
Y
()
=
nY
;
aCopyrightText
.
SetPosSizePixel
(
aCopyPnt
,
aCopySize
);
Size
aCTCopySize
=
aCTSize
;
Point
aCTCopyPnt
;
aCTCopySize
.
Width
()
=
nTextWidth
;
aCTCopyPnt
.
X
()
=
(
aOutSiz
.
Width
()
-
aCTCopySize
.
Width
()
)
/
2
;
aCTCopyPnt
.
Y
()
=
nY
;
aCopyrightText
.
SetPosSizePixel
(
aCTCopyPnt
,
aCTCopySize
);
nY
+=
aCopySize
.
Height
()
+
aLinkSize
.
Height
();
nY
+=
aCTSize
.
Height
();
nY
+=
nCtrlMargin
;
aLinkSize
.
Width
()
=
aInfoLink
.
CalcMinimumSize
().
Width
();
// FixedHyperlink with more info link
Size
aLinkSize
=
aInfoLink
.
CalcMinimumSize
();
Point
aLinkPnt
;
aLinkPnt
.
X
()
=
(
aOutSiz
.
Width
()
-
aLinkSize
.
Width
()
)
/
2
;
aLinkPnt
.
Y
()
=
nY
;
aInfoLink
.
SetPosSizePixel
(
aLinkPnt
,
aLinkSize
);
nY
+=
aLinkSize
.
Height
()
+
nCtrlMargin
;
// OK-Button-Position (at the bottom and centered)
Size
aOKSiz
=
aOKButton
.
GetSizePixel
();
Point
aOKPnt
;
aOKPnt
.
X
()
=
(
aOutSiz
.
Width
()
-
aOKSiz
.
Width
()
)
/
2
;
aOKPnt
.
Y
()
=
nY
;
aOKButton
.
SetPosPixel
(
aOKPnt
);
// Change the width of the dialog
nY
+=
aOKSiz
.
Height
()
+
nCtrlMargin
;
aOutSiz
.
Height
()
=
nY
;
// Change the size of the dialog
SetOutputSizePixel
(
aOutSiz
);
FreeResource
();
...
...
@@ -238,50 +215,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
// -----------------------------------------------------------------------
AboutDialog
::~
AboutDialog
()
{
// Clearing the developers call
if
(
!
aAccelList
.
empty
()
)
{
GetpApp
()
->
RemoveAccel
(
aAccelList
.
front
()
);
for
(
size_t
i
=
0
,
n
=
aAccelList
.
size
();
i
<
n
;
++
i
)
delete
aAccelList
[
i
];
aAccelList
.
clear
();
}
}
// -----------------------------------------------------------------------
IMPL_LINK
(
AboutDialog
,
TimerHdl
,
Timer
*
,
pTimer
)
{
(
void
)
pTimer
;
//unused
++
m_nPendingScrolls
;
Invalidate
(
INVALIDATE_NOERASE
|
INVALIDATE_NOCHILDREN
);
return
0
;
}
// -----------------------------------------------------------------------
IMPL_LINK
(
AboutDialog
,
AccelSelectHdl
,
Accelerator
*
,
pAccelerator
)
{
(
void
)
pAccelerator
;
//unused
// init Timer
aTimer
.
SetTimeoutHdl
(
LINK
(
this
,
AboutDialog
,
TimerHdl
)
);
// init scroll mode
nOff
=
GetOutputSizePixel
().
Height
();
MapMode
aMapMode
(
MAP_PIXEL
);
SetMapMode
(
aMapMode
);
// start scroll Timer
aTimer
.
SetTimeout
(
SCROLL_TIMER
);
aTimer
.
Start
();
return
0
;
}
// -----------------------------------------------------------------------
IMPL_LINK
(
AboutDialog
,
HandleHyperlink
,
svt
::
FixedHyperlink
*
,
pHyperlink
)
{
rtl
::
OUString
sURL
=
pHyperlink
->
GetURL
();
...
...
@@ -312,15 +245,12 @@ IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
void
AboutDialog
::
Paint
(
const
Rectangle
&
rRect
)
{
SetClipRegion
(
rRect
);
Point
aPos
(
m_nDeltaWidth
/
2
,
0
);
Point
aPos
(
0
,
0
);
DrawImage
(
aPos
,
aAppLogo
);
}
sal_Bool
AboutDialog
::
Close
()
{
// stop Timer and finish the dialog
aTimer
.
Stop
();
EndDialog
(
RET_OK
);
return
sal_False
;
}
...
...
cui/source/dialogs/about.hrc
Dosyayı görüntüle @
06f18dc7
...
...
@@ -29,10 +29,8 @@
#define ABOUT_BTN_OK 1
#define ABOUT_FTXT_VERSION 2
#define ABOUT_STR_ACCEL 3
#define ABOUT_FTXT_COPYRIGHT 4
#define ABOUT_FTXT_LINK 5
#define ABOUT_STR_VERSION 6
#define ABOUT_STR_COPYRIGHT 7
#define ABOUT_STR_LINK 8
#define ABOUT_FTXT_COPYRIGHT 3
#define ABOUT_FTXT_LINK 4
#define ABOUT_STR_VERSION 5
#define ABOUT_STR_COPYRIGHT 6
#define ABOUT_STR_LINK 7
cui/source/dialogs/about.src
Dosyayı görüntüle @
06f18dc7
...
...
@@ -72,14 +72,10 @@ ModalDialog RID_DEFAULTABOUT
};
String ABOUT_STR_COPYRIGHT
{
Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\n
This product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.
\n%OOOVENDOR acknowledges all community members, please find more info at the link below:";
Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\n
\nThis product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.\n
\n%OOOVENDOR acknowledges all community members, please find more info at the link below:";
};
String ABOUT_STR_LINK
{
Text[ en-US ] = "http://www.libreoffice.org/credits.html";
};
String ABOUT_STR_ACCEL
{
Text = "SDT" ;
};
};
cui/source/inc/about.hxx
Dosyayı görüntüle @
06f18dc7
...
...
@@ -53,30 +53,18 @@ private:
MultiLineEdit
aCopyrightText
;
svt
::
FixedHyperlink
aInfoLink
;
// ResStringArray aDeveloperAry; // RIP ...
String
aAccelStr
;
String
aVersionData
;
String
aVersionTextStr
;
String
aCopyrightTextStr
;
String
aLinkStr
;
AccelList
aAccelList
;
AutoTimer
aTimer
;
long
nOff
;
long
m_nDeltaWidth
;
int
m_nPendingScrolls
;
protected
:
virtual
sal_Bool
Close
();
virtual
void
Paint
(
const
Rectangle
&
rRect
);
public
:
AboutDialog
(
Window
*
pParent
,
const
ResId
&
rId
);
~
AboutDialog
();
DECL_LINK
(
TimerHdl
,
Timer
*
);
DECL_LINK
(
AccelSelectHdl
,
Accelerator
*
);
DECL_LINK
(
HandleHyperlink
,
svt
::
FixedHyperlink
*
);
};
...
...
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