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
ecbea5fa
Kaydet (Commit)
ecbea5fa
authored
Nis 14, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement RTF import of zoom level
üst
69805b85
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
3 deletions
+25
-3
CppunitTest_sw_subsequent_rtftok.mk
sw/CppunitTest_sw_subsequent_rtftok.mk
+1
-0
zoom.rtf
sw/qa/extras/rtftok/data/zoom.rtf
+1
-0
rtftok.cxx
sw/qa/extras/rtftok/rtftok.cxx
+15
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+5
-2
rtfdocumentimpl.hxx
writerfilter/source/rtftok/rtfdocumentimpl.hxx
+3
-1
No files found.
sw/CppunitTest_sw_subsequent_rtftok.mk
Dosyayı görüntüle @
ecbea5fa
...
@@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_subsequent_rtftok,\
...
@@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_subsequent_rtftok,\
$(eval $(call gb_CppunitTest_use_ure,sw_subsequent_rtftok))
$(eval $(call gb_CppunitTest_use_ure,sw_subsequent_rtftok))
$(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtftok,\
$(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtftok,\
comphelper/util/comphelp \
configmgr/source/configmgr \
configmgr/source/configmgr \
fileaccess/source/fileacc \
fileaccess/source/fileacc \
filter/source/config/cache/filterconfig1 \
filter/source/config/cache/filterconfig1 \
...
...
sw/qa/extras/rtftok/data/zoom.rtf
0 → 100644
Dosyayı görüntüle @
ecbea5fa
{\rtf1\viewscale42 Hello world!\par}
sw/qa/extras/rtftok/rtftok.cxx
Dosyayı görüntüle @
ecbea5fa
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <rtl/oustringostreaminserter.hxx>
#include <rtl/oustringostreaminserter.hxx>
#include <test/bootstrapfixture.hxx>
#include <test/bootstrapfixture.hxx>
...
@@ -80,6 +81,7 @@ public:
...
@@ -80,6 +81,7 @@ public:
void
testFdo47107
();
void
testFdo47107
();
void
testFdo45182
();
void
testFdo45182
();
void
testFdo44176
();
void
testFdo44176
();
void
testZoom
();
CPPUNIT_TEST_SUITE
(
RtfModelTest
);
CPPUNIT_TEST_SUITE
(
RtfModelTest
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -102,6 +104,7 @@ public:
...
@@ -102,6 +104,7 @@ public:
CPPUNIT_TEST
(
testFdo47107
);
CPPUNIT_TEST
(
testFdo47107
);
CPPUNIT_TEST
(
testFdo45182
);
CPPUNIT_TEST
(
testFdo45182
);
CPPUNIT_TEST
(
testFdo44176
);
CPPUNIT_TEST
(
testFdo44176
);
CPPUNIT_TEST
(
testZoom
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -533,6 +536,18 @@ void RtfModelTest::testFdo44176()
...
@@ -533,6 +536,18 @@ void RtfModelTest::testFdo44176()
CPPUNIT_ASSERT_EQUAL
(
nFirstTop
,
nDefaultTop
+
nDefaultHeader
);
CPPUNIT_ASSERT_EQUAL
(
nFirstTop
,
nDefaultTop
+
nDefaultHeader
);
}
}
void
RtfModelTest
::
testZoom
()
{
load
(
"zoom.rtf"
);
uno
::
Reference
<
frame
::
XModel
>
xModel
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
view
::
XViewSettingsSupplier
>
xViewSettingsSupplier
(
xModel
->
getCurrentController
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xViewSettingsSupplier
->
getViewSettings
());
sal_Int16
nValue
=
0
;
xPropertySet
->
getPropertyValue
(
"ZoomValue"
)
>>=
nValue
;
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
42
),
nValue
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
RtfModelTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
RtfModelTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
ecbea5fa
...
@@ -253,6 +253,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x
...
@@ -253,6 +253,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x
m_bNeedCr
(
false
),
m_bNeedCr
(
false
),
m_bNeedPar
(
true
),
m_bNeedPar
(
true
),
m_aListTableSprms
(),
m_aListTableSprms
(),
m_aSettingsTableAttributes
(),
m_aSettingsTableSprms
(),
m_aSettingsTableSprms
(),
m_xStorage
(),
m_xStorage
(),
m_aTableBuffer
(),
m_aTableBuffer
(),
...
@@ -374,8 +375,7 @@ void RTFDocumentImpl::checkFirstRun()
...
@@ -374,8 +375,7 @@ void RTFDocumentImpl::checkFirstRun()
if
(
m_bFirstRun
)
if
(
m_bFirstRun
)
{
{
// output settings table
// output settings table
RTFSprms
aAttributes
;
writerfilter
::
Reference
<
Properties
>::
Pointer_t
const
pProp
(
new
RTFReferenceProperties
(
m_aSettingsTableAttributes
,
m_aSettingsTableSprms
));
writerfilter
::
Reference
<
Properties
>::
Pointer_t
const
pProp
(
new
RTFReferenceProperties
(
aAttributes
,
m_aSettingsTableSprms
));
RTFReferenceTable
::
Entries_t
aSettingsTableEntries
;
RTFReferenceTable
::
Entries_t
aSettingsTableEntries
;
aSettingsTableEntries
.
insert
(
make_pair
(
0
,
pProp
));
aSettingsTableEntries
.
insert
(
make_pair
(
0
,
pProp
));
writerfilter
::
Reference
<
Table
>::
Pointer_t
const
pTable
(
new
RTFReferenceTable
(
aSettingsTableEntries
));
writerfilter
::
Reference
<
Table
>::
Pointer_t
const
pTable
(
new
RTFReferenceTable
(
aSettingsTableEntries
));
...
@@ -2755,6 +2755,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
...
@@ -2755,6 +2755,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
lcl_putNestedSprm
(
m_aStates
.
top
().
aTableSprms
,
NS_ooxml
::
LN_CT_Lvl_rPr
,
NS_sprm
::
LN_CRgFtc0
,
pValue
);
lcl_putNestedSprm
(
m_aStates
.
top
().
aTableSprms
,
NS_ooxml
::
LN_CT_Lvl_rPr
,
NS_sprm
::
LN_CRgFtc0
,
pValue
);
}
}
break
;
break
;
case
RTF_VIEWSCALE
:
m_aSettingsTableAttributes
->
push_back
(
make_pair
(
NS_ooxml
::
LN_CT_Zoom_percent
,
pIntValue
));
break
;
default
:
default
:
SAL_INFO
(
"writerfilter"
,
OSL_THIS_FUNC
<<
": TODO handle value '"
<<
lcl_RtfToString
(
nKeyword
)
<<
"'"
);
SAL_INFO
(
"writerfilter"
,
OSL_THIS_FUNC
<<
": TODO handle value '"
<<
lcl_RtfToString
(
nKeyword
)
<<
"'"
);
aSkip
.
setParsed
(
false
);
aSkip
.
setParsed
(
false
);
...
...
writerfilter/source/rtftok/rtfdocumentimpl.hxx
Dosyayı görüntüle @
ecbea5fa
...
@@ -425,7 +425,9 @@ namespace writerfilter {
...
@@ -425,7 +425,9 @@ namespace writerfilter {
bool
m_bNeedPar
;
bool
m_bNeedPar
;
/// The list table and list override table combined.
/// The list table and list override table combined.
RTFSprms
m_aListTableSprms
;
RTFSprms
m_aListTableSprms
;
/// The settings table.
/// The settings table attributes.
RTFSprms
m_aSettingsTableAttributes
;
/// The settings table sprms.
RTFSprms
m_aSettingsTableSprms
;
RTFSprms
m_aSettingsTableSprms
;
oox
::
StorageRef
m_xStorage
;
oox
::
StorageRef
m_xStorage
;
...
...
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