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
8cd2334d
Kaydet (Commit)
8cd2334d
authored
Kas 25, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SW_CREATE to scoped enum
Change-Id: I003785715df7e72cbf398902aabb5c3fe900a2d7
üst
678041c4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
24 deletions
+20
-24
unotxdoc.hxx
sw/inc/unotxdoc.hxx
+5
-1
unotxdoc.cxx
sw/source/uibase/uno/unotxdoc.cxx
+15
-23
No files found.
sw/inc/unotxdoc.hxx
Dosyayı görüntüle @
8cd2334d
...
@@ -577,6 +577,10 @@ public:
...
@@ -577,6 +577,10 @@ public:
virtual
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
virtual
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
};
};
enum
class
SwCreateDrawTable
{
Dash
=
1
,
Gradient
,
Hatch
,
Bitmap
,
TransGradient
,
Marker
,
Defaults
};
class
SwXDocumentPropertyHelper
:
public
SvxUnoForbiddenCharsTable
class
SwXDocumentPropertyHelper
:
public
SvxUnoForbiddenCharsTable
{
{
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
xDashTable
;
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
xDashTable
;
...
@@ -591,7 +595,7 @@ class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
...
@@ -591,7 +595,7 @@ class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
public
:
public
:
SwXDocumentPropertyHelper
(
SwDoc
&
rDoc
);
SwXDocumentPropertyHelper
(
SwDoc
&
rDoc
);
virtual
~
SwXDocumentPropertyHelper
()
override
;
virtual
~
SwXDocumentPropertyHelper
()
override
;
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
GetDrawTable
(
short
nWhich
);
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
GetDrawTable
(
SwCreateDrawTable
nWhich
);
void
Invalidate
();
void
Invalidate
();
virtual
void
onChange
()
override
;
virtual
void
onChange
()
override
;
...
...
sw/source/uibase/uno/unotxdoc.cxx
Dosyayı görüntüle @
8cd2334d
...
@@ -167,14 +167,6 @@ using namespace ::com::sun::star::container;
...
@@ -167,14 +167,6 @@ using namespace ::com::sun::star::container;
using
namespace
::
com
::
sun
::
star
::
document
;
using
namespace
::
com
::
sun
::
star
::
document
;
using
::
osl
::
FileBase
;
using
::
osl
::
FileBase
;
#define SW_CREATE_DASH_TABLE 0x01
#define SW_CREATE_GRADIENT_TABLE 0x02
#define SW_CREATE_HATCH_TABLE 0x03
#define SW_CREATE_BITMAP_TABLE 0x04
#define SW_CREATE_TRANSGRADIENT_TABLE 0x05
#define SW_CREATE_MARKER_TABLE 0x06
#define SW_CREATE_DRAW_DEFAULTS 0x07
static
SwPrintUIOptions
*
lcl_GetPrintUIOptions
(
static
SwPrintUIOptions
*
lcl_GetPrintUIOptions
(
SwDocShell
*
pDocShell
,
SwDocShell
*
pDocShell
,
const
SfxViewShell
*
pView
)
const
SfxViewShell
*
pView
)
...
@@ -1629,31 +1621,31 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
...
@@ -1629,31 +1621,31 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
}
}
if
(
rServiceName
==
"com.sun.star.drawing.DashTable"
)
if
(
rServiceName
==
"com.sun.star.drawing.DashTable"
)
{
{
return
GetPropertyHelper
()
->
GetDrawTable
(
S
W_CREATE_DASH_TABLE
);
return
GetPropertyHelper
()
->
GetDrawTable
(
S
wCreateDrawTable
::
Dash
);
}
}
if
(
rServiceName
==
"com.sun.star.drawing.GradientTable"
)
if
(
rServiceName
==
"com.sun.star.drawing.GradientTable"
)
{
{
return
GetPropertyHelper
()
->
GetDrawTable
(
S
W_CREATE_GRADIENT_TABLE
);
return
GetPropertyHelper
()
->
GetDrawTable
(
S
wCreateDrawTable
::
Gradient
);
}
}
if
(
rServiceName
==
"com.sun.star.drawing.HatchTable"
)
if
(
rServiceName
==
"com.sun.star.drawing.HatchTable"
)
{
{
return
GetPropertyHelper
()
->
GetDrawTable
(
S
W_CREATE_HATCH_TABLE
);
return
GetPropertyHelper
()
->
GetDrawTable
(
S
wCreateDrawTable
::
Hatch
);
}
}
if
(
rServiceName
==
"com.sun.star.drawing.BitmapTable"
)
if
(
rServiceName
==
"com.sun.star.drawing.BitmapTable"
)
{
{
return
GetPropertyHelper
()
->
GetDrawTable
(
S
W_CREATE_BITMAP_TABLE
);
return
GetPropertyHelper
()
->
GetDrawTable
(
S
wCreateDrawTable
::
Bitmap
);
}
}
if
(
rServiceName
==
"com.sun.star.drawing.TransparencyGradientTable"
)
if
(
rServiceName
==
"com.sun.star.drawing.TransparencyGradientTable"
)
{
{
return
GetPropertyHelper
()
->
GetDrawTable
(
S
W_CREATE_TRANSGRADIENT_TABLE
);
return
GetPropertyHelper
()
->
GetDrawTable
(
S
wCreateDrawTable
::
TransGradient
);
}
}
if
(
rServiceName
==
"com.sun.star.drawing.MarkerTable"
)
if
(
rServiceName
==
"com.sun.star.drawing.MarkerTable"
)
{
{
return
GetPropertyHelper
()
->
GetDrawTable
(
S
W_CREATE_MARKER_TABLE
);
return
GetPropertyHelper
()
->
GetDrawTable
(
S
wCreateDrawTable
::
Marker
);
}
}
if
(
rServiceName
==
"com.sun.star.drawing.Defaults"
)
if
(
rServiceName
==
"com.sun.star.drawing.Defaults"
)
{
{
return
GetPropertyHelper
()
->
GetDrawTable
(
S
W_CREATE_DRAW_DEFAULTS
);
return
GetPropertyHelper
()
->
GetDrawTable
(
S
wCreateDrawTable
::
Defaults
);
}
}
if
(
rServiceName
==
"com.sun.star.document.Settings"
)
if
(
rServiceName
==
"com.sun.star.document.Settings"
)
{
{
...
@@ -4217,7 +4209,7 @@ SwXDocumentPropertyHelper::~SwXDocumentPropertyHelper()
...
@@ -4217,7 +4209,7 @@ SwXDocumentPropertyHelper::~SwXDocumentPropertyHelper()
{
{
}
}
Reference
<
XInterface
>
SwXDocumentPropertyHelper
::
GetDrawTable
(
short
nWhich
)
Reference
<
XInterface
>
SwXDocumentPropertyHelper
::
GetDrawTable
(
SwCreateDrawTable
nWhich
)
{
{
Reference
<
XInterface
>
xRet
;
Reference
<
XInterface
>
xRet
;
if
(
m_pDoc
)
if
(
m_pDoc
)
...
@@ -4226,37 +4218,37 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich)
...
@@ -4226,37 +4218,37 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich)
{
{
// #i52858#
// #i52858#
// assure that Draw model is created, if it doesn't exist.
// assure that Draw model is created, if it doesn't exist.
case
S
W_CREATE_DASH_TABLE
:
case
S
wCreateDrawTable
:
:
Dash
:
if
(
!
xDashTable
.
is
())
if
(
!
xDashTable
.
is
())
xDashTable
=
SvxUnoDashTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xDashTable
=
SvxUnoDashTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xRet
=
xDashTable
;
xRet
=
xDashTable
;
break
;
break
;
case
S
W_CREATE_GRADIENT_TABLE
:
case
S
wCreateDrawTable
:
:
Gradient
:
if
(
!
xGradientTable
.
is
())
if
(
!
xGradientTable
.
is
())
xGradientTable
=
SvxUnoGradientTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xGradientTable
=
SvxUnoGradientTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xRet
=
xGradientTable
;
xRet
=
xGradientTable
;
break
;
break
;
case
S
W_CREATE_HATCH_TABLE
:
case
S
wCreateDrawTable
:
:
Hatch
:
if
(
!
xHatchTable
.
is
())
if
(
!
xHatchTable
.
is
())
xHatchTable
=
SvxUnoHatchTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xHatchTable
=
SvxUnoHatchTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xRet
=
xHatchTable
;
xRet
=
xHatchTable
;
break
;
break
;
case
S
W_CREATE_BITMAP_TABLE
:
case
S
wCreateDrawTable
:
:
Bitmap
:
if
(
!
xBitmapTable
.
is
())
if
(
!
xBitmapTable
.
is
())
xBitmapTable
=
SvxUnoBitmapTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xBitmapTable
=
SvxUnoBitmapTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xRet
=
xBitmapTable
;
xRet
=
xBitmapTable
;
break
;
break
;
case
S
W_CREATE_TRANSGRADIENT_TABLE
:
case
S
wCreateDrawTable
:
:
TransGradient
:
if
(
!
xTransGradientTable
.
is
())
if
(
!
xTransGradientTable
.
is
())
xTransGradientTable
=
SvxUnoTransGradientTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xTransGradientTable
=
SvxUnoTransGradientTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xRet
=
xTransGradientTable
;
xRet
=
xTransGradientTable
;
break
;
break
;
case
S
W_CREATE_MARKER_TABLE
:
case
S
wCreateDrawTable
:
:
Marker
:
if
(
!
xMarkerTable
.
is
())
if
(
!
xMarkerTable
.
is
())
xMarkerTable
=
SvxUnoMarkerTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xMarkerTable
=
SvxUnoMarkerTable_createInstance
(
m_pDoc
->
getIDocumentDrawModelAccess
().
GetOrCreateDrawModel
()
);
xRet
=
xMarkerTable
;
xRet
=
xMarkerTable
;
break
;
break
;
case
S
W_CREATE_DRAW_DEFAULTS
:
case
S
wCreateDrawTable
:
:
Defaults
:
if
(
!
xDrawDefaults
.
is
())
if
(
!
xDrawDefaults
.
is
())
xDrawDefaults
=
static_cast
<
cppu
::
OWeakObject
*>
(
new
SwSvxUnoDrawPool
(
m_pDoc
));
xDrawDefaults
=
static_cast
<
cppu
::
OWeakObject
*>
(
new
SwSvxUnoDrawPool
(
m_pDoc
));
xRet
=
xDrawDefaults
;
xRet
=
xDrawDefaults
;
...
...
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