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
c8b2f752
Kaydet (Commit)
c8b2f752
authored
Kas 11, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sfx2: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I6a0b9d539489b7774c3437871f31fd28e737c901
üst
10629489
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
precompiled_sfx.hxx
sfx2/inc/pch/precompiled_sfx.hxx
+0
-1
virtmenu.hxx
sfx2/source/inc/virtmenu.hxx
+3
-2
virtmenu.cxx
sfx2/source/menu/virtmenu.cxx
+7
-7
No files found.
sfx2/inc/pch/precompiled_sfx.hxx
Dosyayı görüntüle @
c8b2f752
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
#include <boost/noncopyable.hpp>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <memory>
#include <boost/tuple/tuple.hpp>
#include <boost/tuple/tuple.hpp>
#include <cassert>
#include <cassert>
...
...
sfx2/source/inc/virtmenu.hxx
Dosyayı görüntüle @
c8b2f752
...
@@ -19,14 +19,15 @@
...
@@ -19,14 +19,15 @@
#ifndef INCLUDED_SFX2_SOURCE_INC_VIRTMENU_HXX
#ifndef INCLUDED_SFX2_SOURCE_INC_VIRTMENU_HXX
#define INCLUDED_SFX2_SOURCE_INC_VIRTMENU_HXX
#define INCLUDED_SFX2_SOURCE_INC_VIRTMENU_HXX
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#include <memory>
#include <sfx2/mnuitem.hxx>
#include <sfx2/mnuitem.hxx>
class
SfxBindings
;
class
SfxBindings
;
class
SfxMenuImageControl_Impl
;
class
SfxMenuImageControl_Impl
;
typedef
::
boost
::
ptr_vector
<
SfxMenuControl
>
SfxMenuCtrlArr_Impl
;
typedef
std
::
vector
<
std
::
unique_ptr
<
SfxMenuControl
>
>
SfxMenuCtrlArr_Impl
;
class
SAL_DLLPUBLIC_EXPORT
SfxVirtualMenu
class
SAL_DLLPUBLIC_EXPORT
SfxVirtualMenu
{
{
...
...
sfx2/source/menu/virtmenu.cxx
Dosyayı görüntüle @
c8b2f752
...
@@ -366,7 +366,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
...
@@ -366,7 +366,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
pPopup
=
nullptr
;
pPopup
=
nullptr
;
SfxMenuCtrlArr_Impl
&
rCtrlArr
=
GetAppCtrl_Impl
();
SfxMenuCtrlArr_Impl
&
rCtrlArr
=
GetAppCtrl_Impl
();
rCtrlArr
.
push_back
(
pMnuCtrl
);
rCtrlArr
.
push_back
(
std
::
unique_ptr
<
SfxMenuControl
>
(
pMnuCtrl
)
);
(
pItems
+
nPos
)
->
Bind
(
nullptr
,
nSlotId
,
sItemText
,
*
pBindings
);
(
pItems
+
nPos
)
->
Bind
(
nullptr
,
nSlotId
,
sItemText
,
*
pBindings
);
pMnuCtrl
->
Bind
(
this
,
nSlotId
,
sItemText
,
*
pBindings
);
pMnuCtrl
->
Bind
(
this
,
nSlotId
,
sItemText
,
*
pBindings
);
...
@@ -409,7 +409,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
...
@@ -409,7 +409,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
if
(
pMnuCtrl
)
if
(
pMnuCtrl
)
{
{
SfxMenuCtrlArr_Impl
&
rCtrlArr
=
GetAppCtrl_Impl
();
SfxMenuCtrlArr_Impl
&
rCtrlArr
=
GetAppCtrl_Impl
();
rCtrlArr
.
push_back
(
pMnuCtrl
);
rCtrlArr
.
push_back
(
std
::
unique_ptr
<
SfxMenuControl
>
(
pMnuCtrl
)
);
(
pItems
+
nPos
)
->
Bind
(
nullptr
,
nSlotId
,
sItemText
,
*
pBindings
);
(
pItems
+
nPos
)
->
Bind
(
nullptr
,
nSlotId
,
sItemText
,
*
pBindings
);
}
}
}
}
...
@@ -421,7 +421,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
...
@@ -421,7 +421,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
if
(
pMnuCtrl
)
if
(
pMnuCtrl
)
{
{
SfxMenuCtrlArr_Impl
&
rCtrlArr
=
GetAppCtrl_Impl
();
SfxMenuCtrlArr_Impl
&
rCtrlArr
=
GetAppCtrl_Impl
();
rCtrlArr
.
push_back
(
pMnuCtrl
);
rCtrlArr
.
push_back
(
std
::
unique_ptr
<
SfxMenuControl
>
(
pMnuCtrl
)
);
(
pItems
+
nPos
)
->
Bind
(
nullptr
,
nSlotId
,
sItemText
,
*
pBindings
);
(
pItems
+
nPos
)
->
Bind
(
nullptr
,
nSlotId
,
sItemText
,
*
pBindings
);
}
}
else
else
...
@@ -691,10 +691,10 @@ void SfxVirtualMenu::BindControllers()
...
@@ -691,10 +691,10 @@ void SfxVirtualMenu::BindControllers()
for
(
SfxMenuCtrlArr_Impl
::
iterator
i
=
rCtrlArr
.
begin
();
for
(
SfxMenuCtrlArr_Impl
::
iterator
i
=
rCtrlArr
.
begin
();
i
!=
rCtrlArr
.
end
();
++
i
)
i
!=
rCtrlArr
.
end
();
++
i
)
{
{
sal_uInt16
nSlotId
=
i
->
GetId
();
sal_uInt16
nSlotId
=
(
*
i
)
->
GetId
();
if
(
pSVMenu
->
GetItemCommand
(
nSlotId
).
isEmpty
())
if
(
pSVMenu
->
GetItemCommand
(
nSlotId
).
isEmpty
())
{
{
i
->
ReBind
();
(
*
i
)
->
ReBind
();
}
}
}
}
...
@@ -718,10 +718,10 @@ void SfxVirtualMenu::UnbindControllers()
...
@@ -718,10 +718,10 @@ void SfxVirtualMenu::UnbindControllers()
for
(
SfxMenuCtrlArr_Impl
::
iterator
i
=
rCtrlArr
.
begin
();
for
(
SfxMenuCtrlArr_Impl
::
iterator
i
=
rCtrlArr
.
begin
();
i
!=
rCtrlArr
.
end
();
++
i
)
i
!=
rCtrlArr
.
end
();
++
i
)
{
{
if
(
i
->
IsBound
())
if
(
(
*
i
)
->
IsBound
())
{
{
// UnoController is not bound!
// UnoController is not bound!
i
->
UnBind
();
(
*
i
)
->
UnBind
();
}
}
}
}
...
...
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