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
7275be15
Kaydet (Commit)
7275be15
authored
Eyl 09, 2011
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sb140: #i117291# do not mis-use XTypeProvider.getImplementationId in XUnoTunnel.getSomething
üst
4209a612
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
20 deletions
+19
-20
graphic.cxx
svtools/source/graphic/graphic.cxx
+3
-16
graphic.hxx
svtools/source/graphic/graphic.hxx
+0
-1
graph.hxx
vcl/inc/vcl/graph.hxx
+2
-0
graph.cxx
vcl/source/gdi/graph.cxx
+14
-3
No files found.
svtools/source/graphic/graphic.cxx
Dosyayı görüntüle @
7275be15
...
@@ -114,19 +114,6 @@ void SAL_CALL Graphic::release() throw()
...
@@ -114,19 +114,6 @@ void SAL_CALL Graphic::release() throw()
// ------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
namespace
{
class
theGraphicUnoTunnelId
:
public
rtl
::
Static
<
UnoTunnelIdInit
,
theGraphicUnoTunnelId
>
{};
}
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
Graphic
::
getImplementationId_Static
()
throw
(
uno
::
RuntimeException
)
{
return
theGraphicUnoTunnelId
::
get
().
getSeq
();
}
// ------------------------------------------------------------------------------
::
rtl
::
OUString
Graphic
::
getImplementationName_Static
()
::
rtl
::
OUString
Graphic
::
getImplementationName_Static
()
throw
()
throw
()
{
{
...
@@ -210,7 +197,7 @@ uno::Sequence< uno::Type > SAL_CALL Graphic::getTypes()
...
@@ -210,7 +197,7 @@ uno::Sequence< uno::Type > SAL_CALL Graphic::getTypes()
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
Graphic
::
getImplementationId
()
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
Graphic
::
getImplementationId
()
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
return
getImplementationId_Static
();
return
uno
::
Sequence
<
sal_Int8
>
();
}
}
// ------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
...
@@ -282,14 +269,14 @@ const ::Graphic* Graphic::getImplementation( const uno::Reference< uno::XInterfa
...
@@ -282,14 +269,14 @@ const ::Graphic* Graphic::getImplementation( const uno::Reference< uno::XInterfa
throw
()
throw
()
{
{
uno
::
Reference
<
lang
::
XUnoTunnel
>
xTunnel
(
rxIFace
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
lang
::
XUnoTunnel
>
xTunnel
(
rxIFace
,
uno
::
UNO_QUERY
);
return
(
xTunnel
.
is
()
?
reinterpret_cast
<
::
Graphic
*
>
(
xTunnel
->
getSomething
(
getImplementationId_Static
()
)
)
:
NULL
);
return
(
xTunnel
.
is
()
?
reinterpret_cast
<
::
Graphic
*
>
(
xTunnel
->
getSomething
(
::
Graphic
::
getUnoTunnelId
()
)
)
:
NULL
);
}
}
//----------------------------------------------------------------------
//----------------------------------------------------------------------
sal_Int64
SAL_CALL
Graphic
::
getSomething
(
const
uno
::
Sequence
<
sal_Int8
>&
rId
)
sal_Int64
SAL_CALL
Graphic
::
getSomething
(
const
uno
::
Sequence
<
sal_Int8
>&
rId
)
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
return
(
(
rId
.
getLength
()
==
16
&&
0
==
rtl_compareMemory
(
getImplementation
Id
().
getConstArray
(),
rId
.
getConstArray
(),
16
)
)
?
return
(
(
rId
.
getLength
()
==
16
&&
0
==
rtl_compareMemory
(
::
Graphic
::
getUnoTunnel
Id
().
getConstArray
(),
rId
.
getConstArray
(),
16
)
)
?
reinterpret_cast
<
sal_Int64
>
(
mpGraphic
)
:
reinterpret_cast
<
sal_Int64
>
(
mpGraphic
)
:
0
);
0
);
}
}
...
...
svtools/source/graphic/graphic.hxx
Dosyayı görüntüle @
7275be15
...
@@ -62,7 +62,6 @@ public:
...
@@ -62,7 +62,6 @@ public:
void
init
(
const
::
Graphic
&
rGraphic
)
throw
();
void
init
(
const
::
Graphic
&
rGraphic
)
throw
();
static
const
::
Graphic
*
getImplementation
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>&
rxIFace
)
throw
();
static
const
::
Graphic
*
getImplementation
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>&
rxIFace
)
throw
();
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
getImplementationId_Static
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
static
::
rtl
::
OUString
getImplementationName_Static
()
throw
();
static
::
rtl
::
OUString
getImplementationName_Static
()
throw
();
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
getSupportedServiceNames_Static
()
throw
();
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
getSupportedServiceNames_Static
()
throw
();
...
...
vcl/inc/vcl/graph.hxx
Dosyayı görüntüle @
7275be15
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <vcl/graph.h>
#include <vcl/graph.h>
#include <vcl/gfxlink.hxx>
#include <vcl/gfxlink.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
graphic
{
class
XGraphic
;}
}
}
}
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
graphic
{
class
XGraphic
;}
}
}
}
...
@@ -94,6 +95,7 @@ public:
...
@@ -94,6 +95,7 @@ public:
SAL_DLLPRIVATE
ImpGraphic
*
ImplGetImpGraphic
()
const
{
return
mpImpGraphic
;
}
SAL_DLLPRIVATE
ImpGraphic
*
ImplGetImpGraphic
()
const
{
return
mpImpGraphic
;
}
public
:
public
:
static
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
getUnoTunnelId
();
TYPEINFO
();
TYPEINFO
();
...
...
vcl/source/gdi/graph.cxx
Dosyayı görüntüle @
7275be15
...
@@ -42,6 +42,8 @@
...
@@ -42,6 +42,8 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <cppuhelper/typeprovider.hxx>
#include <rtl/instance.hxx>
// -----------------------
// -----------------------
// - Compression defines -
// - Compression defines -
...
@@ -210,6 +212,16 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
...
@@ -210,6 +212,16 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
// - Graphic -
// - Graphic -
// -----------
// -----------
namespace
{
struct
Id
:
public
rtl
::
Static
<
cppu
::
OImplementationId
,
Id
>
{};
}
uno
::
Sequence
<
sal_Int8
>
Graphic
::
getUnoTunnelId
()
{
return
Id
::
get
().
getImplementationId
();
}
TYPEINIT1_AUTOFACTORY
(
Graphic
,
SvDataCopyStream
);
TYPEINIT1_AUTOFACTORY
(
Graphic
,
SvDataCopyStream
);
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
...
@@ -266,9 +278,8 @@ Graphic::Graphic( const GDIMetaFile& rMtf )
...
@@ -266,9 +278,8 @@ Graphic::Graphic( const GDIMetaFile& rMtf )
Graphic
::
Graphic
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
graphic
::
XGraphic
>&
rxGraphic
)
Graphic
::
Graphic
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
graphic
::
XGraphic
>&
rxGraphic
)
{
{
uno
::
Reference
<
lang
::
XUnoTunnel
>
xTunnel
(
rxGraphic
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
lang
::
XUnoTunnel
>
xTunnel
(
rxGraphic
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
lang
::
XTypeProvider
>
xProv
(
rxGraphic
,
uno
::
UNO_QUERY
);
const
::
Graphic
*
pGraphic
=
(
xTunnel
.
is
()
?
const
::
Graphic
*
pGraphic
=
(
(
xTunnel
.
is
()
&&
xProv
.
is
()
)
?
reinterpret_cast
<
::
Graphic
*
>
(
xTunnel
->
getSomething
(
getUnoTunnelId
()
)
)
:
reinterpret_cast
<
::
Graphic
*
>
(
xTunnel
->
getSomething
(
xProv
->
getImplementationId
()
)
)
:
NULL
);
NULL
);
if
(
pGraphic
)
if
(
pGraphic
)
...
...
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