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
313b8b0d
Kaydet (Commit)
313b8b0d
authored
Eyl 10, 2011
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
initial DocumentSettingsSerializer interface impl.
üst
cbcfda9b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
2 deletions
+105
-2
build.lst
sd/prj/build.lst
+1
-1
UnoDocumentSettings.cxx
sd/source/ui/unoidl/UnoDocumentSettings.cxx
+31
-1
Package_inc.mk
xmloff/Package_inc.mk
+1
-0
settingsstore.hxx
xmloff/inc/xmloff/settingsstore.hxx
+56
-0
sdxmlexp.cxx
xmloff/source/draw/sdxmlexp.cxx
+5
-0
sdxmlimp.cxx
xmloff/source/draw/sdxmlimp.cxx
+11
-0
No files found.
sd/prj/build.lst
Dosyayı görüntüle @
313b8b0d
sd sd : filter TRANSLATIONS:translations animations svx sfx2 stoc canvas LIBXSLT:libxslt oox ure test NULL
sd sd : filter TRANSLATIONS:translations animations svx sfx2 stoc canvas LIBXSLT:libxslt oox ure test
xmloff
NULL
sd sd usr1 - all sd_mkout NULL
sd sd usr1 - all sd_mkout NULL
sd sd\prj nmake - all sd_prj NULL
sd sd\prj nmake - all sd_prj NULL
sd/source/ui/unoidl/UnoDocumentSettings.cxx
Dosyayı görüntüle @
313b8b0d
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
#include "../inc/ViewShell.hxx"
#include "../inc/ViewShell.hxx"
#include "../inc/FrameView.hxx"
#include "../inc/FrameView.hxx"
#include "Outliner.hxx"
#include "Outliner.hxx"
#include <xmloff/settingsstore.hxx>
#include <editeng/editstat.hxx>
#include <editeng/editstat.hxx>
#include <svx/unoapi.hxx>
#include <svx/unoapi.hxx>
...
@@ -78,7 +79,8 @@ using namespace ::com::sun::star::i18n;
...
@@ -78,7 +79,8 @@ using namespace ::com::sun::star::i18n;
namespace
sd
namespace
sd
{
{
class
DocumentSettings
:
public
WeakImplHelper3
<
XPropertySet
,
XMultiPropertySet
,
XServiceInfo
>
,
class
DocumentSettings
:
public
WeakImplHelper3
<
XPropertySet
,
XMultiPropertySet
,
XServiceInfo
>
,
public
comphelper
::
PropertySetHelper
public
comphelper
::
PropertySetHelper
,
public
DocumentSettingsSerializer
{
{
public
:
public
:
DocumentSettings
(
SdXImpressDocument
*
pModel
);
DocumentSettings
(
SdXImpressDocument
*
pModel
);
...
@@ -110,6 +112,14 @@ namespace sd
...
@@ -110,6 +112,14 @@ namespace sd
virtual
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
ServiceName
)
throw
(
RuntimeException
);
virtual
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
ServiceName
)
throw
(
RuntimeException
);
virtual
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
(
)
throw
(
RuntimeException
);
virtual
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
(
)
throw
(
RuntimeException
);
// DocumentSettingsSerializer cf. xmloff
virtual
uno
::
Sequence
<
beans
::
PropertyValue
>
filterStreamsFromStorage
(
const
uno
::
Reference
<
embed
::
XStorage
>
&
xStorage
,
const
uno
::
Sequence
<
beans
::
PropertyValue
>&
aConfigProps
);
virtual
uno
::
Sequence
<
beans
::
PropertyValue
>
filterStreamsToStorage
(
const
uno
::
Reference
<
embed
::
XStorage
>
&
xStorage
,
const
uno
::
Sequence
<
beans
::
PropertyValue
>&
aConfigProps
);
protected
:
protected
:
virtual
void
_setPropertyValues
(
const
comphelper
::
PropertyMapEntry
**
ppEntries
,
const
::
com
::
sun
::
star
::
uno
::
Any
*
pValues
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
beans
::
PropertyVetoException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
);
virtual
void
_setPropertyValues
(
const
comphelper
::
PropertyMapEntry
**
ppEntries
,
const
::
com
::
sun
::
star
::
uno
::
Any
*
pValues
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
beans
::
PropertyVetoException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
);
virtual
void
_getPropertyValues
(
const
comphelper
::
PropertyMapEntry
**
ppEntries
,
::
com
::
sun
::
star
::
uno
::
Any
*
pValue
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
);
virtual
void
_getPropertyValues
(
const
comphelper
::
PropertyMapEntry
**
ppEntries
,
::
com
::
sun
::
star
::
uno
::
Any
*
pValue
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
);
...
@@ -279,6 +289,26 @@ void DocumentSettings::AssignURL( XPropertyListType t, const Any* pValue, bool *
...
@@ -279,6 +289,26 @@ void DocumentSettings::AssignURL( XPropertyListType t, const Any* pValue, bool *
delete
pList
;
delete
pList
;
}
}
uno
::
Sequence
<
beans
::
PropertyValue
>
DocumentSettings
::
filterStreamsFromStorage
(
const
uno
::
Reference
<
embed
::
XStorage
>
&
xStorage
,
const
uno
::
Sequence
<
beans
::
PropertyValue
>&
aConfigProps
)
{
(
void
)
xStorage
;
// fprintf( stderr, "filter streams from storage\n" );
return
aConfigProps
;
}
uno
::
Sequence
<
beans
::
PropertyValue
>
DocumentSettings
::
filterStreamsToStorage
(
const
uno
::
Reference
<
embed
::
XStorage
>
&
xStorage
,
const
uno
::
Sequence
<
beans
::
PropertyValue
>&
aConfigProps
)
{
(
void
)
xStorage
;
// fprintf( stderr, "filter streams to storage\n" );
return
aConfigProps
;
}
void
DocumentSettings
::
_setPropertyValues
(
const
PropertyMapEntry
**
ppEntries
,
const
Any
*
pValues
)
throw
(
UnknownPropertyException
,
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
)
void
DocumentSettings
::
_setPropertyValues
(
const
PropertyMapEntry
**
ppEntries
,
const
Any
*
pValues
)
throw
(
UnknownPropertyException
,
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
)
{
{
::
SolarMutexGuard
aGuard
;
::
SolarMutexGuard
aGuard
;
...
...
xmloff/Package_inc.mk
Dosyayı görüntüle @
313b8b0d
...
@@ -85,6 +85,7 @@ $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/numehelp.hxx,xmloff/nume
...
@@ -85,6 +85,7 @@ $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/numehelp.hxx,xmloff/nume
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/odffields.hxx,xmloff/odffields.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/odffields.hxx,xmloff/odffields.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prhdlfac.hxx,xmloff/prhdlfac.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prhdlfac.hxx,xmloff/prhdlfac.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prstylei.hxx,xmloff/prstylei.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prstylei.hxx,xmloff/prstylei.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/settingsstore.hxx,xmloff/settingsstore.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeexport.hxx,xmloff/shapeexport.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeexport.hxx,xmloff/shapeexport.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeimport.hxx,xmloff/shapeimport.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeimport.hxx,xmloff/shapeimport.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/styleexp.hxx,xmloff/styleexp.hxx))
$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/styleexp.hxx,xmloff/styleexp.hxx))
...
...
xmloff/inc/xmloff/settingsstore.hxx
0 → 100644
Dosyayı görüntüle @
313b8b0d
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2011 Novell, Inc. <michael.meeks@novell.com> (initial developer)
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
// Simple interface to allow serialization of document settings
#ifndef _XMLOFF_SETTINGS_STORE_HXX
#define _XMLOFF_SETTINGS_STORE_HXX
#include <vector>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/embed/XStorage.hpp>
// Scans list of properties for certain URL properties that could refer
// to internal objects, and initializes from these.
class
DocumentSettingsSerializer
{
public
:
// Import objects and update properties (eliding URLs)
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
filterStreamsFromStorage
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
embed
::
XStorage
>
&
xStorage
,
const
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>&
aConfigProps
)
=
0
;
// Export objects and update properties with relative URLs into this storage
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
filterStreamsToStorage
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
embed
::
XStorage
>
&
xStorage
,
const
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>&
aConfigProps
)
=
0
;
};
#endif // _XMLOFF_SETTINGS_STORE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
xmloff/source/draw/sdxmlexp.cxx
Dosyayı görüntüle @
313b8b0d
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
#include <xmloff/xmlaustp.hxx>
#include <xmloff/xmlaustp.hxx>
#include <xmloff/families.hxx>
#include <xmloff/families.hxx>
#include <xmloff/styleexp.hxx>
#include <xmloff/styleexp.hxx>
#include <xmloff/settingsstore.hxx>
#include "sdpropls.hxx"
#include "sdpropls.hxx"
#include <xmloff/xmlexppr.hxx>
#include <xmloff/xmlexppr.hxx>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
...
@@ -2654,6 +2655,10 @@ void SdXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&
...
@@ -2654,6 +2655,10 @@ void SdXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&
Reference
<
beans
::
XPropertySet
>
xProps
(
xFac
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.document.Settings"
)
)
),
UNO_QUERY
);
Reference
<
beans
::
XPropertySet
>
xProps
(
xFac
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.document.Settings"
)
)
),
UNO_QUERY
);
if
(
xProps
.
is
()
)
if
(
xProps
.
is
()
)
SvXMLUnitConverter
::
convertPropertySet
(
rProps
,
xProps
);
SvXMLUnitConverter
::
convertPropertySet
(
rProps
,
xProps
);
DocumentSettingsSerializer
*
pFilter
;
pFilter
=
dynamic_cast
<
DocumentSettingsSerializer
*>
(
xProps
.
get
());
if
(
pFilter
)
rProps
=
pFilter
->
filterStreamsToStorage
(
GetTargetStorage
(),
rProps
);
}
}
}
}
...
...
xmloff/source/draw/sdxmlimp.cxx
Dosyayı görüntüle @
313b8b0d
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#include <xmloff/xmlexppr.hxx>
#include <xmloff/xmlexppr.hxx>
#include "xmloff/xmlerror.hxx"
#include "xmloff/xmlerror.hxx"
#include <tools/debug.hxx>
#include <tools/debug.hxx>
#include <xmloff/settingsstore.hxx>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <xmloff/XMLFontStylesContext.hxx>
#include <xmloff/XMLFontStylesContext.hxx>
...
@@ -925,6 +926,16 @@ void SdXMLImport::SetConfigurationSettings(const com::sun::star::uno::Sequence<c
...
@@ -925,6 +926,16 @@ void SdXMLImport::SetConfigurationSettings(const com::sun::star::uno::Sequence<c
sal_Int32
nCount
=
aConfigProps
.
getLength
();
sal_Int32
nCount
=
aConfigProps
.
getLength
();
const
beans
::
PropertyValue
*
pValues
=
aConfigProps
.
getConstArray
();
const
beans
::
PropertyValue
*
pValues
=
aConfigProps
.
getConstArray
();
DocumentSettingsSerializer
*
pFilter
;
pFilter
=
dynamic_cast
<
DocumentSettingsSerializer
*>
(
xProps
.
get
());
uno
::
Sequence
<
beans
::
PropertyValue
>
aFiltered
;
if
(
pFilter
)
{
aFiltered
=
pFilter
->
filterStreamsFromStorage
(
GetSourceStorage
(),
aConfigProps
);
nCount
=
aFiltered
.
getLength
();
pValues
=
aFiltered
.
getConstArray
();
}
while
(
nCount
--
)
while
(
nCount
--
)
{
{
try
try
...
...
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