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
53ece992
Kaydet (Commit)
53ece992
authored
Agu 22, 2016
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
place the calc default style file in the share folder
Change-Id: I1b8bfee1abf82c5a55cbfc5c1674b115cdfe63b8
üst
1c54582a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
33 deletions
+21
-33
Package_res_xml.mk
sc/Package_res_xml.mk
+1
-1
docsh.cxx
sc/source/ui/docshell/docsh.cxx
+11
-16
docsh2.cxx
sc/source/ui/docshell/docsh2.cxx
+9
-16
No files found.
sc/Package_res_xml.mk
Dosyayı görüntüle @
53ece992
...
...
@@ -9,7 +9,7 @@
$(eval $(call gb_Package_Package,sc_res_xml,$(SRCDIR)/sc/res/xml))
$(eval $(call gb_Package_add_files,sc_res_xml,$(LIBO_
BIN_FOLDER)
,\
$(eval $(call gb_Package_add_files,sc_res_xml,$(LIBO_
SHARE_FOLDER)/calc
,\
styles.xml \
))
...
...
sc/source/ui/docshell/docsh.cxx
Dosyayı görüntüle @
53ece992
...
...
@@ -39,6 +39,7 @@
#include <svl/documentlockfile.hxx>
#include <svl/sharecontrolfile.hxx>
#include <svl/urihelper.hxx>
#include <osl/file.hxx>
#include "chgtrack.hxx"
#include "chgviset.hxx"
#include <com/sun/star/awt/Key.hpp>
...
...
@@ -62,6 +63,8 @@
#include <com/sun/star/frame/XStorable2.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <config_folders.h>
#include "scabstdlg.hxx"
#include <sot/formats.hxx>
...
...
@@ -590,29 +593,21 @@ bool ScDocShell::Load( SfxMedium& rMedium )
aDocument
.
GetStyleSheetPool
()
->
CreateStandardStyles
();
aDocument
.
UpdStlShtPtrsFrmNms
();
#if ENABLE_ORCUS
#if ENABLE_ORCUS
/* Create styles that are imported through Orcus */
OUString
aPath
(
"$BRAND_BASE_DIR/"
);
/* Read the comment below before changing this */
rtl
::
Bootstrap
::
expandMacros
(
aPath
);
OUString
aValidPath
;
/* The Following loop trims 'file://' from start of string and
* '../' from the end of string. If you ever happen to change the above macro
* please consider changing the following range too, otherwise app would
* crash!!
*/
for
(
sal_Int32
i
=
7
;
i
<
aPath
.
getLength
()
-
3
;
++
i
)
aValidPath
+=
OUString
(
aPath
[
i
]);
OUString
aURL
(
"$BRAND_BASE_DIR"
LIBO_SHARE_FOLDER
"/calc/styles.xml"
);
rtl
::
Bootstrap
::
expandMacros
(
aURL
);
OUString
a
FileName
=
"styles.xml"
;
aValidPath
+=
aFileName
;
OUString
a
Path
;
osl
::
FileBase
::
getSystemPathFromFileURL
(
aURL
,
aPath
)
;
ScOrcusFilters
*
pOrcus
=
ScFormatFilter
::
Get
().
GetOrcusFilters
();
if
(
!
pOrcus
)
return
false
;
pOrcus
->
importODS_Styles
(
aDocument
,
aValidPath
);
#endif
pOrcus
->
importODS_Styles
(
aDocument
,
aPath
);
#endif
bRet
=
LoadXML
(
&
rMedium
,
nullptr
);
}
...
...
sc/source/ui/docshell/docsh2.cxx
Dosyayı görüntüle @
53ece992
...
...
@@ -19,6 +19,7 @@
#include "scitems.hxx"
#include <rtl/bootstrap.hxx>
#include <osl/file.hxx>
#include <svx/drawitem.hxx>
#include <svl/asiancfg.hxx>
#include <editeng/forbiddencharacterstable.hxx>
...
...
@@ -26,6 +27,7 @@
#include <orcus/orcus_import_ods.hpp>
#include <orcusfiltersimpl.hxx>
#include <config_orcus.h>
#include <config_folders.h>
#include "drwlayer.hxx"
#include "stlpool.hxx"
...
...
@@ -58,29 +60,20 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
aDocument
.
GetStyleSheetPool
()
->
CreateStandardStyles
();
aDocument
.
UpdStlShtPtrsFrmNms
();
#if ENABLE_ORCUS
#if ENABLE_ORCUS
/* Create styles that are imported through Orcus */
OUString
aPath
(
"$BRAND_BASE_DIR/"
);
/* Read the comment below before changing this */
rtl
::
Bootstrap
::
expandMacros
(
aPath
);
OUString
aValidPath
;
OUString
aURL
(
"$BRAND_BASE_DIR/"
LIBO_SHARE_FOLDER
"/calc/styles.xml"
);
rtl
::
Bootstrap
::
expandMacros
(
aURL
);
/* The Following loop trims 'file://' from start of string and
* '../' from the end of string. If you ever happen to change the above macro
* please consider changing the following range too, otherwise app would
* crash!!
*/
for
(
sal_Int32
i
=
7
;
i
<
aPath
.
getLength
()
-
3
;
++
i
)
aValidPath
+=
OUString
(
aPath
[
i
]);
OUString
aFileName
=
"styles.xml"
;
aValidPath
+=
aFileName
;
OUString
aPath
;
osl
::
FileBase
::
getSystemPathFromFileURL
(
aURL
,
aPath
);
ScOrcusFilters
*
pOrcus
=
ScFormatFilter
::
Get
().
GetOrcusFilters
();
if
(
!
pOrcus
)
return
false
;
pOrcus
->
importODS_Styles
(
aDocument
,
a
Valid
Path
);
#endif
pOrcus
->
importODS_Styles
(
aDocument
,
aPath
);
#endif
// SetDocumentModified is not allowed anymore in Load/InitNew!
InitItems
();
...
...
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