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
edc46341
Kaydet (Commit)
edc46341
authored
Şub 25, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sfx2 classification: add categories controller for the toolbar
Change-Id: Ib6a5c9577d442034d1114b84c1ad2c20372e3c7a
üst
cf33f6b4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
136 additions
and
1 deletion
+136
-1
Controller.xcu
...cfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+11
-0
Library_sfx.mk
sfx2/Library_sfx.mk
+1
-0
classificationcontroller.cxx
sfx2/source/view/classificationcontroller.cxx
+119
-0
sfx.component
sfx2/util/sfx.component
+4
-0
classificationbar.xml
sw/uiconfig/swriter/toolbar/classificationbar.xml
+1
-1
No files found.
officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
Dosyayı görüntüle @
edc46341
...
@@ -985,6 +985,17 @@
...
@@ -985,6 +985,17 @@
<value>
com.sun.star.svx.FindAllToolboxController
</value>
<value>
com.sun.star.svx.FindAllToolboxController
</value>
</prop>
</prop>
</node>
</node>
<node
oor:name=
"com.sun.star.comp.sfx2.ClassificationCategoriesController"
oor:op=
"replace"
>
<prop
oor:name=
"Command"
>
<value>
.uno:ClassificationApply
</value>
</prop>
<prop
oor:name=
"Module"
>
<value/>
</prop>
<prop
oor:name=
"Controller"
>
<value>
com.sun.star.comp.sfx2.ClassificationCategoriesController
</value>
</prop>
</node>
<node
oor:name=
"c4"
oor:op=
"replace"
install:module=
"reportbuilder"
>
<node
oor:name=
"c4"
oor:op=
"replace"
install:module=
"reportbuilder"
>
<prop
oor:name=
"Command"
>
<prop
oor:name=
"Command"
>
<value>
.uno:FontColor
</value>
<value>
.uno:FontColor
</value>
...
...
sfx2/Library_sfx.mk
Dosyayı görüntüle @
edc46341
...
@@ -290,6 +290,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
...
@@ -290,6 +290,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/styles/StyleManager \
sfx2/source/styles/StyleManager \
sfx2/source/toolbox/imgmgr \
sfx2/source/toolbox/imgmgr \
sfx2/source/toolbox/tbxitem \
sfx2/source/toolbox/tbxitem \
sfx2/source/view/classificationcontroller \
sfx2/source/view/classificationhelper \
sfx2/source/view/classificationhelper \
sfx2/source/view/frame \
sfx2/source/view/frame \
sfx2/source/view/frame2 \
sfx2/source/view/frame2 \
...
...
sfx2/source/view/classificationcontroller.cxx
0 → 100644
Dosyayı görüntüle @
edc46341
/* -*- 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/.
*/
#include <cppuhelper/implbase.hxx>
#include <svtools/toolboxcontroller.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <vcl/vclptr.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/toolbox.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/classificationhelper.hxx>
using
namespace
com
::
sun
::
star
;
namespace
sfx2
{
using
ClassificationCategoriesControllerBase
=
cppu
::
ImplInheritanceHelper
<
svt
::
ToolboxController
,
lang
::
XServiceInfo
>
;
/// Controller for .uno:ClassificationApply.
class
ClassificationCategoriesController
:
public
ClassificationCategoriesControllerBase
{
VclPtr
<
ListBox
>
m_pCategories
;
public
:
ClassificationCategoriesController
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
rContext
);
virtual
~
ClassificationCategoriesController
();
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
;
virtual
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
rServiceName
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
;
virtual
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
;
// XComponent
virtual
void
SAL_CALL
dispose
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
;
// XToolbarController
virtual
uno
::
Reference
<
awt
::
XWindow
>
SAL_CALL
createItemWindow
(
const
uno
::
Reference
<
awt
::
XWindow
>&
rParent
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
;
// XStatusListener
virtual
void
SAL_CALL
statusChanged
(
const
frame
::
FeatureStateEvent
&
rEvent
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
;
};
ClassificationCategoriesController
::
ClassificationCategoriesController
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
rContext
)
:
ClassificationCategoriesControllerBase
(
rContext
,
uno
::
Reference
<
frame
::
XFrame
>
(),
OUString
(
".uno:ClassificationApply"
))
,
m_pCategories
(
nullptr
)
{
}
ClassificationCategoriesController
::~
ClassificationCategoriesController
()
{
}
OUString
ClassificationCategoriesController
::
getImplementationName
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
OUString
(
"com.sun.star.comp.sfx2.ClassificationCategoriesController"
);
}
sal_Bool
ClassificationCategoriesController
::
supportsService
(
const
OUString
&
rServiceName
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
cppu
::
supportsService
(
this
,
rServiceName
);
}
uno
::
Sequence
<
OUString
>
ClassificationCategoriesController
::
getSupportedServiceNames
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Sequence
<
OUString
>
aServices
{
"com.sun.star.frame.ToolbarController"
};
return
aServices
;
}
void
ClassificationCategoriesController
::
dispose
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aSolarMutexGuard
;
svt
::
ToolboxController
::
dispose
();
m_pCategories
.
disposeAndClear
();
}
uno
::
Reference
<
awt
::
XWindow
>
ClassificationCategoriesController
::
createItemWindow
(
const
uno
::
Reference
<
awt
::
XWindow
>&
rParent
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
vcl
::
Window
*
pParent
=
VCLUnoHelper
::
GetWindow
(
rParent
);
ToolBox
*
pToolbar
=
dynamic_cast
<
ToolBox
*>
(
pParent
);
if
(
pToolbar
)
{
m_pCategories
=
VclPtr
<
ListBox
>::
Create
(
pToolbar
,
WB_CLIPCHILDREN
|
WB_LEFT
|
WB_VCENTER
|
WB_3DLOOK
|
WB_DROPDOWN
|
WB_SIMPLEMODE
);
m_pCategories
->
SetSizePixel
(
m_pCategories
->
GetOptimalSize
());
}
return
uno
::
Reference
<
awt
::
XWindow
>
(
VCLUnoHelper
::
GetInterface
(
m_pCategories
));
}
void
ClassificationCategoriesController
::
statusChanged
(
const
frame
::
FeatureStateEvent
&
/*rEvent*/
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
;
}
}
// namespace sfx2
extern
"C"
SAL_DLLPUBLIC_EXPORT
uno
::
XInterface
*
SAL_CALL
com_sun_star_sfx2_ClassificationCategoriesController_get_implementation
(
uno
::
XComponentContext
*
pContext
,
const
uno
::
Sequence
<
uno
::
Any
>&
)
{
return
cppu
::
acquire
(
new
sfx2
::
ClassificationCategoriesController
(
pContext
));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/util/sfx.component
Dosyayı görüntüle @
edc46341
...
@@ -82,4 +82,8 @@
...
@@ -82,4 +82,8 @@
constructor=
"com_sun_star_comp_sfx2_SfxMacroLoader_get_implementation"
>
constructor=
"com_sun_star_comp_sfx2_SfxMacroLoader_get_implementation"
>
<service
name=
"com.sun.star.frame.ProtocolHandler"
/>
<service
name=
"com.sun.star.frame.ProtocolHandler"
/>
</implementation>
</implementation>
<implementation
name=
"com.sun.star.comp.sfx2.ClassificationCategoriesController"
constructor=
"com_sun_star_sfx2_ClassificationCategoriesController_get_implementation"
>
<service
name=
"com.sun.star.frame.ToolbarController"
/>
</implementation>
</component>
</component>
sw/uiconfig/swriter/toolbar/classificationbar.xml
Dosyayı görüntüle @
edc46341
...
@@ -8,5 +8,5 @@
...
@@ -8,5 +8,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
-->
<toolbar:toolbar
xmlns:toolbar=
"http://openoffice.org/2001/toolbar"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
toolbar:id=
"toolbar"
>
<toolbar:toolbar
xmlns:toolbar=
"http://openoffice.org/2001/toolbar"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
toolbar:id=
"toolbar"
>
<toolbar:toolbaritem
xlink:href=
".uno:
FontHeight
"
/>
<toolbar:toolbaritem
xlink:href=
".uno:
ClassificationApply
"
/>
</toolbar:toolbar>
</toolbar:toolbar>
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