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
7c3ba6b5
Kaydet (Commit)
7c3ba6b5
authored
Şub 01, 2019
tarafından
Ashod Nakashian
Kaydeden (comit)
Jan Holesovsky
Nis 30, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sfx2: avoid unnecessary dynamic_cast
And reformat. Change-Id: If8a3dd4d16dfd51f8006d2d5d47951db30390fd8
üst
e4f212db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
35 deletions
+33
-35
SidebarChildWindow.cxx
sfx2/source/sidebar/SidebarChildWindow.cxx
+33
-35
No files found.
sfx2/source/sidebar/SidebarChildWindow.cxx
Dosyayı görüntüle @
7c3ba6b5
...
...
@@ -30,50 +30,48 @@ namespace sfx2 { namespace sidebar {
SFX_IMPL_DOCKINGWINDOW_WITHID
(
SidebarChildWindow
,
SID_SIDEBAR
);
SidebarChildWindow
::
SidebarChildWindow
(
vcl
::
Window
*
pParentWindow
,
sal_uInt16
nId
,
SfxBindings
*
pBindings
,
SfxChildWinInfo
*
pInfo
)
:
SfxChildWindow
(
pParentWindow
,
nId
)
,
mbSidebarVisibleInLOK
(
pInfo
&&
pInfo
->
aModule
==
"simpress"
)
SidebarChildWindow
::
SidebarChildWindow
(
vcl
::
Window
*
pParentWindow
,
sal_uInt16
nId
,
SfxBindings
*
pBindings
,
SfxChildWinInfo
*
pInfo
)
:
SfxChildWindow
(
pParentWindow
,
nId
)
,
mbSidebarVisibleInLOK
(
pInfo
&&
pInfo
->
aModule
==
"simpress"
)
{
S
etWindow
(
VclPtr
<
SidebarDockingWindow
>::
Create
(
pBindings
,
*
this
,
pParentWindow
,
WB_STDDOCKWIN
|
WB_OWNERDRAWDECORATION
|
WB_CLIPCHILDREN
|
WB_SIZEABLE
|
WB_3DLOOK
|
WB_ROLLABLE
)
);
S
fxDockingWindow
*
pDockWin
=
VclPtr
<
SidebarDockingWindow
>::
Create
(
pBindings
,
*
this
,
pParentWindow
,
WB_STDDOCKWIN
|
WB_OWNERDRAWDECORATION
|
WB_CLIPCHILDREN
|
WB_SIZEABLE
|
WB_3DLOOK
|
WB_ROLLABLE
);
SetWindow
(
pDockWin
);
SetAlignment
(
SfxChildAlignment
::
RIGHT
);
GetWindow
()
->
SetHelpId
(
HID_SIDEBAR_WINDOW
);
GetWindow
()
->
SetOutputSizePixel
(
Size
(
GetDefaultWidth
(
GetWindow
()
),
450
));
pDockWin
->
SetHelpId
(
HID_SIDEBAR_WINDOW
);
pDockWin
->
SetOutputSizePixel
(
Size
(
GetDefaultWidth
(
pDockWin
),
450
));
SfxDockingWindow
*
pDockingParent
=
dynamic_cast
<
SfxDockingWindow
*>
(
GetWindow
());
if
(
pDockingParent
!=
nullptr
)
if
(
pInfo
&&
pInfo
->
aExtraString
.
isEmpty
()
&&
pInfo
->
aModule
!=
"sdraw"
&&
pInfo
->
aModule
!=
"simpress"
)
{
if
(
pInfo
&&
pInfo
->
aExtraString
.
isEmpty
()
&&
pInfo
->
aModule
!=
"sdraw"
&&
pInfo
->
aModule
!=
"simpress"
)
{
// When this is the first start (never had the sidebar open yet),
// default to non-expanded sidebars in Writer and Calc.
//
// HACK: unfortunately I haven't found a clean solution to do
// this, so do it this way:
//
pDockingParent
->
SetSizePixel
(
Size
(
TabBar
::
GetDefaultWidth
()
*
GetWindow
()
->
GetDPIScaleFactor
(),
pDockingParent
->
GetSizePixel
().
Height
()));
}
pDockingParent
->
Initialize
(
pInfo
);
// When this is the first start (never had the sidebar open yet),
// default to non-expanded sidebars in Writer and Calc.
//
// HACK: unfortunately I haven't found a clean solution to do
// this, so do it this way:
//
pDockWin
->
SetSizePixel
(
Size
(
TabBar
::
GetDefaultWidth
()
*
GetWindow
()
->
GetDPIScaleFactor
(),
pDockWin
->
GetSizePixel
().
Height
()));
}
pDockWin
->
Initialize
(
pInfo
);
if
(
comphelper
::
LibreOfficeKit
::
isActive
())
{
// Undock sidebar in LOK to allow for resizing freely
// (i.e. when the client window is resized) and collapse
// it so the client can open it on demand.
pDockingParent
->
SetFloatingSize
(
Size
(
TabBar
::
GetDefaultWidth
()
*
GetWindow
()
->
GetDPIScaleFactor
(),
pDockingParent
->
GetSizePixel
().
Height
()));
pDockingParent
->
SetFloatingMode
(
true
);
}
if
(
comphelper
::
LibreOfficeKit
::
isActive
())
{
// Undock sidebar in LOK to allow for resizing freely
// (i.e. when the client window is resized) and collapse
// it so the client can open it on demand.
pDockWin
->
SetFloatingSize
(
Size
(
TabBar
::
GetDefaultWidth
()
*
GetWindow
()
->
GetDPIScaleFactor
(),
pDockWin
->
GetSizePixel
().
Height
()));
pDockWin
->
SetFloatingMode
(
true
);
}
SetHideNotDelete
(
true
);
GetWindow
()
->
Show
();
pDockWin
->
Show
();
}
sal_Int32
SidebarChildWindow
::
GetDefaultWidth
(
vcl
::
Window
const
*
pWindow
)
...
...
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