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
c29cc3f4
Kaydet (Commit)
c29cc3f4
authored
Nis 21, 2011
tarafından
Markus Mohrhard
Kaydeden (comit)
Kohei Yoshida
Nis 26, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make VbaWorksheet Autofilter work with sheet local DBData
üst
3965636e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
30 deletions
+31
-30
document.hxx
sc/inc/document.hxx
+2
-2
vbaworksheet.cxx
sc/source/ui/vba/vbaworksheet.cxx
+29
-26
vbaworksheet.hxx
sc/source/ui/vba/vbaworksheet.hxx
+0
-2
No files found.
sc/inc/document.hxx
Dosyayı görüntüle @
c29cc3f4
...
@@ -529,7 +529,7 @@ public:
...
@@ -529,7 +529,7 @@ public:
SC_DLLPUBLIC
sal_Bool
GetTable
(
const
String
&
rName
,
SCTAB
&
rTab
)
const
;
SC_DLLPUBLIC
sal_Bool
GetTable
(
const
String
&
rName
,
SCTAB
&
rTab
)
const
;
void
SetAnonymousDBData
(
SCTAB
nTab
,
ScDBData
*
pDBData
);
void
SetAnonymousDBData
(
SCTAB
nTab
,
ScDBData
*
pDBData
);
ScDBData
*
GetAnonymousDBData
(
SCTAB
nTab
);
S
C_DLLPUBLIC
S
cDBData
*
GetAnonymousDBData
(
SCTAB
nTab
);
SC_DLLPUBLIC
inline
SCTAB
GetTableCount
()
const
{
return
nMaxTableNumber
;
}
SC_DLLPUBLIC
inline
SCTAB
GetTableCount
()
const
{
return
nMaxTableNumber
;
}
SvNumberFormatterIndexTable
*
GetFormatExchangeList
()
const
{
return
pFormatExchangeList
;
}
SvNumberFormatterIndexTable
*
GetFormatExchangeList
()
const
{
return
pFormatExchangeList
;
}
...
@@ -1238,7 +1238,7 @@ public:
...
@@ -1238,7 +1238,7 @@ public:
SC_DLLPUBLIC
sal_Bool
ApplyFlagsTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SC_DLLPUBLIC
sal_Bool
ApplyFlagsTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
SCTAB
nTab
,
sal_Int16
nFlags
);
SCTAB
nTab
,
sal_Int16
nFlags
);
sal_Bool
RemoveFlagsTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SC_DLLPUBLIC
sal_Bool
RemoveFlagsTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
SCTAB
nTab
,
sal_Int16
nFlags
);
SCTAB
nTab
,
sal_Int16
nFlags
);
...
...
sc/source/ui/vba/vbaworksheet.cxx
Dosyayı görüntüle @
c29cc3f4
...
@@ -108,6 +108,8 @@
...
@@ -108,6 +108,8 @@
#include "vbasheetobjects.hxx"
#include "vbasheetobjects.hxx"
#include "viewuno.hxx"
#include "viewuno.hxx"
#include "attrib.hxx"
#define STANDARDWIDTH 2267
#define STANDARDWIDTH 2267
#define STANDARDHEIGHT 427
#define STANDARDHEIGHT 427
#define DOESNOTEXIST -1
#define DOESNOTEXIST -1
...
@@ -444,38 +446,39 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx
...
@@ -444,38 +446,39 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx
}
}
uno
::
Reference
<
beans
::
XPropertySet
>
ScVbaWorksheet
::
getFirstDBRangeProperties
()
throw
(
uno
::
RuntimeException
)
{
uno
::
Reference
<
beans
::
XPropertySet
>
xModelProps
(
mxModel
,
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDBRangesIA
(
xModelProps
->
getPropertyValue
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DatabaseRanges"
)
)
),
uno
::
UNO_QUERY_THROW
);
for
(
sal_Int32
nIndex
=
0
,
nCount
=
xDBRangesIA
->
getCount
();
nIndex
<
nCount
;
++
nIndex
)
{
uno
::
Reference
<
sheet
::
XCellRangeReferrer
>
xDBRange
(
xDBRangesIA
->
getByIndex
(
nIndex
),
uno
::
UNO_QUERY_THROW
);
// check if the database area is on this sheet
uno
::
Reference
<
sheet
::
XCellRangeAddressable
>
xRangeAddr
(
xDBRange
->
getReferredCells
(),
uno
::
UNO_QUERY_THROW
);
if
(
getSheetID
()
==
xRangeAddr
->
getRangeAddress
().
Sheet
)
return
uno
::
Reference
<
beans
::
XPropertySet
>
(
xDBRange
,
uno
::
UNO_QUERY_THROW
);
}
return
uno
::
Reference
<
beans
::
XPropertySet
>
();
}
sal_Bool
SAL_CALL
ScVbaWorksheet
::
getAutoFilterMode
()
throw
(
uno
::
RuntimeException
)
sal_Bool
SAL_CALL
ScVbaWorksheet
::
getAutoFilterMode
()
throw
(
uno
::
RuntimeException
)
{
{
uno
::
Reference
<
beans
::
XPropertySet
>
xDBRangeProps
=
getFirstDBRangeProperties
(
);
uno
::
Reference
<
frame
::
XModel
>
xModel
(
getModel
(),
uno
::
UNO_QUERY_THROW
);
sal_Bool
bAutoFilterMode
=
false
;
ScDocument
*
pDoc
=
excel
::
getDocShell
(
xModel
)
->
GetDocument
()
;
return
ScDBData
*
pDBData
=
pDoc
->
GetAnonymousDBData
(
getSheetID
());
xDBRangeProps
.
is
()
&&
if
(
pDBData
)
(
xDBRangeProps
->
getPropertyValue
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"AutoFilter"
)
)
)
>>=
bAutoFilterMode
)
&&
return
pDBData
->
HasAutoFilter
();
bAutoFilterMod
e
;
return
fals
e
;
}
}
void
SAL_CALL
ScVbaWorksheet
::
setAutoFilterMode
(
sal_Bool
bAutoFilterMode
)
throw
(
uno
::
RuntimeException
)
void
SAL_CALL
ScVbaWorksheet
::
setAutoFilterMode
(
sal_Bool
bAutoFilterMode
)
throw
(
uno
::
RuntimeException
)
{
{
uno
::
Reference
<
beans
::
XPropertySet
>
xDBRangeProps
=
getFirstDBRangeProperties
();
uno
::
Reference
<
frame
::
XModel
>
xModel
(
getModel
(),
uno
::
UNO_QUERY_THROW
);
if
(
xDBRangeProps
.
is
()
)
ScDocShell
*
pDocShell
=
excel
::
getDocShell
(
xModel
);
xDBRangeProps
->
setPropertyValue
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"AutoFilter"
)
),
uno
::
Any
(
bAutoFilterMode
)
);
ScDocument
*
pDoc
=
pDocShell
->
GetDocument
();
ScDBData
*
pDBData
=
pDoc
->
GetAnonymousDBData
(
getSheetID
());
if
(
pDBData
)
{
pDBData
->
SetAutoFilter
(
bAutoFilterMode
);
ScRange
aRange
;
pDBData
->
GetArea
(
aRange
);
if
(
bAutoFilterMode
&&
pDoc
)
pDoc
->
ApplyFlagsTab
(
aRange
.
aStart
.
Col
(),
aRange
.
aStart
.
Row
(),
aRange
.
aEnd
.
Col
(),
aRange
.
aStart
.
Row
(),
aRange
.
aStart
.
Tab
(),
SC_MF_AUTO
);
else
if
(
!
bAutoFilterMode
&&
pDoc
)
pDoc
->
RemoveFlagsTab
(
aRange
.
aStart
.
Col
(),
aRange
.
aStart
.
Row
(),
aRange
.
aEnd
.
Col
(),
aRange
.
aStart
.
Row
(),
aRange
.
aStart
.
Tab
(),
SC_MF_AUTO
);
ScRange
aPaintRange
(
aRange
.
aStart
,
aRange
.
aEnd
);
aPaintRange
.
aEnd
.
SetRow
(
aPaintRange
.
aStart
.
Row
());
pDocShell
->
PostPaint
(
aPaintRange
,
PAINT_GRID
);
}
}
}
uno
::
Reference
<
excel
::
XRange
>
uno
::
Reference
<
excel
::
XRange
>
...
...
sc/source/ui/vba/vbaworksheet.hxx
Dosyayı görüntüle @
c29cc3f4
...
@@ -72,8 +72,6 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
...
@@ -72,8 +72,6 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
getFormControls
();
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
getFormControls
();
css
::
uno
::
Any
getControlShape
(
const
rtl
::
OUString
&
sName
);
css
::
uno
::
Any
getControlShape
(
const
rtl
::
OUString
&
sName
);
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
getFirstDBRangeProperties
()
throw
(
css
::
uno
::
RuntimeException
);
protected
:
protected
:
ScVbaWorksheet
(
const
css
::
uno
::
Reference
<
ov
::
XHelperInterface
>&
xParent
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
);
ScVbaWorksheet
(
const
css
::
uno
::
Reference
<
ov
::
XHelperInterface
>&
xParent
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
);
...
...
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