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
dfbbda56
Kaydet (Commit)
dfbbda56
authored
Kas 01, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert math font dialog to .ui
Change-Id: Ib7bf087664b6c8491872dfa37c750485fedabbe2
üst
c399eea8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
161 deletions
+67
-161
libreoffice-catalog.xml.in
extras/source/glade/libreoffice-catalog.xml.in
+3
-0
UIConfig_smath.mk
starmath/UIConfig_smath.mk
+1
-0
dialog.hxx
starmath/inc/dialog.hxx
+11
-16
starmath.hrc
starmath/inc/starmath.hrc
+0
-1
dialog.cxx
starmath/source/dialog.cxx
+52
-67
smres.src
starmath/source/smres.src
+0
-77
fontdialog.ui
starmath/uiconfig/smath/ui/fontdialog.ui
+0
-0
No files found.
extras/source/glade/libreoffice-catalog.xml.in
Dosyayı görüntüle @
dfbbda56
...
...
@@ -230,6 +230,9 @@
<glade-widget-class
title=
"Show Math Symbol"
name=
"smlo-SmShowSymbol"
generic-name=
"Show Math Symbol"
parent=
"GtkDrawingArea"
icon-name=
"widget-gtk-drawingarea"
/>
<glade-widget-class
title=
"Show Math Font"
name=
"smlo-SmShowFont"
generic-name=
"Show Math Font"
parent=
"GtkDrawingArea"
icon-name=
"widget-gtk-drawingarea"
/>
<glade-widget-class
title=
"Math Symbol Selection"
name=
"smlo-SmShowSymbolSet"
generic-name=
"Math Symbol Selection"
parent=
"GtkDrawingArea"
icon-name=
"widget-gtk-drawingarea"
/>
...
...
starmath/UIConfig_smath.mk
Dosyayı görüntüle @
dfbbda56
...
...
@@ -26,6 +26,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/smath,\
$(eval $(call gb_UIConfig_add_uifiles,modules/smath,\
starmath/uiconfig/smath/ui/alignmentdialog \
starmath/uiconfig/smath/ui/catalogdialog \
starmath/uiconfig/smath/ui/fontdialog \
starmath/uiconfig/smath/ui/fontsizedialog \
starmath/uiconfig/smath/ui/fonttypedialog \
starmath/uiconfig/smath/ui/printeroptions \
...
...
starmath/inc/dialog.hxx
Dosyayı görüntüle @
dfbbda56
...
...
@@ -74,44 +74,39 @@ public:
/**************************************************************************/
class
SmShowFont
:
public
Control
class
SmShowFont
:
public
Window
{
virtual
void
Paint
(
const
Rectangle
&
);
virtual
void
Paint
(
const
Rectangle
&
);
public
:
SmShowFont
(
Window
*
pParent
,
const
ResId
&
rResId
)
:
Control
(
pParent
,
rResId
)
SmShowFont
(
Window
*
pParent
,
WinBits
nStyle
)
:
Window
(
pParent
,
nStyle
)
{
}
virtual
Size
GetOptimalSize
()
const
;
void
SetFont
(
const
Font
&
rFont
);
};
class
SmFontDialog
:
public
ModalDialog
{
FixedText
aFixedText1
;
ComboBox
aFontBox
;
CheckBox
aBoldCheckBox
;
CheckBox
aItalicCheckBox
;
OKButton
aOKButton1
;
HelpButton
aHelpButton1
;
CancelButton
aCancelButton1
;
SmShowFont
aShowFont
;
FixedText
aFixedText2
;
ComboBox
*
m_pFontBox
;
VclContainer
*
m_pAttrFrame
;
CheckBox
*
m_pBoldCheckBox
;
CheckBox
*
m_pItalicCheckBox
;
SmShowFont
*
m_pShowFont
;
Font
Face
;
DECL_LINK
(
FontSelectHdl
,
ComboBox
*
);
DECL_LINK
(
FontModifyHdl
,
ComboBox
*
);
DECL_LINK
(
AttrChangeHdl
,
CheckBox
*
);
DECL_LINK
(
HelpButtonClickHdl
,
Button
*
);
void
InitColor_Impl
();
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
);
public
:
SmFontDialog
(
Window
*
pParent
,
OutputDevice
*
pFntListDevice
,
bool
bHideCheckboxes
,
bool
bFreeRes
=
true
);
SmFontDialog
(
Window
*
pParent
,
OutputDevice
*
pFntListDevice
,
bool
bHideCheckboxes
);
const
Font
&
GetFont
()
const
{
return
Face
;
}
void
SetFont
(
const
Font
&
rFont
);
...
...
starmath/inc/starmath.hrc
Dosyayı görüntüle @
dfbbda56
...
...
@@ -76,7 +76,6 @@
#define SID_ELEMENTSDOCKINGWINDOW (SID_SMA_START + 126)
#define RID_FONTDIALOG (RID_APP_START + 2)
#define RID_SYMDEFINEDIALOG (RID_APP_START + 9)
#define RID_PRINTUIOPTIONS (RID_APP_START + 11)
...
...
starmath/source/dialog.cxx
Dosyayı görüntüle @
dfbbda56
...
...
@@ -231,7 +231,7 @@ SfxTabPage* SmPrintOptionsTabPage::Create(Window* pWindow, const SfxItemSet& rSe
void
SmShowFont
::
Paint
(
const
Rectangle
&
rRect
)
{
Control
::
Paint
(
rRect
);
Window
::
Paint
(
rRect
);
OUString
Text
(
GetFont
().
GetName
());
Size
TextSize
(
GetTextWidth
(
Text
),
GetTextHeight
());
...
...
@@ -240,6 +240,21 @@ void SmShowFont::Paint(const Rectangle& rRect )
(
GetOutputSize
().
Height
()
-
TextSize
.
Height
())
/
2
),
Text
);
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
Window
*
SAL_CALL
makeSmShowFont
(
Window
*
pParent
,
VclBuilder
::
stringmap
&
rMap
)
{
WinBits
nWinStyle
=
0
;
OString
sBorder
=
VclBuilder
::
extractCustomProperty
(
rMap
);
if
(
!
sBorder
.
isEmpty
())
nWinStyle
|=
WB_BORDER
;
return
new
SmShowFont
(
pParent
,
nWinStyle
);
}
Size
SmShowFont
::
GetOptimalSize
()
const
{
return
LogicToPixel
(
Size
(
111
,
31
),
MapMode
(
MAP_APPFONT
));
}
void
SmShowFont
::
SetFont
(
const
Font
&
rFont
)
{
...
...
@@ -249,7 +264,7 @@ void SmShowFont::SetFont(const Font& rFont)
Invalidate
();
aFont
.
SetSize
(
Size
(
0
,
24
));
aFont
.
SetAlign
(
ALIGN_TOP
);
Control
::
SetFont
(
aFont
);
Window
::
SetFont
(
aFont
);
// keep old text color (new font may have different color)
SetTextColor
(
aTxtColor
);
...
...
@@ -259,7 +274,7 @@ void SmShowFont::SetFont(const Font& rFont)
IMPL_LINK_INLINE_START
(
SmFontDialog
,
FontSelectHdl
,
ComboBox
*
,
pComboBox
)
{
Face
.
SetName
(
pComboBox
->
GetText
());
aShowFont
.
SetFont
(
Face
);
m_pShowFont
->
SetFont
(
Face
);
return
0
;
}
IMPL_LINK_INLINE_END
(
SmFontDialog
,
FontSelectHdl
,
ComboBox
*
,
pComboBox
)
...
...
@@ -279,17 +294,17 @@ IMPL_LINK( SmFontDialog, FontModifyHdl, ComboBox *, pComboBox )
IMPL_LINK
(
SmFontDialog
,
AttrChangeHdl
,
CheckBox
*
,
EMPTYARG
/*pCheckBox*/
)
{
if
(
aBoldCheckBox
.
IsChecked
())
if
(
m_pBoldCheckBox
->
IsChecked
())
Face
.
SetWeight
(
FontWeight
(
WEIGHT_BOLD
));
else
Face
.
SetWeight
(
FontWeight
(
WEIGHT_NORMAL
));
if
(
aItalicCheckBox
.
IsChecked
())
if
(
m_pItalicCheckBox
->
IsChecked
())
Face
.
SetItalic
(
ITALIC_NORMAL
);
else
Face
.
SetItalic
(
ITALIC_NONE
);
aShowFont
.
SetFont
(
Face
);
m_pShowFont
->
SetFont
(
Face
);
return
0
;
}
...
...
@@ -298,40 +313,22 @@ void SmFontDialog::SetFont(const Font &rFont)
{
Face
=
rFont
;
aFontBox
.
SetText
(
Face
.
GetName
()
);
aBoldCheckBox
.
Check
(
IsBold
(
Face
)
);
aItalicCheckBox
.
Check
(
IsItalic
(
Face
)
);
m_pFontBox
->
SetText
(
Face
.
GetName
()
);
m_pBoldCheckBox
->
Check
(
IsBold
(
Face
)
);
m_pItalicCheckBox
->
Check
(
IsItalic
(
Face
)
);
aShowFont
.
SetFont
(
Face
);
}
IMPL_LINK
(
SmFontDialog
,
HelpButtonClickHdl
,
Button
*
,
EMPTYARG
/*pButton*/
)
{
// start help system
Help
*
pHelp
=
Application
::
GetHelp
();
if
(
pHelp
)
{
pHelp
->
Start
(
OUString
(
"HID_SMA_FONTDIALOG"
),
&
aHelpButton1
);
}
return
0
;
m_pShowFont
->
SetFont
(
Face
);
}
SmFontDialog
::
SmFontDialog
(
Window
*
pParent
,
OutputDevice
*
pFntListDevice
,
bool
bHideCheckboxes
,
bool
bFreeRes
)
:
ModalDialog
(
pParent
,
SmResId
(
RID_FONTDIALOG
)),
aFixedText1
(
this
,
SmResId
(
1
)),
aFontBox
(
this
,
SmResId
(
1
)),
aBoldCheckBox
(
this
,
SmResId
(
1
)),
aItalicCheckBox
(
this
,
SmResId
(
2
)),
aOKButton1
(
this
,
SmResId
(
1
)),
aHelpButton1
(
this
,
SmResId
(
1
)),
aCancelButton1
(
this
,
SmResId
(
1
)),
aShowFont
(
this
,
SmResId
(
1
)),
aFixedText2
(
this
,
SmResId
(
2
))
SmFontDialog
::
SmFontDialog
(
Window
*
pParent
,
OutputDevice
*
pFntListDevice
,
bool
bHideCheckboxes
)
:
ModalDialog
(
pParent
,
"FontDialog"
,
"modules/smath/ui/fontdialog.ui"
)
{
if
(
bFreeRes
)
FreeResource
();
aHelpButton1
.
SetClickHdl
(
LINK
(
this
,
SmFontDialog
,
HelpButtonClickHdl
));
get
(
m_pFontBox
,
"font"
);
m_pFontBox
->
set_height_request
(
8
*
m_pFontBox
->
GetTextHeight
());
get
(
m_pAttrFrame
,
"attrframe"
);
get
(
m_pBoldCheckBox
,
"bold"
);
get
(
m_pItalicCheckBox
,
"italic"
);
get
(
m_pShowFont
,
"preview"
);
{
WaitObject
aWait
(
this
);
...
...
@@ -339,8 +336,8 @@ SmFontDialog::SmFontDialog(Window * pParent,
FontList
aFontList
(
pFntListDevice
);
sal_uInt16
nCount
=
aFontList
.
GetFontNameCount
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
aFontBox
.
InsertEntry
(
aFontList
.
GetFontName
(
i
).
GetName
()
);
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
m_pFontBox
->
InsertEntry
(
aFontList
.
GetFontName
(
i
).
GetName
()
);
Face
.
SetSize
(
Size
(
0
,
24
));
Face
.
SetWeight
(
WEIGHT_NORMAL
);
...
...
@@ -353,29 +350,21 @@ SmFontDialog::SmFontDialog(Window * pParent,
InitColor_Impl
();
// preview like controls should have a 2D look
aShowFont
.
SetBorderStyle
(
WINDOW_BORDER_MONO
);
m_pShowFont
->
SetBorderStyle
(
WINDOW_BORDER_MONO
);
}
aFontBox
.
SetSelectHdl
(
LINK
(
this
,
SmFontDialog
,
FontSelectHdl
));
aFontBox
.
SetModifyHdl
(
LINK
(
this
,
SmFontDialog
,
FontModifyHdl
));
aBoldCheckBox
.
SetClickHdl
(
LINK
(
this
,
SmFontDialog
,
AttrChangeHdl
));
aItalicCheckBox
.
SetClickHdl
(
LINK
(
this
,
SmFontDialog
,
AttrChangeHdl
));
m_pFontBox
->
SetSelectHdl
(
LINK
(
this
,
SmFontDialog
,
FontSelectHdl
));
m_pFontBox
->
SetModifyHdl
(
LINK
(
this
,
SmFontDialog
,
FontModifyHdl
));
m_pBoldCheckBox
->
SetClickHdl
(
LINK
(
this
,
SmFontDialog
,
AttrChangeHdl
));
m_pItalicCheckBox
->
SetClickHdl
(
LINK
(
this
,
SmFontDialog
,
AttrChangeHdl
));
if
(
bHideCheckboxes
)
{
aBoldCheckBox
.
Check
(
false
);
aBoldCheckBox
.
Enable
(
false
);
aBoldCheckBox
.
Show
(
false
);
aItalicCheckBox
.
Check
(
false
);
aItalicCheckBox
.
Enable
(
false
);
aItalicCheckBox
.
Show
(
false
);
aFixedText2
.
Show
(
false
);
Size
aSize
(
aFontBox
.
GetSizePixel
()
);
long
nComboBoxBottom
=
aFontBox
.
GetPosPixel
().
Y
()
+
aFontBox
.
GetSizePixel
().
Height
();
long
nCheckBoxBottom
=
aItalicCheckBox
.
GetPosPixel
().
Y
()
+
aItalicCheckBox
.
GetSizePixel
().
Height
();
aSize
.
Height
()
+=
nCheckBoxBottom
-
nComboBoxBottom
;
aFontBox
.
SetSizePixel
(
aSize
);
m_pBoldCheckBox
->
Check
(
false
);
m_pBoldCheckBox
->
Enable
(
false
);
m_pItalicCheckBox
->
Check
(
false
);
m_pItalicCheckBox
->
Enable
(
false
);
m_pAttrFrame
->
Show
(
false
);
}
}
...
...
@@ -405,8 +394,8 @@ void SmFontDialog::InitColor_Impl()
Color
aTmpColor
(
nBgCol
);
Wallpaper
aWall
(
aTmpColor
);
Color
aTxtColor
(
nTxtCol
);
aShowFont
.
SetBackground
(
aWall
);
aShowFont
.
SetTextColor
(
aTxtColor
);
m_pShowFont
->
SetBackground
(
aWall
);
m_pShowFont
->
SetTextColor
(
aTxtColor
);
}
void
SmFontDialog
::
DataChanged
(
const
DataChangedEvent
&
rDCEvt
)
...
...
@@ -1293,17 +1282,13 @@ IMPL_LINK( SmShowSymbolSetWindow, ScrollHdl, ScrollBar*, EMPTYARG /*pScrollBar*/
extern
"C"
SAL_DLLPUBLIC_EXPORT
Window
*
SAL_CALL
makeSmShowSymbol
(
Window
*
pParent
,
VclBuilder
::
stringmap
&
rMap
)
{
WinBits
nWin
Bits
=
0
;
WinBits
nWin
Style
=
0
;
VclBuilder
::
stringmap
::
iterator
aFind
=
rMap
.
find
(
OString
(
"border"
));
if
(
aFind
!=
rMap
.
end
())
{
if
(
toBool
(
aFind
->
second
))
nWinBits
|=
WB_BORDER
;
rMap
.
erase
(
aFind
);
}
OString
sBorder
=
VclBuilder
::
extractCustomProperty
(
rMap
);
if
(
!
sBorder
.
isEmpty
())
nWinStyle
|=
WB_BORDER
;
return
new
SmShowSymbol
(
pParent
,
nWin
Bits
);
return
new
SmShowSymbol
(
pParent
,
nWin
Style
);
}
void
SmShowSymbol
::
Resize
()
...
...
starmath/source/smres.src
Dosyayı görüntüle @
dfbbda56
...
...
@@ -29,83 +29,6 @@
#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
ModalDialog RID_FONTDIALOG
{
HelpID = "starmath:ModalDialog:RID_FONTDIALOG";
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 183 , 150 ) ;
Text [ en-US ] = "Fonts" ;
FixedText 1
{
Left = TRUE ;
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 40 , 8 ) ;
Text [ en-US ] = "~Font";
};
ComboBox 1
{
HelpID = "starmath:ComboBox:RID_FONTDIALOG:1";
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 111 , 60 ) ;
TabStop = TRUE ;
Sort = TRUE ;
VScroll = TRUE ;
};
CheckBox 1
{
HelpID = "starmath:CheckBox:RID_FONTDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 84 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
Text [ en-US ] = "~Bold" ;
};
CheckBox 2
{
HelpID = "starmath:CheckBox:RID_FONTDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 97 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
Text [ en-US ] = "~Italic" ;
};
HelpButton 1
{
Pos = MAP_APPFONT ( 126 , 42 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
HelpID = "starmath:HelpButton:RID_FONTDIALOG:1";
Text [ en-US ] = "~Help" ;
};
OKButton 1
{
Pos = MAP_APPFONT ( 126 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton 1
{
Pos = MAP_APPFONT ( 126 , 24 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
Control 1
{
Disable = TRUE ;
Border = TRUE;
Pos = MAP_APPFONT ( 6 , 113 ) ;
Size = MAP_APPFONT ( 111 , 31 ) ;
};
FixedText 2
{
Pos = MAP_APPFONT ( 6 , 85 ) ;
Size = MAP_APPFONT ( 42 , 8 ) ;
Text [ en-US ] = "Attributes" ;
};
};
ModalDialog RID_SYMDEFINEDIALOG
{
HelpID = "starmath:ModalDialog:RID_SYMDEFINEDIALOG";
...
...
starmath/uiconfig/smath/ui/fontdialog.ui
0 → 100644
Dosyayı görüntüle @
dfbbda56
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