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
d6f5d4ee
Kaydet (Commit)
d6f5d4ee
authored
May 08, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add a status bar icon to fit slide to window
Change-Id: I2c1d1fc7425b0aaad2a2445e0ac71ddc38410fdb
üst
6cf148ba
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
19 deletions
+70
-19
zoom_page_statusbar.png
icon-themes/galaxy/svx/res/zoom_page_statusbar.png
+0
-0
dialogs.hrc
include/svx/dialogs.hrc
+4
-2
zoomctrl.hxx
include/svx/zoomctrl.hxx
+13
-2
sddll.cxx
sd/source/ui/app/sddll.cxx
+1
-0
statusbar.xml
sd/uiconfig/simpress/statusbar/statusbar.xml
+1
-0
modctrl.cxx
svx/source/stbctrls/modctrl.cxx
+0
-7
stbctrls.src
svx/source/stbctrls/stbctrls.src
+13
-0
zoomctrl.cxx
svx/source/stbctrls/zoomctrl.cxx
+38
-8
No files found.
icon-themes/galaxy/svx/res/zoom_page_statusbar.png
0 → 100644
Dosyayı görüntüle @
d6f5d4ee
418 Bytes
include/svx/dialogs.hrc
Dosyayı görüntüle @
d6f5d4ee
...
@@ -981,12 +981,14 @@
...
@@ -981,12 +981,14 @@
#define RID_SVXSTR_DOC_LOAD (SVX_OOO_BUILD_START + 6) // 1236
#define RID_SVXSTR_DOC_LOAD (SVX_OOO_BUILD_START + 6) // 1236
#define RID_SVXSTR_ERR_OLD_PASSWD (SVX_OOO_BUILD_START + 7) // 1237
#define RID_SVXSTR_ERR_OLD_PASSWD (SVX_OOO_BUILD_START + 7) // 1237
#define RID_SVXSTR_ERR_REPEAT_PASSWD (SVX_OOO_BUILD_START + 8) // 1238
#define RID_SVXSTR_ERR_REPEAT_PASSWD (SVX_OOO_BUILD_START + 8) // 1238
#define RID_SVXBMP_ZOOM_PAGE (SVX_OOO_BUILD_START + 9) // 1239
#define RID_SVXSTR_FIT_SLIDE (SVX_OOO_BUILD_START + 10) // 1240
// sidebar-related resources (defined in the appropriate .hrc's)
// sidebar-related resources (defined in the appropriate .hrc's)
#define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 124
0
)
#define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 124
1
)
// !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!!
// !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!!
#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 127
0
)
#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 127
1
)
// if we have _a_lot_ time, we should group the resource ids by type, instead
// if we have _a_lot_ time, we should group the resource ids by type, instead
...
...
include/svx/zoomctrl.hxx
Dosyayı görüntüle @
d6f5d4ee
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
#include <sfx2/stbitem.hxx>
#include <sfx2/stbitem.hxx>
#include <svx/svxdllapi.h>
#include <svx/svxdllapi.h>
#include <vcl/image.hxx>
// class SvxZoomToolBoxControl -------------------------------------------
class
SVX_DLLPUBLIC
SvxZoomStatusBarControl
:
public
SfxStatusBarControl
class
SVX_DLLPUBLIC
SvxZoomStatusBarControl
:
public
SfxStatusBarControl
{
{
...
@@ -42,6 +41,18 @@ public:
...
@@ -42,6 +41,18 @@ public:
};
};
class
SVX_DLLPUBLIC
SvxZoomPageStatusBarControl
:
public
SfxStatusBarControl
{
private
:
Image
maImage
;
public
:
virtual
void
Paint
(
const
UserDrawEvent
&
rEvt
)
SAL_OVERRIDE
;
virtual
bool
MouseButtonDown
(
const
MouseEvent
&
rEvt
)
SAL_OVERRIDE
;
SFX_DECL_STATUSBAR_CONTROL
();
SvxZoomPageStatusBarControl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
StatusBar
&
rStb
);
};
#endif
#endif
...
...
sd/source/ui/app/sddll.cxx
Dosyayı görüntüle @
d6f5d4ee
...
@@ -239,6 +239,7 @@ void SdDLL::RegisterControllers()
...
@@ -239,6 +239,7 @@ void SdDLL::RegisterControllers()
SvxCTLTextTbxCtrl
::
RegisterControl
(
SID_ATTR_PARA_RIGHT_TO_LEFT
,
pMod
);
SvxCTLTextTbxCtrl
::
RegisterControl
(
SID_ATTR_PARA_RIGHT_TO_LEFT
,
pMod
);
// register StatusBarControls
// register StatusBarControls
SvxZoomPageStatusBarControl
::
RegisterControl
(
SID_ZOOM_ENTIRE_PAGE
,
pMod
);
SvxZoomStatusBarControl
::
RegisterControl
(
SID_ATTR_ZOOM
,
pMod
);
SvxZoomStatusBarControl
::
RegisterControl
(
SID_ATTR_ZOOM
,
pMod
);
SvxPosSizeStatusBarControl
::
RegisterControl
(
SID_ATTR_SIZE
,
pMod
);
SvxPosSizeStatusBarControl
::
RegisterControl
(
SID_ATTR_SIZE
,
pMod
);
SvxModifyControl
::
RegisterControl
(
SID_DOC_MODIFIED
,
pMod
);
SvxModifyControl
::
RegisterControl
(
SID_DOC_MODIFIED
,
pMod
);
...
...
sd/uiconfig/simpress/statusbar/statusbar.xml
Dosyayı görüntüle @
d6f5d4ee
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
<statusbar:statusbaritem
xlink:href=
".uno:Signature"
statusbar:align=
"center"
statusbar:ownerdraw=
"true"
statusbar:width=
"16"
/>
<statusbar:statusbaritem
xlink:href=
".uno:Signature"
statusbar:align=
"center"
statusbar:ownerdraw=
"true"
statusbar:width=
"16"
/>
<statusbar:statusbaritem
xlink:href=
".uno:PageStatus"
statusbar:align=
"left"
statusbar:width=
"124"
/>
<statusbar:statusbaritem
xlink:href=
".uno:PageStatus"
statusbar:align=
"left"
statusbar:width=
"124"
/>
<statusbar:statusbaritem
xlink:href=
".uno:LayoutStatus"
statusbar:align=
"left"
statusbar:autosize=
"true"
statusbar:width=
"54"
/>
<statusbar:statusbaritem
xlink:href=
".uno:LayoutStatus"
statusbar:align=
"left"
statusbar:autosize=
"true"
statusbar:width=
"54"
/>
<statusbar:statusbaritem
xlink:href=
".uno:ZoomPage"
statusbar:align=
"center"
statusbar:ownerdraw=
"true"
statusbar:width=
"9"
/>
<statusbar:statusbaritem
xlink:href=
".uno:ZoomSlider"
statusbar:align=
"center"
statusbar:ownerdraw=
"true"
statusbar:width=
"130"
/>
<statusbar:statusbaritem
xlink:href=
".uno:ZoomSlider"
statusbar:align=
"center"
statusbar:ownerdraw=
"true"
statusbar:width=
"130"
/>
<statusbar:statusbaritem
xlink:href=
".uno:Zoom"
statusbar:align=
"center"
statusbar:width=
"36"
/>
<statusbar:statusbaritem
xlink:href=
".uno:Zoom"
statusbar:align=
"center"
statusbar:width=
"36"
/>
</statusbar:statusbar>
</statusbar:statusbar>
svx/source/stbctrls/modctrl.cxx
Dosyayı görüntüle @
d6f5d4ee
...
@@ -136,10 +136,6 @@ void SvxModifyControl::_repaint()
...
@@ -136,10 +136,6 @@ void SvxModifyControl::_repaint()
GetStatusBar
().
SetItemData
(
GetId
(),
0
);
// force repaint
GetStatusBar
().
SetItemData
(
GetId
(),
0
);
// force repaint
}
}
namespace
{
/**
/**
* Given a bounding rectangle and an image, determine the top-left position
* Given a bounding rectangle and an image, determine the top-left position
* of the image so that the image would look centered both horizontally and
* of the image so that the image would look centered both horizontally and
...
@@ -161,9 +157,6 @@ Point centerImage(const Rectangle& rBoundingRect, const Image& rImg)
...
@@ -161,9 +157,6 @@ Point centerImage(const Rectangle& rBoundingRect, const Image& rImg)
return
aPt
;
return
aPt
;
}
}
}
void
SvxModifyControl
::
Paint
(
const
UserDrawEvent
&
rUsrEvt
)
void
SvxModifyControl
::
Paint
(
const
UserDrawEvent
&
rUsrEvt
)
{
{
OutputDevice
*
pDev
=
rUsrEvt
.
GetDevice
();
OutputDevice
*
pDev
=
rUsrEvt
.
GetDevice
();
...
...
svx/source/stbctrls/stbctrls.src
Dosyayı görüntüle @
d6f5d4ee
...
@@ -116,6 +116,11 @@ String RID_SVXSTR_DOC_LOAD
...
@@ -116,6 +116,11 @@ String RID_SVXSTR_DOC_LOAD
Text [ en-US ] = "Loading document...";
Text [ en-US ] = "Loading document...";
};
};
String RID_SVXSTR_FIT_SLIDE
{
Text [ en-US ] = "Fit slide to current window.";
};
// PopupMenu -------------------------------------------------------------
// PopupMenu -------------------------------------------------------------
Menu RID_SVXMNU_ZOOM
Menu RID_SVXMNU_ZOOM
{
{
...
@@ -333,5 +338,13 @@ Image RID_SVXBMP_DOC_MODIFIED_FEEDBACK
...
@@ -333,5 +338,13 @@ Image RID_SVXBMP_DOC_MODIFIED_FEEDBACK
};
};
MaskColor = STD_MASKCOLOR;
MaskColor = STD_MASKCOLOR;
};
};
Image RID_SVXBMP_ZOOM_PAGE
{
ImageBitmap = Bitmap
{
File = "zoom_page_statusbar.png" ;
};
MaskColor = STD_MASKCOLOR;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/stbctrls/zoomctrl.cxx
Dosyayı görüntüle @
d6f5d4ee
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
#include <svx/dialogs.hrc>
#include <svx/dialogs.hrc>
#include "svx/zoomctrl.hxx"
#include <svx/zoomctrl.hxx>
#include <svx/zoomslideritem.hxx>
#include <sfx2/zoomitem.hxx>
#include <sfx2/zoomitem.hxx>
#include "stbctrls.h"
#include "stbctrls.h"
#include <svx/dialmgr.hxx>
#include <svx/dialmgr.hxx>
...
@@ -97,7 +98,6 @@ void ZoomPopup_Impl::Select()
...
@@ -97,7 +98,6 @@ void ZoomPopup_Impl::Select()
}
}
// class SvxZoomStatusBarControl ------------------------------------------
// class SvxZoomStatusBarControl ------------------------------------------
SvxZoomStatusBarControl
::
SvxZoomStatusBarControl
(
sal_uInt16
_nSlotId
,
SvxZoomStatusBarControl
::
SvxZoomStatusBarControl
(
sal_uInt16
_nSlotId
,
sal_uInt16
_nId
,
sal_uInt16
_nId
,
StatusBar
&
rStb
)
:
StatusBar
&
rStb
)
:
...
@@ -108,8 +108,6 @@ SvxZoomStatusBarControl::SvxZoomStatusBarControl( sal_uInt16 _nSlotId,
...
@@ -108,8 +108,6 @@ SvxZoomStatusBarControl::SvxZoomStatusBarControl( sal_uInt16 _nSlotId,
{
{
}
}
void
SvxZoomStatusBarControl
::
StateChanged
(
sal_uInt16
,
SfxItemState
eState
,
void
SvxZoomStatusBarControl
::
StateChanged
(
sal_uInt16
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
const
SfxPoolItem
*
pState
)
{
{
...
@@ -138,16 +136,12 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState,
...
@@ -138,16 +136,12 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState,
}
}
}
}
void
SvxZoomStatusBarControl
::
Paint
(
const
UserDrawEvent
&
)
void
SvxZoomStatusBarControl
::
Paint
(
const
UserDrawEvent
&
)
{
{
OUString
aStr
(
unicode
::
formatPercent
(
nZoom
,
Application
::
GetSettings
().
GetUILanguageTag
()));
OUString
aStr
(
unicode
::
formatPercent
(
nZoom
,
Application
::
GetSettings
().
GetUILanguageTag
()));
GetStatusBar
().
SetItemText
(
GetId
(),
aStr
);
GetStatusBar
().
SetItemText
(
GetId
(),
aStr
);
}
}
void
SvxZoomStatusBarControl
::
Command
(
const
CommandEvent
&
rCEvt
)
void
SvxZoomStatusBarControl
::
Command
(
const
CommandEvent
&
rCEvt
)
{
{
if
(
COMMAND_CONTEXTMENU
&
rCEvt
.
GetCommand
()
&&
0
!=
nValueSet
)
if
(
COMMAND_CONTEXTMENU
&
rCEvt
.
GetCommand
()
&&
0
!=
nValueSet
)
...
@@ -184,5 +178,41 @@ void SvxZoomStatusBarControl::Command( const CommandEvent& rCEvt )
...
@@ -184,5 +178,41 @@ void SvxZoomStatusBarControl::Command( const CommandEvent& rCEvt )
SfxStatusBarControl
::
Command
(
rCEvt
);
SfxStatusBarControl
::
Command
(
rCEvt
);
}
}
SFX_IMPL_STATUSBAR_CONTROL
(
SvxZoomPageStatusBarControl
,
SfxVoidItem
);
SvxZoomPageStatusBarControl
::
SvxZoomPageStatusBarControl
(
sal_uInt16
_nSlotId
,
sal_uInt16
_nId
,
StatusBar
&
rStb
)
:
SfxStatusBarControl
(
_nSlotId
,
_nId
,
rStb
)
,
maImage
(
SVX_RES
(
RID_SVXBMP_ZOOM_PAGE
))
{
GetStatusBar
().
SetQuickHelpText
(
GetId
(),
SVX_RESSTR
(
RID_SVXSTR_FIT_SLIDE
));
}
extern
Point
centerImage
(
const
Rectangle
&
rBoundingRect
,
const
Image
&
rImg
);
void
SvxZoomPageStatusBarControl
::
Paint
(
const
UserDrawEvent
&
rUsrEvt
)
{
OutputDevice
*
pDev
=
rUsrEvt
.
GetDevice
();
Rectangle
aRect
=
rUsrEvt
.
GetRect
();
Point
aPt
=
centerImage
(
aRect
,
maImage
);
pDev
->
DrawImage
(
aPt
,
maImage
);
}
bool
SvxZoomPageStatusBarControl
::
MouseButtonDown
(
const
MouseEvent
&
)
{
SvxZoomItem
aZoom
(
SVX_ZOOM_WHOLEPAGE
,
0
,
GetId
()
);
::
com
::
sun
::
star
::
uno
::
Any
a
;
INetURLObject
aObj
(
m_aCommandURL
);
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
aArgs
(
1
);
aArgs
[
0
].
Name
=
aObj
.
GetURLPath
();
aZoom
.
QueryValue
(
a
);
aArgs
[
0
].
Value
=
a
;
execute
(
aArgs
);
return
true
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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