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
e62fec40
Kaydet (Commit)
e62fec40
authored
Tem 28, 2013
tarafından
Jesús Corrius
Kaydeden (comit)
Fridrich Štrba
Tem 28, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use the Win7 semantics of SHAddToRecentDocs when possible
Change-Id: I7cf0dfaec408800f3c682b3ef56799818b805881
üst
af079c88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
3 deletions
+65
-3
saldata.hxx
vcl/inc/win/saldata.hxx
+1
-0
salinst.cxx
vcl/win/source/app/salinst.cxx
+63
-1
salframe.cxx
vcl/win/source/window/salframe.cxx
+1
-2
No files found.
vcl/inc/win/saldata.hxx
Dosyayı görüntüle @
e62fec40
...
@@ -136,6 +136,7 @@ struct SalShlData
...
@@ -136,6 +136,7 @@ struct SalShlData
UINT
mnWheelScrollChars
;
// WheelScrollChars
UINT
mnWheelScrollChars
;
// WheelScrollChars
UINT
mnWheelMsgId
;
// Wheel-Message-Id fuer W95
UINT
mnWheelMsgId
;
// Wheel-Message-Id fuer W95
BOOL
mbWXP
;
// Windows XP
BOOL
mbWXP
;
// Windows XP
BOOL
mbW7
;
// Windows 7
OSVERSIONINFO
maVersionInfo
;
OSVERSIONINFO
maVersionInfo
;
};
};
...
...
vcl/win/source/app/salinst.cxx
Dosyayı görüntüle @
e62fec40
...
@@ -493,6 +493,7 @@ SalInstance* CreateSalInstance()
...
@@ -493,6 +493,7 @@ SalInstance* CreateSalInstance()
// determine the windows version
// determine the windows version
aSalShlData
.
mbWXP
=
0
;
aSalShlData
.
mbWXP
=
0
;
aSalShlData
.
mbW7
=
0
;
memset
(
&
aSalShlData
.
maVersionInfo
,
0
,
sizeof
(
aSalShlData
.
maVersionInfo
)
);
memset
(
&
aSalShlData
.
maVersionInfo
,
0
,
sizeof
(
aSalShlData
.
maVersionInfo
)
);
aSalShlData
.
maVersionInfo
.
dwOSVersionInfoSize
=
sizeof
(
aSalShlData
.
maVersionInfo
);
aSalShlData
.
maVersionInfo
.
dwOSVersionInfoSize
=
sizeof
(
aSalShlData
.
maVersionInfo
);
if
(
GetVersionEx
(
&
aSalShlData
.
maVersionInfo
)
)
if
(
GetVersionEx
(
&
aSalShlData
.
maVersionInfo
)
)
...
@@ -501,6 +502,10 @@ SalInstance* CreateSalInstance()
...
@@ -501,6 +502,10 @@ SalInstance* CreateSalInstance()
if
(
aSalShlData
.
maVersionInfo
.
dwMajorVersion
>
5
||
if
(
aSalShlData
.
maVersionInfo
.
dwMajorVersion
>
5
||
(
aSalShlData
.
maVersionInfo
.
dwMajorVersion
==
5
&&
aSalShlData
.
maVersionInfo
.
dwMinorVersion
>=
1
)
)
(
aSalShlData
.
maVersionInfo
.
dwMajorVersion
==
5
&&
aSalShlData
.
maVersionInfo
.
dwMinorVersion
>=
1
)
)
aSalShlData
.
mbWXP
=
1
;
aSalShlData
.
mbWXP
=
1
;
// Windows 7 ?
if
(
aSalShlData
.
maVersionInfo
.
dwMajorVersion
>
6
||
(
aSalShlData
.
maVersionInfo
.
dwMajorVersion
==
6
&&
aSalShlData
.
maVersionInfo
.
dwMinorVersion
>=
1
)
)
aSalShlData
.
mbW7
=
1
;
}
}
pSalData
->
mnAppThreadId
=
GetCurrentThreadId
();
pSalData
->
mnAppThreadId
=
GetCurrentThreadId
();
...
@@ -1030,7 +1035,7 @@ void* WinSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
...
@@ -1030,7 +1035,7 @@ void* WinSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
@param aFileUrl
@param aFileUrl
The file url of the document.
The file url of the document.
*/
*/
void
WinSalInstance
::
AddToRecentDocumentList
(
const
OUString
&
rFileUrl
,
const
OUString
&
/*rMimeType*/
,
const
OUString
&
/* rDocumentService */
)
void
WinSalInstance
::
AddToRecentDocumentList
(
const
OUString
&
rFileUrl
,
const
OUString
&
/*rMimeType*/
,
const
OUString
&
rDocumentService
)
{
{
OUString
system_path
;
OUString
system_path
;
osl
::
FileBase
::
RC
rc
=
osl
::
FileBase
::
getSystemPathFromFileURL
(
rFileUrl
,
system_path
);
osl
::
FileBase
::
RC
rc
=
osl
::
FileBase
::
getSystemPathFromFileURL
(
rFileUrl
,
system_path
);
...
@@ -1038,7 +1043,64 @@ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
...
@@ -1038,7 +1043,64 @@ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
OSL_ENSURE
(
osl
::
FileBase
::
E_None
==
rc
,
"Invalid file url"
);
OSL_ENSURE
(
osl
::
FileBase
::
E_None
==
rc
,
"Invalid file url"
);
if
(
osl
::
FileBase
::
E_None
==
rc
)
if
(
osl
::
FileBase
::
E_None
==
rc
)
{
if
(
aSalShlData
.
mbW7
)
{
typedef
HRESULT
(
WINAPI
*
SHCREATEITEMFROMPARSINGNAME
)(
PCWSTR
,
IBindCtx
*
,
REFIID
,
void
**
ppv
);
SHCREATEITEMFROMPARSINGNAME
pSHCreateItemFromParsingName
=
(
SHCREATEITEMFROMPARSINGNAME
)
GetProcAddress
(
GetModuleHandleW
(
L"shell32.dll"
),
"SHCreateItemFromParsingName"
);
if
(
pSHCreateItemFromParsingName
)
{
IShellItem
*
pShellItem
=
NULL
;
HRESULT
hr
=
pSHCreateItemFromParsingName
(
system_path
.
getStr
(),
NULL
,
IID_PPV_ARGS
(
&
pShellItem
)
);
if
(
SUCCEEDED
(
hr
)
&&
pShellItem
)
{
OUString
sApplicationName
;
if
(
rDocumentService
==
"com.sun.star.text.TextDocument"
||
rDocumentService
==
"com.sun.star.text.GlobalDocument"
||
rDocumentService
==
"com.sun.star.text.WebDocument"
||
rDocumentService
==
"com.sun.star.xforms.XMLFormDocument"
)
sApplicationName
=
"Writer"
;
else
if
(
rDocumentService
==
"com.sun.star.sheet.SpreadsheetDocument"
||
rDocumentService
==
"com.sun.star.chart2.ChartDocument"
)
sApplicationName
=
"Calc"
;
else
if
(
rDocumentService
==
"com.sun.star.presentation.PresentationDocument"
)
sApplicationName
=
"Impress"
;
else
if
(
rDocumentService
==
"com.sun.star.drawing.DrawingDocument"
)
sApplicationName
=
"Draw"
;
else
if
(
rDocumentService
==
"com.sun.star.formula.FormulaProperties"
)
sApplicationName
=
"Math"
;
else
if
(
rDocumentService
==
"com.sun.star.sdb.DatabaseDocument"
||
rDocumentService
==
"com.sun.star.sdb.OfficeDatabaseDocument"
||
rDocumentService
==
"com.sun.star.sdb.RelationDesign"
||
rDocumentService
==
"com.sun.star.sdb.QueryDesign"
||
rDocumentService
==
"com.sun.star.sdb.TableDesign"
||
rDocumentService
==
"com.sun.star.sdb.DataSourceBrowser"
)
sApplicationName
=
"Base"
;
if
(
!
sApplicationName
.
isEmpty
()
)
{
OUString
sApplicationID
(
"TheDocumentFoundation.LibreOffice."
);
sApplicationID
+=
sApplicationName
;
SHARDAPPIDINFO
info
;
info
.
psi
=
pShellItem
;
info
.
pszAppID
=
sApplicationID
.
getStr
();
SHAddToRecentDocs
(
SHARD_APPIDINFO
,
&
info
);
return
;
}
}
}
}
// For whatever reason, we could not use the SHARD_APPIDNFO semantics
SHAddToRecentDocs
(
SHARD_PATHW
,
system_path
.
getStr
());
SHAddToRecentDocs
(
SHARD_PATHW
,
system_path
.
getStr
());
}
}
}
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
...
...
vcl/win/source/window/salframe.cxx
Dosyayı görüntüle @
e62fec40
...
@@ -1905,7 +1905,7 @@ void WinSalFrame::SetScreenNumber( unsigned int nNewScreen )
...
@@ -1905,7 +1905,7 @@ void WinSalFrame::SetScreenNumber( unsigned int nNewScreen )
void
WinSalFrame
::
SetApplicationID
(
const
OUString
&
rApplicationID
)
void
WinSalFrame
::
SetApplicationID
(
const
OUString
&
rApplicationID
)
{
{
if
(
aSalShlData
.
maVersionInfo
.
dwMajorVersion
>=
6
)
if
(
aSalShlData
.
mbW7
)
{
{
// http://msdn.microsoft.com/en-us/library/windows/desktop/dd378430(v=vs.85).aspx
// http://msdn.microsoft.com/en-us/library/windows/desktop/dd378430(v=vs.85).aspx
// A window's properties must be removed before the window is closed.
// A window's properties must be removed before the window is closed.
...
@@ -1915,7 +1915,6 @@ void WinSalFrame::SetApplicationID( const OUString &rApplicationID )
...
@@ -1915,7 +1915,6 @@ void WinSalFrame::SetApplicationID( const OUString &rApplicationID )
pSHGetPropertyStoreForWindow
=
(
SHGETPROPERTYSTOREFORWINDOW
)
GetProcAddress
(
pSHGetPropertyStoreForWindow
=
(
SHGETPROPERTYSTOREFORWINDOW
)
GetProcAddress
(
GetModuleHandleW
(
L"shell32.dll"
),
"SHGetPropertyStoreForWindow"
);
GetModuleHandleW
(
L"shell32.dll"
),
"SHGetPropertyStoreForWindow"
);
// A mere presence of the symbol means we are at least on Windows 7 or Windows Server 2008 R2
if
(
pSHGetPropertyStoreForWindow
)
if
(
pSHGetPropertyStoreForWindow
)
{
{
IPropertyStore
*
pps
;
IPropertyStore
*
pps
;
...
...
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