summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-07-29 14:28:11 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-07-29 21:29:29 -0430
commit3d05b0c22708bdb876e45e344cad8cf5a6b71b7b (patch)
tree90e68d973ab7ba0c43726cff35dea3bde0ee869c /sfx2
parent3390725129eb694cb42e99086b90f34c8aa0e14d (diff)
Fetch only documents.
Change-Id: If775f159ba94d364f28c675a9493fd3c19d4a2e9
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/templateonlineview.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/sfx2/source/control/templateonlineview.cxx b/sfx2/source/control/templateonlineview.cxx
index a776515567d3..a7e1c99479a6 100644
--- a/sfx2/source/control/templateonlineview.cxx
+++ b/sfx2/source/control/templateonlineview.cxx
@@ -39,7 +39,6 @@ enum
ROW_SIZE,
ROW_DATE_MOD,
ROW_DATE_CREATE,
- ROW_IS_DOCUMENT,
ROW_TARGET_URL,
ROW_IS_HIDDEN,
ROW_IS_REMOTE,
@@ -120,24 +119,23 @@ void TemplateOnlineView::OnItemDblClicked(ThumbnailViewItem *pItem)
try
{
- uno::Sequence< rtl::OUString > aProps(9);
+ uno::Sequence< rtl::OUString > aProps(8);
aProps[0] = "Title";
aProps[1] = "Size";
aProps[2] = "DateModified";
aProps[3] = "DateCreated";
- aProps[4] = "IsDocument";
- aProps[5] = "TargetURL";
- aProps[6] = "IsHidden";
- aProps[7] = "IsRemote";
- aProps[8] = "IsRemoveable";
+ aProps[4] = "TargetURL";
+ aProps[5] = "IsHidden";
+ aProps[6] = "IsRemote";
+ aProps[7] = "IsRemoveable";
ucbhelper::Content aContent(aURL,m_xCmdEnv);
uno::Reference< XResultSet > xResultSet;
uno::Reference< XDynamicResultSet > xDynResultSet;
- ucbhelper::ResultSetInclude eInclude = ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS;
+ ucbhelper::ResultSetInclude eInclude = ucbhelper::INCLUDE_DOCUMENTS_ONLY;
xDynResultSet = aContent.createDynamicCursor( aProps, eInclude );
if ( xDynResultSet.is() )
@@ -154,11 +152,10 @@ void TemplateOnlineView::OnItemDblClicked(ThumbnailViewItem *pItem)
sal_uInt16 nIdx = 0;
while ( xResultSet->next() )
{
- bool bIsDocument = xRow->getBoolean( ROW_IS_DOCUMENT ) && !xRow->wasNull();
bool bIsHidden = xRow->getBoolean( ROW_IS_HIDDEN );
// don't show hidden files or anything besides documents
- if ( bIsDocument && (!bIsHidden || xRow->wasNull()) )
+ if ( !bIsHidden || xRow->wasNull() )
{
aDT = xRow->getTimestamp( ROW_DATE_MOD );
bool bContainsDate = !xRow->wasNull();