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
bb6b011f
Kaydet (Commit)
bb6b011f
authored
May 08, 2013
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gengal: impl. relative URL pieces for internal galleries.
Change-Id: Ia44ad61e549e45ee2f4b8425023ed3e014fe2035
üst
1546c293
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
galtheme.cxx
svx/source/gallery2/galtheme.cxx
+9
-2
gengal.cxx
svx/source/gengal/gengal.cxx
+16
-5
No files found.
svx/source/gallery2/galtheme.cxx
Dosyayı görüntüle @
bb6b011f
...
...
@@ -1371,7 +1371,15 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
}
}
aPath
.
SearchAndReplace
(
m_aDestDir
,
String
());
if
(
m_aDestDir
.
Len
()
>
0
)
{
if
(
aPath
.
SearchAndReplace
(
m_aDestDir
,
String
())
!=
STRING_NOTFOUND
)
bRel
=
m_bDestDirRelative
;
else
SAL_WARN
(
"svx"
,
"failed to replace destdir of '"
<<
m_aDestDir
<<
"' in '"
<<
aPath
<<
"'"
);
}
rOStm
<<
bRel
;
write_lenPrefixed_uInt8s_FromOUString
<
sal_uInt16
>
(
rOStm
,
aPath
,
RTL_TEXTENCODING_UTF8
);
rOStm
<<
pObj
->
nOffset
<<
(
sal_uInt16
)
pObj
->
eObjKind
;
...
...
@@ -1505,7 +1513,6 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
}
}
}
aObjectList
.
push_back
(
pObj
);
}
...
...
svx/source/gengal/gengal.cxx
Dosyayı görüntüle @
bb6b011f
...
...
@@ -42,8 +42,9 @@ typedef ::std::list<OUString> FileNameList;
class
GalApp
:
public
Application
{
bool
mbInBuildTree
;
bool
mbRelativeURLs
;
public
:
GalApp
()
:
mbInBuildTree
(
false
)
{}
GalApp
()
:
mbInBuildTree
(
false
)
,
mbRelativeURLs
(
false
)
{}
virtual
int
Main
();
protected
:
...
...
@@ -63,7 +64,7 @@ void disposeGallery( Gallery* pGallery )
static
void
createTheme
(
OUString
aThemeName
,
OUString
aGalleryURL
,
OUString
aDestDir
,
sal_uInt32
nNumFrom
,
FileNameList
&
rFiles
)
FileNameList
&
rFiles
,
bool
bRelativeURLs
)
{
Gallery
*
pGallery
;
...
...
@@ -99,7 +100,7 @@ static void createTheme( OUString aThemeName, OUString aGalleryURL,
fprintf
(
stderr
,
"Using DestDir: %s
\n
"
,
OUStringToOString
(
aDestDir
,
RTL_TEXTENCODING_UTF8
).
getStr
()
);
pGalTheme
->
SetDestDir
(
String
(
aDestDir
)
);
pGalTheme
->
SetDestDir
(
String
(
aDestDir
),
bRelativeURLs
);
FileNameList
::
const_iterator
aIter
;
...
...
@@ -134,11 +135,16 @@ static int PrintHelp()
fprintf
(
stdout
,
"options:
\n
"
);
fprintf
(
stdout
,
" --name <theme>
\t\t
defines the user visible name of the created or updated theme.
\n
"
);
fprintf
(
stdout
,
" --path <dir>
\t\t
defines directory where the gallery files are created
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
or updated.
\n
"
);
fprintf
(
stdout
,
" --destdir <dir>
\t
defines a path prefix to be removed from the paths
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
stored in the gallery files. It is useful to create
\n
"
);
fprintf
(
stdout
,
"
\t\t\t
RPM packages using the BuildRoot feature.
\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
,
" --number-from <num>
\t
defines minimal number for the newly created gallery
\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
"
);
...
...
@@ -212,15 +218,20 @@ int GalApp::Main()
else
if
(
aParam
==
"--help"
||
aParam
==
"-h"
)
return
PrintHelp
();
else
if
(
aParam
==
"--build-tree"
)
{
mbRelativeURLs
=
true
;
mbInBuildTree
=
true
;
}
else
if
(
aParam
==
"--name"
)
aName
=
GetCommandLineParam
(
++
i
);
else
if
(
aParam
==
"--path"
)
aPath
=
Smartify
(
GetCommandLineParam
(
++
i
)
);
else
if
(
aParam
==
"--destdir"
)
aDestDir
=
GetCommandLineParam
(
++
i
);
else
if
(
aParam
==
"--relative-urls"
)
mbRelativeURLs
=
true
;
else
if
(
aParam
==
"--number-from"
)
nNumFrom
=
GetCommandLineParam
(
++
i
).
ToInt32
();
nNumFrom
=
GetCommandLineParam
(
++
i
).
ToInt32
();
else
aFiles
.
push_back
(
Smartify
(
aParam
)
);
}
...
...
@@ -228,7 +239,7 @@ int GalApp::Main()
if
(
aFiles
.
size
()
<
1
)
return
PrintHelp
();
createTheme
(
aName
,
aPath
,
aDestDir
,
nNumFrom
,
aFiles
);
createTheme
(
aName
,
aPath
,
aDestDir
,
nNumFrom
,
aFiles
,
mbRelativeURLs
);
// Without this we get extraordinary crashes from the
// 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