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
0b8777dc
Kaydet (Commit)
0b8777dc
authored
Mar 16, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
integrate ScConditionalFormat UNO object correctly
Change-Id: I8da8d954dc7bcdf0a8c2f78eeb6b2403eb75d9e3
üst
11b0bbcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
14 deletions
+90
-14
condformatuno.hxx
sc/source/ui/inc/condformatuno.hxx
+30
-6
condformatuno.cxx
sc/source/ui/unoobj/condformatuno.cxx
+60
-8
No files found.
sc/source/ui/inc/condformatuno.hxx
Dosyayı görüntüle @
0b8777dc
...
@@ -21,8 +21,10 @@
...
@@ -21,8 +21,10 @@
#include <com/sun/star/sheet/XIconSetEntry.hpp>
#include <com/sun/star/sheet/XIconSetEntry.hpp>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
#include <svl/itemprop.hxx>
#include <svl/itemprop.hxx>
#include <svl/lstner.hxx>
#include <svl/lstner.hxx>
#include <rtl/ref.hxx>
class
ScDocument
;
class
ScDocument
;
class
ScDocShell
;
class
ScDocShell
;
...
@@ -75,18 +77,18 @@ public:
...
@@ -75,18 +77,18 @@ public:
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
std
::
exception
)
SAL_OVERRIDE
;
private
:
ScConditionalFormatList
*
getCoreObject
();
ScConditionalFormatList
*
getCoreObject
();
private
:
SCTAB
mnTab
;
SCTAB
mnTab
;
ScDocShell
*
mpDocShell
;
ScDocShell
*
mpDocShell
;
};
};
class
ScCondFormatObj
:
public
com
::
sun
::
star
::
sheet
::
XConditionalFormat
,
class
ScCondFormatObj
:
public
cppu
::
WeakImplHelper2
<
com
::
sun
::
star
::
sheet
::
XConditionalFormat
,
public
com
::
sun
::
star
::
beans
::
XPropertySet
,
com
::
sun
::
star
::
beans
::
XPropertySet
>
public
cppu
::
OWeakObject
{
{
public
:
public
:
ScCondFormatObj
(
ScDoc
ument
*
pDoc
,
ScConditionalFormat
*
pList
);
ScCondFormatObj
(
ScDoc
Shell
*
pDocShell
,
rtl
::
Reference
<
ScCondFormatsObj
>
xCondFormats
,
sal_Int32
nKey
);
virtual
~
ScCondFormatObj
();
virtual
~
ScCondFormatObj
();
...
@@ -101,6 +103,24 @@ public:
...
@@ -101,6 +103,24 @@ public:
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
std
::
exception
)
SAL_OVERRIDE
;
// XIndexAccess
virtual
uno
::
Type
SAL_CALL
getElementType
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Bool
SAL_CALL
hasElements
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
getCount
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
uno
::
Any
SAL_CALL
getByIndex
(
sal_Int32
nIndex
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// XPropertySet
// XPropertySet
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
SAL_CALL
getPropertySetInfo
()
SAL_CALL
getPropertySetInfo
()
...
@@ -142,9 +162,13 @@ public:
...
@@ -142,9 +162,13 @@ public:
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
ScConditionalFormat
*
getCoreObject
();
private
:
private
:
ScConditionalFormat
*
mpFormat
;
rtl
::
Reference
<
ScCondFormatsObj
>
mxCondFormatList
;
ScDocShell
*
mpDocShell
;
SfxItemPropertySet
maPropSet
;
SfxItemPropertySet
maPropSet
;
sal_Int32
mnKey
;
};
};
class
ScConditionEntryObj
:
public
com
::
sun
::
star
::
beans
::
XPropertySet
,
class
ScConditionEntryObj
:
public
com
::
sun
::
star
::
beans
::
XPropertySet
,
...
...
sc/source/ui/unoobj/condformatuno.cxx
Dosyayı görüntüle @
0b8777dc
...
@@ -235,7 +235,17 @@ void ScCondFormatsObj::removeByID(const sal_Int32 nID)
...
@@ -235,7 +235,17 @@ void ScCondFormatsObj::removeByID(const sal_Int32 nID)
uno
::
Sequence
<
uno
::
Reference
<
sheet
::
XConditionalFormat
>
>
ScCondFormatsObj
::
getConditionalFormats
()
uno
::
Sequence
<
uno
::
Reference
<
sheet
::
XConditionalFormat
>
>
ScCondFormatsObj
::
getConditionalFormats
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
return
uno
::
Sequence
<
uno
::
Reference
<
sheet
::
XConditionalFormat
>
>
();
SolarMutexGuard
aGuard
;
ScConditionalFormatList
*
pFormatList
=
getCoreObject
();;
size_t
n
=
pFormatList
->
size
();
uno
::
Sequence
<
uno
::
Reference
<
sheet
::
XConditionalFormat
>
>
aCondFormats
(
n
);
sal_Int32
i
=
0
;
for
(
ScConditionalFormatList
::
const_iterator
itr
=
pFormatList
->
begin
();
itr
!=
pFormatList
->
end
();
++
itr
,
++
i
)
{
uno
::
Reference
<
sheet
::
XConditionalFormat
>
xCondFormat
(
new
ScCondFormatObj
(
mpDocShell
,
this
,
itr
->
GetKey
()));
aCondFormats
[
i
]
=
xCondFormat
;
}
return
aCondFormats
;
}
}
sal_Int32
ScCondFormatsObj
::
getLength
()
sal_Int32
ScCondFormatsObj
::
getLength
()
...
@@ -258,9 +268,12 @@ ScConditionalFormatList* ScCondFormatsObj::getCoreObject()
...
@@ -258,9 +268,12 @@ ScConditionalFormatList* ScCondFormatsObj::getCoreObject()
return
pList
;
return
pList
;
}
}
ScCondFormatObj
::
ScCondFormatObj
(
ScDocument
*
/*pDoc*/
,
ScConditionalFormat
*
pFormat
)
:
ScCondFormatObj
::
ScCondFormatObj
(
ScDocShell
*
pDocShell
,
rtl
::
Reference
<
ScCondFormatsObj
>
xCondFormats
,
mpFormat
(
pFormat
),
sal_Int32
nKey
)
:
maPropSet
(
getCondFormatPropset
())
mxCondFormatList
(
xCondFormats
),
mpDocShell
(
pDocShell
),
maPropSet
(
getCondFormatPropset
()),
mnKey
(
nKey
)
{
{
}
}
...
@@ -268,6 +281,16 @@ ScCondFormatObj::~ScCondFormatObj()
...
@@ -268,6 +281,16 @@ ScCondFormatObj::~ScCondFormatObj()
{
{
}
}
ScConditionalFormat
*
ScCondFormatObj
::
getCoreObject
()
{
ScConditionalFormatList
*
pList
=
mxCondFormatList
->
getCoreObject
();
ScConditionalFormat
*
pFormat
=
pList
->
GetFormat
(
mnKey
);
if
(
!
pFormat
)
throw
uno
::
RuntimeException
();
return
pFormat
;
}
void
ScCondFormatObj
::
addEntry
(
const
uno
::
Reference
<
sheet
::
XConditionEntry
>&
/*xEntry*/
)
void
ScCondFormatObj
::
addEntry
(
const
uno
::
Reference
<
sheet
::
XConditionEntry
>&
/*xEntry*/
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
...
@@ -278,6 +301,36 @@ void ScCondFormatObj::removeByIndex(const sal_Int32 /*nIndex*/)
...
@@ -278,6 +301,36 @@ void ScCondFormatObj::removeByIndex(const sal_Int32 /*nIndex*/)
{
{
}
}
uno
::
Type
ScCondFormatObj
::
getElementType
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
cppu
::
UnoType
<
sheet
::
XConditionEntry
>::
get
();
}
sal_Bool
ScCondFormatObj
::
hasElements
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
ScConditionalFormat
*
pFormat
=
getCoreObject
();
return
!
pFormat
->
IsEmpty
();
}
sal_Int32
ScCondFormatObj
::
getCount
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
ScConditionalFormat
*
pFormat
=
getCoreObject
();
return
pFormat
->
size
();
}
uno
::
Any
ScCondFormatObj
::
getByIndex
(
sal_Int32
/*nIndex*/
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Any
aAny
;
return
aAny
;
}
uno
::
Reference
<
beans
::
XPropertySetInfo
>
SAL_CALL
ScCondFormatObj
::
getPropertySetInfo
()
uno
::
Reference
<
beans
::
XPropertySetInfo
>
SAL_CALL
ScCondFormatObj
::
getPropertySetInfo
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
...
@@ -327,14 +380,13 @@ uno::Any SAL_CALL ScCondFormatObj::getPropertyValue( const OUString& aPropertyNa
...
@@ -327,14 +380,13 @@ uno::Any SAL_CALL ScCondFormatObj::getPropertyValue( const OUString& aPropertyNa
switch
(
pEntry
->
nWID
)
switch
(
pEntry
->
nWID
)
{
{
case
ID
:
case
ID
:
aAny
<<=
sal_Int32
(
mpFormat
->
GetKey
());
aAny
<<=
sal_Int32
(
getCoreObject
()
->
GetKey
());
break
;
break
;
case
CondFormat_Range
:
case
CondFormat_Range
:
{
{
const
ScRangeList
&
rRange
=
mpFormat
->
GetRange
();
const
ScRangeList
&
rRange
=
getCoreObject
()
->
GetRange
();
ScDocShell
*
pShell
=
static_cast
<
ScDocShell
*>
(
mpFormat
->
GetDocument
()
->
GetDocumentShell
());
uno
::
Reference
<
sheet
::
XSheetCellRanges
>
xRange
;
uno
::
Reference
<
sheet
::
XSheetCellRanges
>
xRange
;
xRange
.
set
(
new
ScCellRangesObj
(
p
Shell
,
rRange
));
xRange
.
set
(
new
ScCellRangesObj
(
mpDoc
Shell
,
rRange
));
}
}
break
;
break
;
default
:
default
:
...
...
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