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
af96a663
Kaydet (Commit)
af96a663
authored
Ock 09, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fwk: Use constructor feature for ObjectMenuController.
Change-Id: I93bec5fcb51987b7db433250f990685f15f0aa29
üst
5d8a2f9f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
87 deletions
+65
-87
objectmenucontroller.hxx
framework/inc/uielement/objectmenucontroller.hxx
+0
-69
registerservices.cxx
framework/source/register/registerservices.cxx
+0
-2
objectmenucontroller.cxx
framework/source/uielement/objectmenucontroller.cxx
+63
-15
fwk.component
framework/util/fwk.component
+2
-1
No files found.
framework/inc/uielement/objectmenucontroller.hxx
deleted
100644 → 0
Dosyayı görüntüle @
5d8a2f9f
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_FRAMEWORK_INC_UIELEMENT_OBJECTMENUCONTROLLER_HXX
#define INCLUDED_FRAMEWORK_INC_UIELEMENT_OBJECTMENUCONTROLLER_HXX
#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace
framework
{
class
ObjectMenuController
:
public
svt
::
PopupMenuControllerBase
{
using
svt
::
PopupMenuControllerBase
::
disposing
;
public
:
ObjectMenuController
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
xContext
);
virtual
~
ObjectMenuController
();
// XServiceInfo
DECLARE_XSERVICEINFO
// XStatusListener
virtual
void
SAL_CALL
statusChanged
(
const
::
com
::
sun
::
star
::
frame
::
FeatureStateEvent
&
Event
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XEventListener
virtual
void
SAL_CALL
disposing
(
const
com
::
sun
::
star
::
lang
::
EventObject
&
Source
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
private
:
void
fillPopupMenu
(
const
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
embed
::
VerbDescriptor
>&
rVerbCommandSeq
,
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
awt
::
XPopupMenu
>&
rPopupMenu
);
virtual
void
impl_select
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XDispatch
>&
_xDispatch
,
const
::
com
::
sun
::
star
::
util
::
URL
&
aURL
);
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XDispatch
>
m_xObjectUpdateDispatch
;
};
}
#endif // INCLUDED_FRAMEWORK_INC_UIELEMENT_OBJECTMENUCONTROLLER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/source/register/registerservices.cxx
Dosyayı görüntüle @
af96a663
...
...
@@ -40,7 +40,6 @@
#include <services/layoutmanager.hxx>
#include <uifactory/uielementfactorymanager.hxx>
#include <uifactory/uicontrollerfactory.hxx>
#include <uielement/objectmenucontroller.hxx>
#include <uielement/controlmenucontroller.hxx>
#include <uielement/uicommanddescription.hxx>
#include <uiconfiguration/moduleuicfgsupplier.hxx>
...
...
@@ -71,7 +70,6 @@ COMPONENTGETFACTORY ( fwk,
IFFACTORY
(
::
framework
::
LayoutManager
)
else
IFFACTORY
(
::
framework
::
UIElementFactoryManager
)
else
IFFACTORY
(
::
framework
::
PopupMenuControllerFactory
)
else
IFFACTORY
(
::
framework
::
ObjectMenuController
)
else
IFFACTORY
(
::
framework
::
ControlMenuController
)
else
IFFACTORY
(
::
framework
::
UICommandDescription
)
else
IFFACTORY
(
::
framework
::
ModuleManager
)
else
...
...
framework/source/uielement/objectmenucontroller.cxx
Dosyayı görüntüle @
af96a663
...
...
@@ -17,10 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <uielement/objectmenucontroller.hxx>
#include <threadhelp/resetableguard.hxx>
#include
"services.h"
#include
<stdtypes.h>
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
...
...
@@ -28,33 +26,73 @@
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/embed/VerbAttributes.hpp>
#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
#include <vcl/i18nhelp.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
//_________________________________________________________________________________________________________________
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
lang
;
using
namespace
com
::
sun
::
star
::
frame
;
using
namespace
com
::
sun
::
star
::
beans
;
using
namespace
com
::
sun
::
star
::
util
;
using
namespace
framework
;
namespace
framework
namespace
{
class
ObjectMenuController
:
public
svt
::
PopupMenuControllerBase
{
using
svt
::
PopupMenuControllerBase
::
disposing
;
public
:
ObjectMenuController
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
);
virtual
~
ObjectMenuController
();
DEFINE_XSERVICEINFO_MULTISERVICE_2
(
ObjectMenuController
,
OWeakObject
,
SERVICENAME_POPUPMENUCONTROLLER
,
IMPLEMENTATIONNAME_OBJECTMENUCONTROLLER
)
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
OUString
(
"com.sun.star.comp.framework.ObjectMenuController"
);
}
DEFINE_INIT_SERVICE
(
ObjectMenuController
,
{}
)
virtual
sal_Bool
SAL_CALL
supportsService
(
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
)
{
return
cppu
::
supportsService
(
this
,
ServiceName
);
}
virtual
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
)
{
css
::
uno
::
Sequence
<
OUString
>
aSeq
(
1
);
aSeq
[
0
]
=
OUString
(
"com.sun.star.frame.PopupMenuController"
);
return
aSeq
;
}
// XStatusListener
virtual
void
SAL_CALL
statusChanged
(
const
css
::
frame
::
FeatureStateEvent
&
Event
)
throw
(
css
::
uno
::
RuntimeException
);
// XEventListener
virtual
void
SAL_CALL
disposing
(
const
css
::
lang
::
EventObject
&
Source
)
throw
(
css
::
uno
::
RuntimeException
);
private
:
void
fillPopupMenu
(
const
css
::
uno
::
Sequence
<
css
::
embed
::
VerbDescriptor
>&
rVerbCommandSeq
,
css
::
uno
::
Reference
<
css
::
awt
::
XPopupMenu
>&
rPopupMenu
);
virtual
void
impl_select
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XDispatch
>&
_xDispatch
,
const
css
::
util
::
URL
&
aURL
);
css
::
uno
::
Reference
<
css
::
frame
::
XDispatch
>
m_xObjectUpdateDispatch
;
};
ObjectMenuController
::
ObjectMenuController
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
xContext
)
:
svt
::
PopupMenuControllerBase
(
xContext
)
...
...
@@ -135,4 +173,14 @@ void ObjectMenuController::impl_select(const Reference< XDispatch >& _xDispatch,
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
com_sun_star_comp_framework_ObjectMenuController_get_implementation
(
css
::
uno
::
XComponentContext
*
context
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
)
{
rtl
::
Reference
<
ObjectMenuController
>
x
(
new
ObjectMenuController
(
context
));
x
->
acquire
();
return
static_cast
<
cppu
::
OWeakObject
*>
(
x
.
get
());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/util/fwk.component
Dosyayı görüntüle @
af96a663
...
...
@@ -75,7 +75,8 @@
<implementation
name=
"com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier"
>
<service
name=
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier"
/>
</implementation>
<implementation
name=
"com.sun.star.comp.framework.ObjectMenuController"
>
<implementation
name=
"com.sun.star.comp.framework.ObjectMenuController"
constructor=
"com_sun_star_comp_framework_ObjectMenuController_get_implementation"
>
<service
name=
"com.sun.star.frame.PopupMenuController"
/>
</implementation>
<implementation
name=
"com.sun.star.comp.framework.PathSettings"
>
...
...
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