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
8a3eab7b
Kaydet (Commit)
8a3eab7b
authored
May 10, 2013
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gallery: fix hideous theme numbering / naming situation.
Change-Id: Ibe288e5b2e782da4dd5804a7e018d8ae85c156cc
üst
22ca7c45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
32 deletions
+15
-32
gallery1.hxx
include/svx/gallery1.hxx
+6
-9
gallery1.cxx
svx/source/gallery2/gallery1.cxx
+9
-19
galtheme.cxx
svx/source/gallery2/galtheme.cxx
+0
-4
No files found.
include/svx/gallery1.hxx
Dosyayı görüntüle @
8a3eab7b
...
@@ -38,11 +38,10 @@ class GalleryThemeEntry
...
@@ -38,11 +38,10 @@ class GalleryThemeEntry
{
{
private
:
private
:
OUString
aName
;
OUString
aName
;
INetURLObject
aThmURL
;
INetURLObject
aThmURL
;
INetURLObject
aSdgURL
;
INetURLObject
aSdgURL
;
INetURLObject
aSdvURL
;
INetURLObject
aSdvURL
;
sal_uInt32
nFileNumber
;
sal_uInt32
nId
;
sal_uInt32
nId
;
sal_Bool
bReadOnly
;
sal_Bool
bReadOnly
;
sal_Bool
bModified
;
sal_Bool
bModified
;
...
@@ -54,12 +53,11 @@ private:
...
@@ -54,12 +53,11 @@ private:
public
:
public
:
GalleryThemeEntry
(
const
INetURLObject
&
rBaseURL
,
const
String
&
rName
,
GalleryThemeEntry
(
const
INetURLObject
&
rBaseURL
,
const
String
&
rName
,
sal_
uInt32
nFileNumber
,
sal_Bool
bReadOnly
,
sal_
Bool
bReadOnly
,
sal_Bool
bNewFile
,
sal_
Bool
bNewFile
,
sal_
uInt32
nId
,
sal_Bool
bThemeNameFromResource
);
sal_uInt32
nId
,
sal_Bool
bThemeNameFromResource
);
~
GalleryThemeEntry
()
{};
~
GalleryThemeEntry
()
{};
const
OUString
&
GetThemeName
()
const
{
return
aName
;
}
const
OUString
&
GetThemeName
()
const
{
return
aName
;
}
sal_uInt32
GetFileNumber
()
const
{
return
nFileNumber
;
}
const
INetURLObject
&
GetThmURL
()
const
{
return
aThmURL
;
}
const
INetURLObject
&
GetThmURL
()
const
{
return
aThmURL
;
}
const
INetURLObject
&
GetSdgURL
()
const
{
return
aSdgURL
;
}
const
INetURLObject
&
GetSdgURL
()
const
{
return
aSdgURL
;
}
...
@@ -124,8 +122,7 @@ private:
...
@@ -124,8 +122,7 @@ private:
INetURLObject
aRelURL
;
INetURLObject
aRelURL
;
INetURLObject
aUserURL
;
INetURLObject
aUserURL
;
rtl_TextEncoding
nReadTextEncoding
;
rtl_TextEncoding
nReadTextEncoding
;
sal_uIntPtr
nLastFileNumber
;
sal_Bool
bMultiPath
;
sal_Bool
bMultiPath
;
void
ImplLoad
(
const
OUString
&
rMultiPath
);
void
ImplLoad
(
const
OUString
&
rMultiPath
);
void
ImplLoadSubDirs
(
const
INetURLObject
&
rBaseURL
,
sal_Bool
&
rbIsReadOnly
);
void
ImplLoadSubDirs
(
const
INetURLObject
&
rBaseURL
,
sal_Bool
&
rbIsReadOnly
);
...
@@ -151,7 +148,7 @@ public:
...
@@ -151,7 +148,7 @@ public:
SVX_DLLPUBLIC
sal_Bool
HasTheme
(
const
String
&
rThemeName
);
SVX_DLLPUBLIC
sal_Bool
HasTheme
(
const
String
&
rThemeName
);
OUString
GetThemeName
(
sal_uIntPtr
nThemeId
)
const
;
OUString
GetThemeName
(
sal_uIntPtr
nThemeId
)
const
;
SVX_DLLPUBLIC
sal_Bool
CreateTheme
(
const
String
&
rThemeName
,
sal_uInt32
nNumFrom
=
0
);
SVX_DLLPUBLIC
sal_Bool
CreateTheme
(
const
String
&
rThemeName
);
sal_Bool
RenameTheme
(
const
String
&
rOldName
,
const
String
&
rNewName
);
sal_Bool
RenameTheme
(
const
String
&
rOldName
,
const
String
&
rNewName
);
SVX_DLLPUBLIC
sal_Bool
RemoveTheme
(
const
String
&
rThemeName
);
SVX_DLLPUBLIC
sal_Bool
RemoveTheme
(
const
String
&
rThemeName
);
...
...
svx/source/gallery2/gallery1.cxx
Dosyayı görüntüle @
8a3eab7b
...
@@ -46,24 +46,22 @@ using namespace ::com::sun::star;
...
@@ -46,24 +46,22 @@ using namespace ::com::sun::star;
// ---------------------
// ---------------------
GalleryThemeEntry
::
GalleryThemeEntry
(
const
INetURLObject
&
rBaseURL
,
const
String
&
rName
,
GalleryThemeEntry
::
GalleryThemeEntry
(
const
INetURLObject
&
rBaseURL
,
const
String
&
rName
,
sal_uInt32
_nFileNumber
,
sal_Bool
_bReadOnly
,
sal_Bool
_bReadOnly
,
sal_Bool
_bNewFile
,
sal_Bool
_bNewFile
,
sal_uInt32
_nId
,
sal_Bool
_bThemeNameFromResource
)
:
sal_uInt32
_nId
,
sal_Bool
_bThemeNameFromResource
)
:
nFileNumber
(
_nFileNumber
),
nId
(
_nId
),
nId
(
_nId
),
bReadOnly
(
_bReadOnly
),
bReadOnly
(
_bReadOnly
),
bThemeNameFromResource
(
_bThemeNameFromResource
)
bThemeNameFromResource
(
_bThemeNameFromResource
)
{
{
INetURLObject
aURL
(
rBaseURL
);
INetURLObject
aURL
(
rBaseURL
);
DBG_ASSERT
(
aURL
.
GetProtocol
()
!=
INET_PROT_NOT_VALID
,
"invalid URL"
);
DBG_ASSERT
(
aURL
.
GetProtocol
()
!=
INET_PROT_NOT_VALID
,
"invalid URL"
);
String
aFileName
(
String
(
"sg"
)
);
aURL
.
Append
(
(
aFileName
+=
OUString
::
number
(
nFileNumber
)
)
+=
String
(
RTL_CONSTASCII_USTRINGPARAM
(
".thm"
)
)
);
aURL
.
setExtension
(
"thm"
);
aThmURL
=
ImplGetURLIgnoreCase
(
aURL
);
aThmURL
=
ImplGetURLIgnoreCase
(
aURL
);
aURL
.
setExtension
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"sdg"
)
)
);
aURL
.
setExtension
(
"sdg"
);
aSdgURL
=
ImplGetURLIgnoreCase
(
aURL
);
aSdgURL
=
ImplGetURLIgnoreCase
(
aURL
);
aURL
.
setExtension
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"sdv"
)
)
);
aURL
.
setExtension
(
"sdv"
);
aSdvURL
=
ImplGetURLIgnoreCase
(
aURL
);
aSdvURL
=
ImplGetURLIgnoreCase
(
aURL
);
SetModified
(
_bNewFile
);
SetModified
(
_bNewFile
);
...
@@ -172,7 +170,6 @@ public:
...
@@ -172,7 +170,6 @@ public:
Gallery
::
Gallery
(
const
OUString
&
rMultiPath
)
Gallery
::
Gallery
(
const
OUString
&
rMultiPath
)
:
nReadTextEncoding
(
osl_getThreadTextEncoding
()
)
:
nReadTextEncoding
(
osl_getThreadTextEncoding
()
)
,
nLastFileNumber
(
0
)
,
bMultiPath
(
sal_False
)
,
bMultiPath
(
sal_False
)
{
{
ImplLoad
(
rMultiPath
);
ImplLoad
(
rMultiPath
);
...
@@ -406,14 +403,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
...
@@ -406,14 +403,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
GalleryThemeEntry
*
pEntry
=
GalleryTheme
::
CreateThemeEntry
(
aThmURL
,
rbDirIsReadOnly
||
bReadOnly
);
GalleryThemeEntry
*
pEntry
=
GalleryTheme
::
CreateThemeEntry
(
aThmURL
,
rbDirIsReadOnly
||
bReadOnly
);
if
(
pEntry
)
if
(
pEntry
)
{
const
sal_uIntPtr
nFileNumber
=
(
sal_uIntPtr
)
String
(
aThmURL
.
GetBase
()).
Erase
(
0
,
2
).
Erase
(
6
).
ToInt32
();
aThemeList
.
push_back
(
pEntry
);
aThemeList
.
push_back
(
pEntry
);
if
(
nFileNumber
>
nLastFileNumber
)
nLastFileNumber
=
nFileNumber
;
}
}
}
}
}
catch
(
const
ucb
::
ContentCreationException
&
)
catch
(
const
ucb
::
ContentCreationException
&
)
...
@@ -547,15 +537,15 @@ sal_Bool Gallery::HasTheme( const String& rThemeName )
...
@@ -547,15 +537,15 @@ sal_Bool Gallery::HasTheme( const String& rThemeName )
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
sal_Bool
Gallery
::
CreateTheme
(
const
String
&
rThemeName
,
sal_uInt32
nNumFrom
)
sal_Bool
Gallery
::
CreateTheme
(
const
String
&
rThemeName
)
{
{
sal_Bool
bRet
=
sal_False
;
sal_Bool
bRet
=
sal_False
;
if
(
!
HasTheme
(
rThemeName
)
&&
(
GetUserURL
().
GetProtocol
()
!=
INET_PROT_NOT_VALID
)
)
if
(
!
HasTheme
(
rThemeName
)
&&
(
GetUserURL
().
GetProtocol
()
!=
INET_PROT_NOT_VALID
)
)
{
{
nLastFileNumber
=
nNumFrom
>
nLastFileNumber
?
nNumFrom
:
nLastFileNumber
+
1
;
INetURLObject
aURL
(
GetUserURL
()
)
;
GalleryThemeEntry
*
pNewEntry
=
new
GalleryThemeEntry
(
GetUserURL
(),
rThemeName
,
aURL
.
Append
(
rThemeName
);
nLastFileNumber
,
GalleryThemeEntry
*
pNewEntry
=
new
GalleryThemeEntry
(
aURL
,
rThemeName
,
sal_False
,
sal_True
,
0
,
sal_False
);
sal_False
,
sal_True
,
0
,
sal_False
);
aThemeList
.
push_back
(
pNewEntry
);
aThemeList
.
push_back
(
pNewEntry
);
...
...
svx/source/gallery2/galtheme.cxx
Dosyayı görüntüle @
8a3eab7b
...
@@ -751,11 +751,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
...
@@ -751,11 +751,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
}
}
INetURLObject
aPathURL
(
rURL
);
INetURLObject
aPathURL
(
rURL
);
aPathURL
.
removeSegment
();
aPathURL
.
removeFinalSlash
();
pRet
=
new
GalleryThemeEntry
(
aPathURL
,
aThemeName
,
pRet
=
new
GalleryThemeEntry
(
aPathURL
,
aThemeName
,
String
(
rURL
.
GetBase
()).
Copy
(
2
,
6
).
ToInt32
(),
bReadOnly
,
sal_False
,
nThemeId
,
bReadOnly
,
sal_False
,
nThemeId
,
bThemeNameFromResource
);
bThemeNameFromResource
);
}
}
...
...
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