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
60cd850d
Kaydet (Commit)
60cd850d
authored
Nis 26, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
startcenter: Add possibility to selectively remove recent documents.
Change-Id: Id0c20de6dc3375e64dd3dbef34dcd6eb77f02340
üst
978ba69d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
265 additions
and
94 deletions
+265
-94
recentdoc_remove.png
icon-themes/galaxy/res/recentdoc_remove.png
+0
-0
recentdoc_remove_highlighted.png
icon-themes/galaxy/res/recentdoc_remove_highlighted.png
+0
-0
recentdocsview.hxx
include/sfx2/recentdocsview.hxx
+10
-5
recentdocsviewitem.hxx
include/sfx2/recentdocsviewitem.hxx
+24
-1
thumbnailview.hxx
include/sfx2/thumbnailview.hxx
+8
-5
thumbnailviewitem.hxx
include/sfx2/thumbnailviewitem.hxx
+10
-0
recentdocsview.cxx
sfx2/source/control/recentdocsview.cxx
+15
-61
recentdocsviewitem.cxx
sfx2/source/control/recentdocsviewitem.cxx
+152
-2
templateview.hrc
sfx2/source/control/templateview.hrc
+7
-5
templateview.src
sfx2/source/control/templateview.src
+10
-0
thumbnailview.cxx
sfx2/source/control/thumbnailview.cxx
+4
-13
thumbnailviewitem.cxx
sfx2/source/control/thumbnailviewitem.cxx
+24
-1
backingwindow.cxx
sfx2/source/dialog/backingwindow.cxx
+1
-1
No files found.
icon-themes/galaxy/res/recentdoc_remove.png
0 → 100644
Dosyayı görüntüle @
60cd850d
763 Bytes
icon-themes/galaxy/res/recentdoc_remove_highlighted.png
0 → 100644
Dosyayı görüntüle @
60cd850d
1.22 KB
include/sfx2/recentdocsview.hxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -38,15 +38,13 @@ enum ApplicationType
};
class
SFX2_DLLPUBLIC
RecentDocsView
:
protected
::
comphelper
::
OBaseMutex
,
public
ThumbnailView
class
SFX2_DLLPUBLIC
RecentDocsView
:
public
ThumbnailView
{
public
:
RecentDocsView
(
Window
*
pParent
);
virtual
~
RecentDocsView
();
void
insertItem
(
const
OUString
&
rURL
,
const
OUString
&
rTitle
,
const
BitmapEx
&
rThumbnail
,
sal_uInt16
nId
);
void
loadRecentDocs
();
long
GetThumbnailSize
()
const
;
...
...
@@ -57,12 +55,18 @@ public:
virtual
void
Clear
()
SAL_OVERRIDE
;
/// Update the information in the view.
virtual
void
Reload
()
SAL_OVERRIDE
;
DECL_STATIC_LINK
(
RecentDocsView
,
ExecuteHdl_Impl
,
LoadRecentFile
*
);
protected
:
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
virtual
void
MouseButtonUp
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
virtual
void
OnItemDblClicked
(
ThumbnailViewItem
*
pItem
)
SAL_OVERRIDE
;
void
OpenItem
(
const
ThumbnailViewItem
*
pItem
);
virtual
void
Paint
(
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
LoseFocus
()
SAL_OVERRIDE
;
...
...
@@ -74,7 +78,8 @@ protected:
long
mnItemPadding
;
long
mnItemMaxTextLength
;
Image
maWelcomeImage
;
/// Image that appears when there is no recent document.
Image
maWelcomeImage
;
OUString
maWelcomeLine1
;
OUString
maWelcomeLine2
;
};
...
...
include/sfx2/recentdocsviewitem.hxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -19,13 +19,36 @@ public:
const
OUString
&
rTitle
,
const
BitmapEx
&
rThumbnail
,
sal_uInt16
nId
);
virtual
void
setEditTitle
(
bool
edit
,
bool
bChangeFocus
=
true
)
SAL_OVERRIDE
;
/** Updates own highlight status based on the aPoint position.
Calls the ancestor's updateHighlight, and then takes care of m_bRemoveIconHighlighted.
Returns rectangle that needs to be invalidated.
*/
virtual
Rectangle
updateHighlight
(
bool
bVisible
,
const
Point
&
rPoint
)
SAL_OVERRIDE
;
/// Text to be used for the tooltip.
virtual
OUString
getHelpText
()
const
SAL_OVERRIDE
;
OUString
maURL
;
virtual
void
Paint
(
drawinglayer
::
processor2d
::
BaseProcessor2D
*
pProcessor
,
const
ThumbnailItemAttributes
*
pAttrs
);
virtual
void
MouseButtonUp
(
const
MouseEvent
&
rMEvt
);
/// Called when the user clicks a document - it will open it.
void
OpenDocument
();
protected
:
/// Return area where is the icon to remove document from the recent documents.
Rectangle
getRemoveIconArea
()
const
;
private
:
OUString
maURL
;
OUString
m_sHelpText
;
/// Is the icon that the user can click to remove the document from the recent documents highlighted?
bool
m_bRemoveIconHighlighted
;
};
#endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
...
...
include/sfx2/thumbnailview.hxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -180,18 +180,21 @@ class SFX2_DLLPUBLIC ThumbnailView : public Control
{
public
:
ThumbnailView
(
Window
*
pParent
,
WinBits
nWinStyle
=
WB_TABSTOP
,
bool
bDisableTransientChildren
=
false
);
ThumbnailView
(
Window
*
pParent
,
WinBits
nWinStyle
=
WB_TABSTOP
,
bool
bDisableTransientChildren
=
false
);
virtual
~
ThumbnailView
();
virtual
~
ThumbnailView
();
virtual
void
MouseMove
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
virtual
void
MouseMove
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
void
AppendItem
(
ThumbnailViewItem
*
pItem
);
void
AppendItem
(
ThumbnailViewItem
*
pItem
);
void
RemoveItem
(
sal_uInt16
nItemId
);
void
RemoveItem
(
sal_uInt16
nItemId
);
virtual
void
Clear
();
/// Updates information in the view; used only in RecentDocsView ATM.
virtual
void
Reload
()
{}
// Change current thumbnail item list with new one (invalidates all pointers to a thumbnail item)
void
updateItems
(
const
std
::
vector
<
ThumbnailViewItem
*>
&
items
);
...
...
include/sfx2/thumbnailviewitem.hxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -32,6 +32,8 @@
#define THUMBNAILVIEW_ITEM_NONEITEM 0xFFFE
const
int
THUMBNAILVIEW_ITEM_CORNER
=
5
;
class
CheckBox
;
class
Font
;
class
Window
;
...
...
@@ -89,6 +91,12 @@ public:
void
setHighlight
(
bool
state
);
/** Updates own highlight status based on the aPoint position.
Returns rectangle that needs to be invalidated.
*/
virtual
Rectangle
updateHighlight
(
bool
bVisible
,
const
Point
&
rPoint
);
/// Text to be used for the tooltip.
virtual
OUString
getHelpText
()
const
;
...
...
@@ -121,6 +129,8 @@ public:
static
drawinglayer
::
primitive2d
::
PolygonHairlinePrimitive2D
*
createBorderLine
(
const
basegfx
::
B2DPolygon
&
rPolygon
);
virtual
void
MouseButtonUp
(
const
MouseEvent
&
)
{}
protected
:
Point
maTextPos
;
...
...
sfx2/source/control/recentdocsview.cxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -26,7 +26,6 @@
#include <unotools/historyoptions.hxx>
#include <vcl/builder.hxx>
#include <vcl/pngread.hxx>
#include <vcl/svapp.hxx>
#include <tools/urlobj.hxx>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/frame/Desktop.hpp>
...
...
@@ -148,7 +147,7 @@ void RecentDocsView::insertItem(const OUString &rURL, const OUString &rTitle, co
AppendItem
(
pChild
);
}
void
RecentDocsView
::
loadRecentDocs
()
void
RecentDocsView
::
Reload
()
{
Clear
();
...
...
@@ -212,78 +211,33 @@ void RecentDocsView::loadRecentDocs()
void
RecentDocsView
::
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
{
if
(
rMEvt
.
IsLeft
()
)
if
(
rMEvt
.
IsLeft
()
)
{
if
(
rMEvt
.
GetClicks
()
>
1
)
return
;
// ignore to avoid stuff done in ThumbnailView; we don't do selections etc.
return
;
}
ThumbnailView
::
MouseButtonDown
(
rMEvt
);
}
void
RecentDocsView
::
MouseButtonUp
(
const
MouseEvent
&
rMEvt
)
{
if
(
rMEvt
.
IsLeft
())
{
size_t
nPos
=
ImplGetItem
(
rMEvt
.
GetPosPixel
());
ThumbnailViewItem
*
pItem
=
ImplGetItem
(
nPos
);
if
(
pItem
)
{
OpenItem
(
pItem
);
pItem
->
MouseButtonUp
(
rMEvt
);
return
;
}
}
ThumbnailView
::
MouseButton
Down
(
rMEvt
);
ThumbnailView
::
MouseButton
Up
(
rMEvt
);
}
void
RecentDocsView
::
OnItemDblClicked
(
ThumbnailViewItem
*
pItem
)
void
RecentDocsView
::
OnItemDblClicked
(
ThumbnailViewItem
*
)
{
OpenItem
(
pItem
);
}
void
RecentDocsView
::
OpenItem
(
const
ThumbnailViewItem
*
pItem
)
{
const
RecentDocsViewItem
*
pRecentItem
=
dynamic_cast
<
const
RecentDocsViewItem
*>
(
pItem
);
if
(
!
pRecentItem
)
return
;
// show busy mouse pointer
SetPointer
(
Pointer
(
POINTER_WAIT
));
Reference
<
XDispatch
>
xDispatch
;
Reference
<
XDispatchProvider
>
xDispatchProvider
;
css
::
util
::
URL
aTargetURL
;
Sequence
<
PropertyValue
>
aArgsList
;
uno
::
Reference
<
frame
::
XDesktop2
>
xDesktop
=
frame
::
Desktop
::
create
(
::
comphelper
::
getProcessComponentContext
()
);
uno
::
Reference
<
frame
::
XFrame
>
xActiveFrame
=
xDesktop
->
getActiveFrame
();
osl
::
ClearableMutexGuard
aLock
(
m_aMutex
);
xDispatchProvider
=
Reference
<
XDispatchProvider
>
(
xActiveFrame
,
UNO_QUERY
);
aLock
.
clear
();
aTargetURL
.
Complete
=
pRecentItem
->
maURL
;
Reference
<
::
com
::
sun
::
star
::
util
::
XURLTransformer
>
xTrans
(
::
com
::
sun
::
star
::
util
::
URLTransformer
::
create
(
::
comphelper
::
getProcessComponentContext
()
)
);
xTrans
->
parseStrict
(
aTargetURL
);
sal_Int32
nSize
=
2
;
aArgsList
.
realloc
(
nSize
);
aArgsList
[
0
].
Name
=
"Referer"
;
aArgsList
[
0
].
Value
=
makeAny
(
OUString
(
"private:user"
)
);
// documents will never be opened as templates
aArgsList
[
1
].
Name
=
"AsTemplate"
;
aArgsList
[
1
].
Value
=
makeAny
(
false
);
xDispatch
=
xDispatchProvider
->
queryDispatch
(
aTargetURL
,
"_default"
,
0
);
if
(
xDispatch
.
is
()
)
{
// Call dispatch asychronously as we can be destroyed while dispatch is
// executed. VCL is not able to survive this as it wants to call listeners
// after select!!!
LoadRecentFile
*
pLoadRecentFile
=
new
LoadRecentFile
;
pLoadRecentFile
->
xDispatch
=
xDispatch
;
pLoadRecentFile
->
aTargetURL
=
aTargetURL
;
pLoadRecentFile
->
aArgSeq
=
aArgsList
;
Application
::
PostUserEvent
(
STATIC_LINK
(
0
,
RecentDocsView
,
ExecuteHdl_Impl
),
pLoadRecentFile
);
}
}
void
RecentDocsView
::
Paint
(
const
Rectangle
&
aRect
)
...
...
sfx2/source/control/recentdocsviewitem.cxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -9,15 +9,52 @@
#include <sfx2/recentdocsviewitem.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/primitive2d/discretebitmapprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <i18nutil/paper.hxx>
#include <sfx2/templateabstractview.hxx>
#include <sfx2/recentdocsview.hxx>
#include <sfx2/sfxresid.hxx>
#include <sfx2/templateabstractview.hxx>
#include <tools/urlobj.hxx>
#include <unotools/historyoptions.hxx>
#include <vcl/svapp.hxx>
#include <templateview.hrc>
using
namespace
basegfx
;
using
namespace
com
::
sun
::
star
;
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
drawinglayer
::
primitive2d
;
using
namespace
drawinglayer
::
processor2d
;
/// Icon that the user can click to remove the document from the recent documents.
struct
theRemoveRecentBitmap
:
public
rtl
::
StaticWithInit
<
BitmapEx
,
theRemoveRecentBitmap
>
{
BitmapEx
operator
()()
{
return
SfxResId
(
IMG_RECENTDOC_REMOVE
);
}
};
/// Highlighted version of icon that the user can click to remove the document from the recent documents.
struct
theRemoveRecentBitmapHighlighted
:
public
rtl
::
StaticWithInit
<
BitmapEx
,
theRemoveRecentBitmapHighlighted
>
{
BitmapEx
operator
()()
{
return
SfxResId
(
IMG_RECENTDOC_REMOVE_HIGHLIGHTED
);
}
};
RecentDocsViewItem
::
RecentDocsViewItem
(
ThumbnailView
&
rView
,
const
OUString
&
rURL
,
const
OUString
&
rTitle
,
const
BitmapEx
&
rThumbnail
,
sal_uInt16
nId
)
:
ThumbnailViewItem
(
rView
,
nId
),
maURL
(
rURL
)
maURL
(
rURL
),
m_bRemoveIconHighlighted
(
false
)
{
OUString
aTitle
(
rTitle
);
INetURLObject
aURLObj
(
rURL
);
...
...
@@ -89,9 +126,122 @@ void RecentDocsViewItem::setEditTitle (bool edit, bool bChangeFocus)
(
void
)
bChangeFocus
;
}
Rectangle
RecentDocsViewItem
::
updateHighlight
(
bool
bVisible
,
const
Point
&
rPoint
)
{
Rectangle
aRect
(
ThumbnailViewItem
::
updateHighlight
(
bVisible
,
rPoint
));
if
(
bVisible
&&
getRemoveIconArea
().
IsInside
(
rPoint
))
{
if
(
!
m_bRemoveIconHighlighted
)
aRect
.
Union
(
getRemoveIconArea
());
m_bRemoveIconHighlighted
=
true
;
}
else
{
if
(
m_bRemoveIconHighlighted
)
aRect
.
Union
(
getRemoveIconArea
());
m_bRemoveIconHighlighted
=
false
;
}
return
aRect
;
}
Rectangle
RecentDocsViewItem
::
getRemoveIconArea
()
const
{
Rectangle
aArea
(
getDrawArea
());
Size
aSize
(
theRemoveRecentBitmap
::
get
().
GetSizePixel
());
return
Rectangle
(
Point
(
aArea
.
Right
()
-
aSize
.
Width
()
-
THUMBNAILVIEW_ITEM_CORNER
,
aArea
.
Top
()
+
THUMBNAILVIEW_ITEM_CORNER
),
aSize
);
}
OUString
RecentDocsViewItem
::
getHelpText
()
const
{
return
m_sHelpText
;
}
void
RecentDocsViewItem
::
Paint
(
drawinglayer
::
processor2d
::
BaseProcessor2D
*
pProcessor
,
const
ThumbnailItemAttributes
*
pAttrs
)
{
ThumbnailViewItem
::
Paint
(
pProcessor
,
pAttrs
);
// paint the remove icon when highlighted
if
(
isHighlighted
())
{
Primitive2DSequence
aSeq
(
1
);
Point
aIconPos
(
getRemoveIconArea
().
TopLeft
());
aSeq
[
0
]
=
Primitive2DReference
(
new
DiscreteBitmapPrimitive2D
(
m_bRemoveIconHighlighted
?
theRemoveRecentBitmapHighlighted
::
get
()
:
theRemoveRecentBitmap
::
get
(),
B2DPoint
(
aIconPos
.
X
(),
aIconPos
.
Y
())));
pProcessor
->
process
(
aSeq
);
}
}
void
RecentDocsViewItem
::
MouseButtonUp
(
const
MouseEvent
&
rMEvt
)
{
if
(
rMEvt
.
IsLeft
())
{
if
(
getRemoveIconArea
().
IsInside
(
rMEvt
.
GetPosPixel
()))
{
SvtHistoryOptions
().
DeleteItem
(
ePICKLIST
,
maURL
);
mrParent
.
Reload
();
return
;
}
OpenDocument
();
return
;
}
}
void
RecentDocsViewItem
::
OpenDocument
()
{
// show busy mouse pointer
mrParent
.
SetPointer
(
Pointer
(
POINTER_WAIT
));
Reference
<
frame
::
XDispatch
>
xDispatch
;
Reference
<
frame
::
XDispatchProvider
>
xDispatchProvider
;
css
::
util
::
URL
aTargetURL
;
Sequence
<
beans
::
PropertyValue
>
aArgsList
;
uno
::
Reference
<
frame
::
XDesktop2
>
xDesktop
=
frame
::
Desktop
::
create
(
::
comphelper
::
getProcessComponentContext
());
uno
::
Reference
<
frame
::
XFrame
>
xActiveFrame
=
xDesktop
->
getActiveFrame
();
//osl::ClearableMutexGuard aLock(m_aMutex);
xDispatchProvider
=
Reference
<
frame
::
XDispatchProvider
>
(
xActiveFrame
,
UNO_QUERY
);
//aLock.clear();
aTargetURL
.
Complete
=
maURL
;
Reference
<
util
::
XURLTransformer
>
xTrans
(
util
::
URLTransformer
::
create
(
::
comphelper
::
getProcessComponentContext
()));
xTrans
->
parseStrict
(
aTargetURL
);
sal_Int32
nSize
=
2
;
aArgsList
.
realloc
(
nSize
);
aArgsList
[
0
].
Name
=
"Referer"
;
aArgsList
[
0
].
Value
=
makeAny
(
OUString
(
"private:user"
));
// documents will never be opened as templates
aArgsList
[
1
].
Name
=
"AsTemplate"
;
aArgsList
[
1
].
Value
=
makeAny
(
false
);
xDispatch
=
xDispatchProvider
->
queryDispatch
(
aTargetURL
,
"_default"
,
0
);
if
(
xDispatch
.
is
())
{
// Call dispatch asychronously as we can be destroyed while dispatch is
// executed. VCL is not able to survive this as it wants to call listeners
// after select!!!
LoadRecentFile
*
pLoadRecentFile
=
new
LoadRecentFile
;
pLoadRecentFile
->
xDispatch
=
xDispatch
;
pLoadRecentFile
->
aTargetURL
=
aTargetURL
;
pLoadRecentFile
->
aArgSeq
=
aArgsList
;
Application
::
PostUserEvent
(
STATIC_LINK
(
0
,
RecentDocsView
,
ExecuteHdl_Impl
),
pLoadRecentFile
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/control/templateview.hrc
Dosyayı görüntüle @
60cd850d
...
...
@@ -7,10 +7,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#define BTN_ALL_TEMPLATES 256
#define FT_NAME 258
#define STR_WELCOME_LINE1 259
#define STR_WELCOME_LINE2 260
#define IMG_WELCOME 261
#define BTN_ALL_TEMPLATES 256
#define FT_NAME 258
#define STR_WELCOME_LINE1 259
#define STR_WELCOME_LINE2 260
#define IMG_WELCOME 261
#define IMG_RECENTDOC_REMOVE 262
#define IMG_RECENTDOC_REMOVE_HIGHLIGHTED 263
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/control/templateview.src
Dosyayı görüntüle @
60cd850d
...
...
@@ -38,4 +38,14 @@ Image IMG_WELCOME
ImageBitmap = Bitmap { File = "logo.png" ; };
};
Bitmap IMG_RECENTDOC_REMOVE
{
File = "recentdoc_remove.png";
};
Bitmap IMG_RECENTDOC_REMOVE_HIGHLIGHTED
{
File = "recentdoc_remove_highlighted.png";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/control/thumbnailview.cxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -87,26 +87,17 @@ void ThumbnailView::MouseMove(const MouseEvent& rMEvt)
for
(
size_t
i
=
0
;
i
<
nItemCount
;
i
++
)
{
bool
bNeedsPaint
=
false
;
ThumbnailViewItem
*
pItem
=
mFilteredItemList
[
i
];
if
(
pItem
->
mbVisible
&&
!
rMEvt
.
IsLeaveWindow
()
&&
pItem
->
getDrawArea
().
IsInside
(
aPoint
))
{
aHelp
=
pItem
->
getHelpText
();
if
(
!
pItem
->
isHighlighted
())
bNeedsPaint
=
true
;
pItem
->
setHighlight
(
true
);
}
else
{
if
(
pItem
->
isHighlighted
())
bNeedsPaint
=
true
;
pItem
->
setHighlight
(
false
);
}
if
(
bNeedsPaint
&&
IsReallyVisible
()
&&
IsUpdateMode
())
Invalidate
(
pItem
->
getDrawArea
());
Rectangle
aToInvalidate
(
pItem
->
updateHighlight
(
pItem
->
mbVisible
&&
!
rMEvt
.
IsLeaveWindow
(),
aPoint
));
if
(
!
aToInvalidate
.
IsEmpty
()
&&
IsReallyVisible
()
&&
IsUpdateMode
())
Invalidate
(
aToInvalidate
);
}
if
(
mbShowTooltips
)
...
...
sfx2/source/control/thumbnailviewitem.cxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -146,6 +146,29 @@ void ThumbnailViewItem::setHighlight (bool state)
mbHover
=
state
;
}
Rectangle
ThumbnailViewItem
::
updateHighlight
(
bool
bVisible
,
const
Point
&
rPoint
)
{
bool
bNeedsPaint
=
false
;
if
(
bVisible
&&
getDrawArea
().
IsInside
(
rPoint
))
{
if
(
!
isHighlighted
())
bNeedsPaint
=
true
;
setHighlight
(
true
);
}
else
{
if
(
isHighlighted
())
bNeedsPaint
=
true
;
setHighlight
(
false
);
}
if
(
bNeedsPaint
)
return
getDrawArea
();
return
Rectangle
();
}
OUString
ThumbnailViewItem
::
getHelpText
()
const
{
return
maTitle
;
...
...
@@ -265,7 +288,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
sal_uInt32
nPrimitive
=
0
;
aSeq
[
nPrimitive
++
]
=
drawinglayer
::
primitive2d
::
Primitive2DReference
(
new
PolyPolygonSelectionPrimitive2D
(
B2DPolyPolygon
(
Polygon
(
maDrawArea
,
5
,
5
).
getB2DPolygon
()),
B2DPolyPolygon
(
Polygon
(
maDrawArea
,
THUMBNAILVIEW_ITEM_CORNER
,
THUMBNAILVIEW_ITEM_CORNER
).
getB2DPolygon
()),
aFillColor
,
fTransparence
,
0.0
,
...
...
sfx2/source/dialog/backingwindow.cxx
Dosyayı görüntüle @
60cd850d
...
...
@@ -224,7 +224,7 @@ void BackingWindow::initControls()
mpAllRecentThumbnails
->
mnFileTypes
|=
TYPE_MATH
;
mpAllRecentThumbnails
->
mnFileTypes
|=
TYPE_OTHER
;
mpAllRecentThumbnails
->
loadRecentDocs
();
mpAllRecentThumbnails
->
Reload
();
mpAllRecentThumbnails
->
ShowTooltips
(
true
);
setupButton
(
mpOpenButton
);
...
...
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