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
fe46fc0f
Kaydet (Commit)
fe46fc0f
authored
Mar 27, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, remove unnecessary XMultiServiceFactory fields
üst
da0e902a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
29 deletions
+22
-29
filtnav.cxx
svx/source/form/filtnav.cxx
+13
-15
filtnav.hxx
svx/source/inc/filtnav.hxx
+9
-14
No files found.
svx/source/form/filtnav.cxx
Dosyayı görüntüle @
fe46fc0f
...
...
@@ -202,12 +202,11 @@ Image FmFilterItems::GetImage() const
//========================================================================
TYPEINIT1
(
FmFilterItem
,
FmFilterData
);
//------------------------------------------------------------------------
FmFilterItem
::
FmFilterItem
(
const
Reference
<
XMultiServiceFactory
>&
_rxFactory
,
FmFilterItems
*
pParent
,
FmFilterItem
::
FmFilterItem
(
FmFilterItems
*
pParent
,
const
OUString
&
aFieldName
,
const
OUString
&
aText
,
const
sal_Int32
_nComponentIndex
)
:
FmFilterData
(
_rxFactory
,
pParent
,
aText
)
:
FmFilterData
(
pParent
,
aText
)
,
m_aFieldName
(
aFieldName
)
,
m_nComponentIndex
(
_nComponentIndex
)
{
...
...
@@ -465,7 +464,7 @@ void FmFilterAdapter::predicateExpressionChanged( const FilterEvent& _Event ) th
// searching the component by field name
OUString
aFieldName
(
lcl_getLabelName_nothrow
(
xFilterController
->
getFilterComponent
(
_Event
.
FilterComponent
)
)
);
pFilterItem
=
new
FmFilterItem
(
m_pModel
->
getORB
(),
pFilter
,
aFieldName
,
_Event
.
PredicateExpression
,
_Event
.
FilterComponent
);
pFilterItem
=
new
FmFilterItem
(
pFilter
,
aFieldName
,
_Event
.
PredicateExpression
,
_Event
.
FilterComponent
);
m_pModel
->
Insert
(
pFilter
->
GetChildren
().
end
(),
pFilterItem
);
}
...
...
@@ -532,7 +531,7 @@ void SAL_CALL FmFilterAdapter::disjunctiveTermAdded( const FilterEvent& _Event )
const
::
std
::
vector
<
FmFilterData
*
>::
iterator
insertPos
=
pFormItem
->
GetChildren
().
begin
()
+
nInsertPos
;
FmFilterItems
*
pFilterItems
=
new
FmFilterItems
(
m_pModel
->
getORB
(),
pFormItem
,
String
(
SVX_RES
(
RID_STR_FILTER_FILTER_OR
)
)
);
FmFilterItems
*
pFilterItems
=
new
FmFilterItems
(
pFormItem
,
String
(
SVX_RES
(
RID_STR_FILTER_FILTER_OR
)
)
);
m_pModel
->
Insert
(
insertPos
,
pFilterItems
);
}
...
...
@@ -541,10 +540,9 @@ void SAL_CALL FmFilterAdapter::disjunctiveTermAdded( const FilterEvent& _Event )
//========================================================================
TYPEINIT1
(
FmFilterModel
,
FmParentData
);
//------------------------------------------------------------------------
FmFilterModel
::
FmFilterModel
(
const
Reference
<
XMultiServiceFactory
>&
_rxFactory
)
:
FmParentData
(
_rxFactory
,
NULL
,
OUString
())
,
OSQLParserClient
(
comphelper
::
getComponentContext
(
_rxFactory
))
,
m_xORB
(
_rxFactory
)
FmFilterModel
::
FmFilterModel
()
:
FmParentData
(
NULL
,
OUString
())
,
OSQLParserClient
(
comphelper
::
getProcessComponentContext
())
,
m_pAdapter
(
NULL
)
,
m_pCurrentItems
(
NULL
)
{
...
...
@@ -630,7 +628,7 @@ void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmPar
OSL_VERIFY
(
xFormProperties
->
getPropertyValue
(
FM_PROP_NAME
)
>>=
aName
);
// Insert a new item for the form
FmFormItem
*
pFormItem
=
new
FmFormItem
(
m_xORB
,
pParent
,
xController
,
aName
);
FmFormItem
*
pFormItem
=
new
FmFormItem
(
pParent
,
xController
,
aName
);
Insert
(
pParent
->
GetChildren
().
end
(),
pFormItem
);
Reference
<
XFilterController
>
xFilterController
(
pFormItem
->
GetFilterController
(),
UNO_SET_THROW
);
...
...
@@ -645,7 +643,7 @@ void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmPar
)
{
// we always display one row, even if there's no term to be displayed
FmFilterItems
*
pFilterItems
=
new
FmFilterItems
(
m_xORB
,
pFormItem
,
aTitle
);
FmFilterItems
*
pFilterItems
=
new
FmFilterItems
(
pFormItem
,
aTitle
);
Insert
(
pFormItem
->
GetChildren
().
end
(),
pFilterItems
);
const
Sequence
<
OUString
>&
rDisjunction
(
*
pConjunctionTerm
);
...
...
@@ -665,7 +663,7 @@ void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmPar
const
OUString
sDisplayName
(
lcl_getLabelName_nothrow
(
xFilterControl
)
);
// insert a new entry
FmFilterItem
*
pANDCondition
=
new
FmFilterItem
(
m_xORB
,
pFilterItems
,
sDisplayName
,
*
pDisjunctiveTerm
,
nComponentIndex
);
FmFilterItem
*
pANDCondition
=
new
FmFilterItem
(
pFilterItems
,
sDisplayName
,
*
pDisjunctiveTerm
,
nComponentIndex
);
Insert
(
pFilterItems
->
GetChildren
().
end
(),
pANDCondition
);
}
...
...
@@ -888,7 +886,7 @@ sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, OUString& rText, OUStr
// obtain a number formatter for this connection
// TODO: shouldn't this be cached?
Reference
<
XNumberFormatsSupplier
>
xFormatSupplier
=
aStaticTools
.
getNumberFormats
(
xConnection
,
sal_True
);
Reference
<
XNumberFormatter
>
xFormatter
(
NumberFormatter
::
create
(
comphelper
::
get
ComponentContext
(
m_xORB
)
),
UNO_QUERY_THROW
);
Reference
<
XNumberFormatter
>
xFormatter
(
NumberFormatter
::
create
(
comphelper
::
get
ProcessComponentContext
(
)
),
UNO_QUERY_THROW
);
xFormatter
->
attachNumberFormatsSupplier
(
xFormatSupplier
);
// get the field (database column) which the item is responsible for
...
...
@@ -1161,7 +1159,7 @@ FmFilterNavigator::FmFilterNavigator( Window* pParent )
);
}
m_pModel
=
new
FmFilterModel
(
comphelper
::
getProcessServiceFactory
()
);
m_pModel
=
new
FmFilterModel
();
StartListening
(
*
m_pModel
);
EnableInplaceEditing
(
sal_True
);
...
...
@@ -1619,7 +1617,7 @@ void FmFilterNavigator::insertFilterItem(const ::std::vector<FmFilterItem*>& _rF
String
aText
=
pLookupItem
->
GetText
();
if
(
!
pFilterItem
)
{
pFilterItem
=
new
FmFilterItem
(
m_pModel
->
getORB
(),
_pTargetItems
,
pLookupItem
->
GetFieldName
(),
aText
,
pLookupItem
->
GetComponentIndex
()
);
pFilterItem
=
new
FmFilterItem
(
_pTargetItems
,
pLookupItem
->
GetFieldName
(),
aText
,
pLookupItem
->
GetComponentIndex
()
);
m_pModel
->
Append
(
_pTargetItems
,
pFilterItem
);
}
...
...
svx/source/inc/filtnav.hxx
Dosyayı görüntüle @
fe46fc0f
...
...
@@ -58,15 +58,13 @@ class FmFilterAdapter;
//========================================================================
class
FmFilterData
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
m_xORB
;
FmParentData
*
m_pParent
;
OUString
m_aText
;
public
:
TYPEINFO
();
FmFilterData
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxFactory
,
FmParentData
*
pParent
=
NULL
,
const
OUString
&
rText
=
OUString
())
:
m_xORB
(
_rxFactory
)
,
m_pParent
(
pParent
)
FmFilterData
(
FmParentData
*
pParent
=
NULL
,
const
OUString
&
rText
=
OUString
())
:
m_pParent
(
pParent
)
,
m_aText
(
rText
)
{}
virtual
~
FmFilterData
(){}
...
...
@@ -86,8 +84,8 @@ protected:
public
:
TYPEINFO
();
FmParentData
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxFactory
,
FmParentData
*
pParent
,
const
OUString
&
rText
)
:
FmFilterData
(
_rxFactory
,
pParent
,
rText
)
FmParentData
(
FmParentData
*
pParent
,
const
OUString
&
rText
)
:
FmFilterData
(
pParent
,
rText
)
{}
virtual
~
FmParentData
();
...
...
@@ -104,10 +102,10 @@ class FmFormItem : public FmParentData
public
:
TYPEINFO
();
FmFormItem
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxFactory
,
FmParentData
*
_pParent
,
FmFormItem
(
FmParentData
*
_pParent
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
form
::
runtime
::
XFormController
>
&
_xController
,
const
OUString
&
_rText
)
:
FmParentData
(
_
rxFactory
,
_
pParent
,
_rText
)
:
FmParentData
(
_pParent
,
_rText
)
,
m_xController
(
_xController
)
,
m_xFilterController
(
_xController
,
::
com
::
sun
::
star
::
uno
::
UNO_QUERY_THROW
)
{
...
...
@@ -127,8 +125,8 @@ class FmFilterItems : public FmParentData
{
public
:
TYPEINFO
();
FmFilterItems
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxFactory
)
:
FmParentData
(
_rxFactory
,
NULL
,
OUString
())
{}
FmFilterItems
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxFactory
,
FmFormItem
*
pParent
,
const
OUString
&
rText
)
:
FmParentData
(
_rxFactory
,
pParent
,
rText
)
{}
FmFilterItems
(
)
:
FmParentData
(
NULL
,
OUString
())
{}
FmFilterItems
(
FmFormItem
*
pParent
,
const
OUString
&
rText
)
:
FmParentData
(
pParent
,
rText
)
{}
FmFilterItem
*
Find
(
const
::
sal_Int32
_nFilterComponentIndex
)
const
;
virtual
Image
GetImage
()
const
;
...
...
@@ -143,7 +141,6 @@ class FmFilterItem : public FmFilterData
public
:
TYPEINFO
();
FmFilterItem
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxFactory
,
FmFilterItems
*
pParent
,
const
OUString
&
aFieldName
,
const
OUString
&
aCondition
,
...
...
@@ -165,13 +162,12 @@ class FmFilterModel : public FmParentData
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XIndexAccess
>
m_xControllers
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
form
::
runtime
::
XFormController
>
m_xController
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
m_xORB
;
FmFilterAdapter
*
m_pAdapter
;
FmFilterItems
*
m_pCurrentItems
;
public
:
TYPEINFO
();
FmFilterModel
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxFactory
);
FmFilterModel
();
virtual
~
FmFilterModel
();
void
Update
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XIndexAccess
>
&
xControllers
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
form
::
runtime
::
XFormController
>
&
xCurrent
);
...
...
@@ -183,7 +179,6 @@ public:
FmFormItem
*
GetCurrentForm
()
const
{
return
m_pCurrentItems
?
(
FmFormItem
*
)
m_pCurrentItems
->
GetParent
()
:
NULL
;}
FmFilterItems
*
GetCurrentItems
()
const
{
return
m_pCurrentItems
;}
void
SetCurrentItems
(
FmFilterItems
*
pCurrent
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
getORB
()
const
{
return
m_xORB
;
}
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XIndexAccess
>
&
GetControllers
()
const
{
return
m_xControllers
;}
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
form
::
runtime
::
XFormController
>
&
GetCurrentController
()
const
{
return
m_xController
;}
...
...
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