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
e0deec25
Kaydet (Commit)
e0deec25
authored
May 11, 2013
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gengal: theme creation fix.
Change-Id: I72544e2bea45cf3f83e944aee9ca95676f1879c1
üst
8a3eab7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
gengal.cxx
svx/source/gengal/gengal.cxx
+7
-8
No files found.
svx/source/gengal/gengal.cxx
Dosyayı görüntüle @
e0deec25
...
@@ -63,8 +63,8 @@ void disposeGallery( Gallery* pGallery )
...
@@ -63,8 +63,8 @@ void disposeGallery( Gallery* pGallery )
}
}
static
void
createTheme
(
OUString
aThemeName
,
OUString
aGalleryURL
,
static
void
createTheme
(
OUString
aThemeName
,
OUString
aGalleryURL
,
OUString
aDestDir
,
sal_uInt32
nNumFrom
,
OUString
aDestDir
,
FileNameList
&
rFiles
,
FileNameList
&
rFiles
,
bool
bRelativeURLs
)
bool
bRelativeURLs
)
{
{
Gallery
*
pGallery
;
Gallery
*
pGallery
;
...
@@ -82,7 +82,7 @@ static void createTheme( OUString aThemeName, OUString aGalleryURL,
...
@@ -82,7 +82,7 @@ static void createTheme( OUString aThemeName, OUString aGalleryURL,
GalleryTheme
*
pGalTheme
;
GalleryTheme
*
pGalTheme
;
if
(
!
pGallery
->
HasTheme
(
aThemeName
)
)
{
if
(
!
pGallery
->
HasTheme
(
aThemeName
)
)
{
if
(
!
pGallery
->
CreateTheme
(
aThemeName
,
nNumFrom
)
)
{
if
(
!
pGallery
->
CreateTheme
(
aThemeName
)
)
{
fprintf
(
stderr
,
"Failed to create theme
\n
"
);
fprintf
(
stderr
,
"Failed to create theme
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
...
@@ -131,7 +131,7 @@ static int PrintHelp()
...
@@ -131,7 +131,7 @@ static int PrintHelp()
fprintf
(
stdout
,
"Utility to generate LibreOffice gallery files
\n\n
"
);
fprintf
(
stdout
,
"Utility to generate LibreOffice gallery files
\n\n
"
);
fprintf
(
stdout
,
"using: gengal --name <name> --path <dir> [ --destdir <path> ]
\n
"
);
fprintf
(
stdout
,
"using: gengal --name <name> --path <dir> [ --destdir <path> ]
\n
"
);
fprintf
(
stdout
,
" [
--number-from <num> ] [
files ... ]
\n\n
"
);
fprintf
(
stdout
,
" [ files ... ]
\n\n
"
);
fprintf
(
stdout
,
"options:
\n
"
);
fprintf
(
stdout
,
"options:
\n
"
);
fprintf
(
stdout
,
" --name <theme>
\t\t
defines the user visible name of the created or updated theme.
\n
"
);
fprintf
(
stdout
,
" --name <theme>
\t\t
defines the user visible name of the created or updated theme.
\n
"
);
...
@@ -145,7 +145,6 @@ static int PrintHelp()
...
@@ -145,7 +145,6 @@ static int PrintHelp()
fprintf
(
stdout
,
" --relative-urls
\t\t
flags that after removing the destdir, the URL should be a path relative to the gallery folder in the install
\n
"
);
fprintf
(
stdout
,
" --relative-urls
\t\t
flags that after removing the destdir, the URL should be a path relative to the gallery folder in the install
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
primarily used for internal gallery generation at compile time.
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
primarily used for internal gallery generation at compile time.
\n
"
);
fprintf
(
stdout
,
" --number-from <num>
\t
defines minimal number for the newly created gallery
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
theme files.
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
theme files.
\n
"
);
fprintf
(
stdout
,
" files
\t\t\t
lists files to be added to the gallery. Absolute paths
\n
"
);
fprintf
(
stdout
,
" files
\t\t\t
lists files to be added to the gallery. Absolute paths
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
are required.
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
are required.
\n
"
);
...
@@ -206,7 +205,6 @@ int GalApp::Main()
...
@@ -206,7 +205,6 @@ int GalApp::Main()
{
{
OUString
aPath
,
aDestDir
;
OUString
aPath
,
aDestDir
;
OUString
aName
(
"Default name"
);
OUString
aName
(
"Default name"
);
sal_uInt32
nNumFrom
=
0
;
FileNameList
aFiles
;
FileNameList
aFiles
;
for
(
sal_uInt32
i
=
0
;
i
<
GetCommandLineParamCount
();
i
++
)
for
(
sal_uInt32
i
=
0
;
i
<
GetCommandLineParamCount
();
i
++
)
...
@@ -231,7 +229,8 @@ int GalApp::Main()
...
@@ -231,7 +229,8 @@ int GalApp::Main()
else
if
(
aParam
==
"--relative-urls"
)
else
if
(
aParam
==
"--relative-urls"
)
mbRelativeURLs
=
true
;
mbRelativeURLs
=
true
;
else
if
(
aParam
==
"--number-from"
)
else
if
(
aParam
==
"--number-from"
)
nNumFrom
=
GetCommandLineParam
(
++
i
).
ToInt32
();
fprintf
(
stderr
,
"--number-from is deprecated, themes now "
"have filenames based on their names
\n
"
);
else
else
aFiles
.
push_back
(
Smartify
(
aParam
)
);
aFiles
.
push_back
(
Smartify
(
aParam
)
);
}
}
...
@@ -239,7 +238,7 @@ int GalApp::Main()
...
@@ -239,7 +238,7 @@ int GalApp::Main()
if
(
aFiles
.
size
()
<
1
)
if
(
aFiles
.
size
()
<
1
)
return
PrintHelp
();
return
PrintHelp
();
createTheme
(
aName
,
aPath
,
aDestDir
,
nNumFrom
,
aFiles
,
mbRelativeURLs
);
createTheme
(
aName
,
aPath
,
aDestDir
,
aFiles
,
mbRelativeURLs
);
// Without this we get extraordinary crashes from the
// Without this we get extraordinary crashes from the
// drawinglayer VirtualDevice cache when importing svg
// drawinglayer VirtualDevice cache when importing svg
...
...
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