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
9ffb86c7
Kaydet (Commit)
9ffb86c7
authored
Mar 27, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, convert drawing::ColorTable to new style
The service already existed, it just needed an IDL file.
üst
1dec1f2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
11 deletions
+47
-11
UnoApi_offapi.mk
offapi/UnoApi_offapi.mk
+1
-0
ColorTable.idl
offapi/com/sun/star/drawing/ColorTable.idl
+38
-0
lookupcolorname.cxx
svx/source/accessibility/lookupcolorname.cxx
+8
-11
No files found.
offapi/UnoApi_offapi.mk
Dosyayı görüntüle @
9ffb86c7
...
@@ -116,6 +116,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/document,\
...
@@ -116,6 +116,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/document,\
XMLOasisBasicImporter \
XMLOasisBasicImporter \
))
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/drawing,\
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/drawing,\
ColorTable \
GraphicExportFilter \
GraphicExportFilter \
ModuleDispatcher \
ModuleDispatcher \
ShapeCollection \
ShapeCollection \
...
...
offapi/com/sun/star/drawing/ColorTable.idl
0 → 100644
Dosyayı görüntüle @
9ffb86c7
/*
-*-
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
__com_sun_star_drawing_ColorTable_idl__
#
define
__com_sun_star_drawing_ColorTable_idl__
#
include
<
com
/
sun
/
star
/
container
/
XNameContainer
.
idl>
module
com
{
module
sun
{
module
star
{
module
drawing
{
/**
@
since
LibreOffice
4.1
*/
published
service
ColorTable
:
com
::
sun
::
star
::
container
::
XNameContainer
;
}
; }; }; };
#
endif
/*
vim
:
set
shiftwidth
=
4
softtabstop
=
4
expandtab
:
*/
svx/source/accessibility/lookupcolorname.cxx
Dosyayı görüntüle @
9ffb86c7
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "boost/unordered_map.hpp"
#include "boost/unordered_map.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
#include "com/sun/star/container/XNameContainer.hpp"
#include "com/sun/star/container/XNameContainer.hpp"
#include "com/sun/star/drawing/ColorTable.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Reference.hxx"
...
@@ -54,19 +55,15 @@ ColorNameMap::ColorNameMap() {
...
@@ -54,19 +55,15 @@ ColorNameMap::ColorNameMap() {
try
try
{
{
// Create color table in which to look up the given color.
// Create color table in which to look up the given color.
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
xColorTable
(
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
xColorTable
=
comphelper
::
getProcessServiceFactory
()
->
createInstance
(
"com.sun.star.drawing.ColorTable"
),
css
::
drawing
::
ColorTable
::
create
(
comphelper
::
getProcessComponentContext
()
);
css
::
uno
::
UNO_QUERY
);
// Get list of color names in order to iterate over the color table.
// Get list of color names in order to iterate over the color table.
xNA
=
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
(
xColorTable
,
css
::
uno
::
UNO_QUERY
);
if
(
xNA
.
is
())
// Lock the solar mutex here as workarround for missing lock in
{
// called function.
// Lock the solar mutex here as workarround for missing lock in
SolarMutexGuard
aGuard
;
// called function.
aNames
=
xNA
->
getElementNames
();
SolarMutexGuard
aGuard
;
aNames
=
xNA
->
getElementNames
();
}
}
}
catch
(
css
::
uno
::
RuntimeException
const
&
)
catch
(
css
::
uno
::
RuntimeException
const
&
)
{
{
...
...
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