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
dcf76c75
Kaydet (Commit)
dcf76c75
authored
May 13, 2013
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gallery: add auxiliary .desktop style translation files.
Change-Id: I2f2f0d5d30fbcab83343f94fd16d9371baa380e5
üst
d5051efa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
106 additions
and
2 deletions
+106
-2
gallery1.hxx
include/svx/gallery1.hxx
+4
-0
galtheme.hxx
include/svx/galtheme.hxx
+2
-1
Library_svxcore.mk
svx/Library_svxcore.mk
+1
-0
galini.cxx
svx/source/gallery2/galini.cxx
+88
-0
gallery1.cxx
svx/source/gallery2/gallery1.cxx
+10
-1
galtheme.cxx
svx/source/gallery2/galtheme.cxx
+1
-0
No files found.
include/svx/gallery1.hxx
Dosyayı görüntüle @
dcf76c75
...
...
@@ -42,6 +42,7 @@ private:
INetURLObject
aThmURL
;
INetURLObject
aSdgURL
;
INetURLObject
aSdvURL
;
INetURLObject
aStrURL
;
sal_uInt32
nId
;
sal_Bool
bReadOnly
;
sal_Bool
bModified
;
...
...
@@ -62,6 +63,9 @@ public:
const
INetURLObject
&
GetThmURL
()
const
{
return
aThmURL
;
}
const
INetURLObject
&
GetSdgURL
()
const
{
return
aSdgURL
;
}
const
INetURLObject
&
GetSdvURL
()
const
{
return
aSdvURL
;
}
const
INetURLObject
&
GetStrURL
()
const
{
return
aStrURL
;
}
OUString
ReadStrFromIni
(
const
OUString
&
aKeyName
);
sal_Bool
IsReadOnly
()
const
{
return
bReadOnly
;
}
sal_Bool
IsDefault
()
const
;
...
...
include/svx/galtheme.hxx
Dosyayı görüntüle @
dcf76c75
...
...
@@ -95,7 +95,7 @@ private:
SotStorageRef
aSvDrawStorageRef
;
Gallery
*
pParent
;
GalleryThemeEntry
*
pThm
;
sal_uIntPtr
mnThemeLockCount
;
sal_uIntPtr
mnThemeLockCount
;
sal_uIntPtr
mnBroadcasterLockCount
;
sal_uIntPtr
nDragPos
;
sal_Bool
bDragging
;
...
...
@@ -149,6 +149,7 @@ public:
const
INetURLObject
&
GetThmURL
()
const
;
SVX_DLLPUBLIC
const
INetURLObject
&
GetSdgURL
()
const
;
const
INetURLObject
&
GetSdvURL
()
const
;
const
INetURLObject
&
GetStrURL
()
const
;
SVX_DLLPUBLIC
sal_uInt32
GetId
()
const
;
void
SetId
(
sal_uInt32
nNewId
,
sal_Bool
bResetThemeName
);
...
...
svx/Library_svxcore.mk
Dosyayı görüntüle @
dcf76c75
...
...
@@ -123,6 +123,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/gallery2/galbrws2 \
svx/source/gallery2/galctrl \
svx/source/gallery2/galexpl \
svx/source/gallery2/galini \
svx/source/gallery2/gallery1 \
svx/source/gallery2/galmisc \
svx/source/gallery2/galobj \
...
...
svx/source/gallery2/galini.cxx
0 → 100644
Dosyayı görüntüle @
dcf76c75
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
* The world's quickest and lamest .desktop / .ini file parser.
* Ideally the .thm file would move to a .desktop file in
* future.
*/
#include <sal/config.h>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/tempfile.hxx>
#include <svx/gallery1.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <unotools/syslocale.hxx>
#include <vcl/svapp.hxx>
OUString
GalleryThemeEntry
::
ReadStrFromIni
(
const
OUString
&
aKeyName
)
{
SvStream
*
pStrm
=
::
utl
::
UcbStreamHelper
::
CreateStream
(
GetStrURL
().
GetMainURL
(
INetURLObject
::
NO_DECODE
),
STREAM_READ
);
const
LanguageTag
&
rLangTag
=
Application
::
GetSettings
().
GetUILanguageTag
();
::
std
::
vector
<
OUString
>
aFallbacks
=
rLangTag
.
getFallbackStrings
();
OUString
aResult
;
sal_Int32
nRank
=
42
;
if
(
pStrm
)
{
OString
aLine
;
while
(
pStrm
->
ReadLine
(
aLine
)
)
{
OUString
aKey
;
OUString
aLocale
;
OUString
aValue
;
sal_Int32
n
;
if
(
(
n
=
aLine
.
indexOf
(
'='
)
)
>=
1
)
{
aKey
=
OStringToOUString
(
aLine
.
copy
(
0
,
n
).
trim
(),
RTL_TEXTENCODING_ASCII_US
);
aValue
=
OStringToOUString
(
aLine
.
copy
(
n
+
1
).
trim
(),
RTL_TEXTENCODING_UTF8
);
if
(
(
n
=
aKey
.
indexOf
(
'['
)
)
>=
1
)
{
aLocale
=
aKey
.
copy
(
n
+
1
).
trim
();
aKey
=
aKey
.
copy
(
0
,
n
).
trim
();
if
(
(
n
=
aLocale
.
indexOf
(
']'
)
)
>=
1
)
aLocale
=
aLocale
.
copy
(
0
,
n
).
trim
();
}
}
SAL_INFO
(
"svx"
,
"ini file has '"
<<
aKey
<<
"' [ '"
<<
aLocale
<<
"' ] = '"
<<
aValue
<<
"'"
);
// grisly language matching, is this not available somewhere else?
if
(
aKey
==
aKeyName
)
{
n
=
0
;
OUString
aLang
=
aLocale
.
replace
(
'_'
,
'-'
);
for
(
std
::
vector
<
OUString
>::
const_iterator
i
=
aFallbacks
.
begin
();
i
!=
aFallbacks
.
end
();
++
i
,
++
n
)
{
SAL_INFO
(
"svx"
,
"compare '"
<<
aLang
<<
"' with '"
<<
*
i
<<
"' rank "
<<
nRank
<<
" vs. "
<<
n
);
if
(
*
i
==
aLang
&&
n
<
nRank
)
{
nRank
=
n
;
// try to get the most accurate match
aResult
=
aValue
;
}
}
}
}
delete
pStrm
;
}
SAL_INFO
(
"svx"
,
"readStrFromIni returns '"
<<
aResult
<<
"'"
);
return
aResult
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/gallery2/gallery1.cxx
Dosyayı görüntüle @
dcf76c75
...
...
@@ -64,9 +64,16 @@ GalleryThemeEntry::GalleryThemeEntry( const INetURLObject& rBaseURL, const Strin
aURL
.
setExtension
(
"sdv"
);
aSdvURL
=
ImplGetURLIgnoreCase
(
aURL
);
aURL
.
setExtension
(
"str"
);
aStrURL
=
ImplGetURLIgnoreCase
(
aURL
);
SetModified
(
_bNewFile
);
if
(
nId
&&
bThemeNameFromResource
)
aName
=
ReadStrFromIni
(
"name"
);
// This is awful - we shouldn't use these resources if we
// possibly can avoid them
if
(
aName
.
isEmpty
()
&&
nId
&&
bThemeNameFromResource
)
aName
=
GAL_RESSTR
(
RID_GALLERYSTR_THEME_START
+
(
sal_uInt16
)
nId
);
if
(
aName
.
isEmpty
()
)
...
...
@@ -573,12 +580,14 @@ sal_Bool Gallery::RemoveTheme( const String& rThemeName )
INetURLObject
aThmURL
(
pThm
->
GetThmURL
()
);
INetURLObject
aSdgURL
(
pThm
->
GetSdgURL
()
);
INetURLObject
aSdvURL
(
pThm
->
GetSdvURL
()
);
INetURLObject
aStrURL
(
pThm
->
GetSdvURL
()
);
ReleaseTheme
(
pThm
,
aListener
);
KillFile
(
aThmURL
);
KillFile
(
aSdgURL
);
KillFile
(
aSdvURL
);
KillFile
(
aStrURL
);
}
for
(
GalleryThemeList
::
iterator
it
=
aThemeList
.
begin
();
it
!=
aThemeList
.
end
();
++
it
)
...
...
svx/source/gallery2/galtheme.cxx
Dosyayı görüntüle @
dcf76c75
...
...
@@ -1564,6 +1564,7 @@ void GalleryTheme::ImplSetModified( sal_Bool bModified )
const
OUString
&
GalleryTheme
::
GetRealName
()
const
{
return
pThm
->
GetThemeName
();
}
const
INetURLObject
&
GalleryTheme
::
GetThmURL
()
const
{
return
pThm
->
GetThmURL
();
}
const
INetURLObject
&
GalleryTheme
::
GetSdgURL
()
const
{
return
pThm
->
GetSdgURL
();
}
const
INetURLObject
&
GalleryTheme
::
GetStrURL
()
const
{
return
pThm
->
GetStrURL
();
}
const
INetURLObject
&
GalleryTheme
::
GetSdvURL
()
const
{
return
pThm
->
GetSdvURL
();
}
sal_uInt32
GalleryTheme
::
GetId
()
const
{
return
pThm
->
GetId
();
}
void
GalleryTheme
::
SetId
(
sal_uInt32
nNewId
,
sal_Bool
bResetThemeName
)
{
pThm
->
SetId
(
nNewId
,
bResetThemeName
);
}
...
...
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