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
73f4b3a3
Kaydet (Commit)
73f4b3a3
authored
Haz 08, 2010
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge DEV300_m81
üst
e03596ea
bc51c50b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
163 deletions
+110
-163
build.lst
sfx2/prj/build.lst
+1
-0
makefile.mk
sfx2/qa/cppunit/makefile.mk
+74
-0
test_metadatable.cxx
sfx2/qa/cppunit/test_metadatable.cxx
+0
-0
version.map
sfx2/qa/cppunit/version.map
+34
-0
Metadatable.cxx
sfx2/source/doc/Metadatable.cxx
+0
-162
valueproperties.cxx
xmloff/source/forms/valueproperties.cxx
+1
-1
No files found.
sfx2/prj/build.lst
Dosyayı görüntüle @
73f4b3a3
...
...
@@ -22,3 +22,4 @@ sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL
sf sfx2\workben\custompanel nmake - all sf_wb_custompanel NULL
sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL
sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL
sf sfx2\qa\cppunit nmake - all sf_qa_cppunit sf_util NULL
sfx2/qa/cppunit/makefile.mk
0 → 100644
Dosyayı görüntüle @
73f4b3a3
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ
=
../..
PRJNAME
=
sfx2
TARGET
=
qa_cppunit
ENABLE_EXCEPTIONS
=
TRUE
# --- Settings -----------------------------------------------------
.INCLUDE
:
settings.mk
CFLAGSCXX
+=
$(CPPUNIT_CFLAGS)
DLLPRE
=
# no leading "lib" on .so files
# --- Libs ---------------------------------------------------------
SHL1OBJS
=
\
$(SLO)
/test_metadatable.obj
\
SHL1STDLIBS
=
\
$(CPPUNITLIB)
\
$(SALLIB)
\
$(CPPULIB)
\
$(CPPUHELPERLIB)
\
$(VCLLIB)
\
$(SFXLIB)
\
SHL1TARGET
=
test_metadatable
SHL1RPATH
=
NONE
SHL1IMPLIB
=
i
$(SHL1TARGET)
# SHL1DEF= $(MISC)/$(SHL1TARGET).def
DEF1NAME
=
$(SHL1TARGET)
# DEF1EXPORTFILE= export.exp
SHL1VERSIONMAP
=
version.map
# --- All object files ---------------------------------------------
SLOFILES
=
\
$(SHL1OBJS)
\
# --- Targets ------------------------------------------------------
.INCLUDE
:
target.mk
.INCLUDE
:
_cppunit.mk
sfx2/qa/cppunit/test_metadatable.cxx
0 → 100644
Dosyayı görüntüle @
73f4b3a3
This diff is collapsed.
Click to expand it.
sfx2/qa/cppunit/version.map
0 → 100644
Dosyayı görüntüle @
73f4b3a3
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
UDK_3_0_0 {
global:
cppunitTestPlugIn;
local:
*;
};
sfx2/source/doc/Metadatable.cxx
Dosyayı görüntüle @
73f4b3a3
...
...
@@ -1682,168 +1682,6 @@ throw (uno::RuntimeException)
#if OSL_DEBUG_LEVEL > 1
static
::
sfx2
::
XmlIdRegistryDocument
s_Reg
;
static
::
sfx2
::
XmlIdRegistryClipboard
s_RegClip
;
class
MockMetadatable
:
public
::
sfx2
::
Metadatable
{
public
:
MockMetadatable
(
bool
i_isInClip
=
false
)
:
m_bInClipboard
(
i_isInClip
),
m_bInUndo
(
false
),
m_bInContent
(
true
)
{}
bool
m_bInClipboard
;
bool
m_bInUndo
;
bool
m_bInContent
;
virtual
bool
IsInClipboard
()
const
{
return
m_bInClipboard
;
}
virtual
bool
IsInUndo
()
const
{
return
m_bInUndo
;
}
virtual
bool
IsInContent
()
const
{
return
m_bInContent
;
}
virtual
::
sfx2
::
XmlIdRegistry
&
GetRegistry
()
{
return
m_bInClipboard
?
static_cast
<
::
sfx2
::
XmlIdRegistry
&>
(
s_RegClip
)
:
static_cast
<
::
sfx2
::
XmlIdRegistry
&>
(
s_Reg
);
}
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
rdf
::
XMetadatable
>
MakeUnoObject
()
{
return
0
;
}
};
bool
operator
==
(
beans
::
StringPair
p1
,
beans
::
StringPair
p2
)
{
return
p1
.
First
==
p2
.
First
&&
p1
.
Second
==
p2
.
Second
;
}
void
test
()
{
OSL_TRACE
(
"SwMetadatable test(): start
\n
"
);
MockMetadatable
m1
;
MockMetadatable
m2
;
MockMetadatable
m3
;
MockMetadatable
m4
;
MockMetadatable
m5
;
::
rtl
::
OUString
empty
;
::
rtl
::
OUString
content
(
::
rtl
::
OUString
::
createFromAscii
(
"content.xml"
)
);
::
rtl
::
OUString
styles
(
::
rtl
::
OUString
::
createFromAscii
(
"styles.xml"
)
);
::
rtl
::
OUString
sid1
(
::
rtl
::
OUString
::
createFromAscii
(
"id1"
)
);
::
rtl
::
OUString
sid2
(
::
rtl
::
OUString
::
createFromAscii
(
"id2"
)
);
::
rtl
::
OUString
sid3
(
::
rtl
::
OUString
::
createFromAscii
(
"id3"
)
);
::
rtl
::
OUString
sid4
(
::
rtl
::
OUString
::
createFromAscii
(
"id4"
)
);
beans
::
StringPair
id1
(
content
,
sid1
);
beans
::
StringPair
id2
(
content
,
sid2
);
beans
::
StringPair
id3
(
content
,
sid3
);
beans
::
StringPair
id4
(
styles
,
sid4
);
beans
::
StringPair
id3e
(
empty
,
sid3
);
beans
::
StringPair
id4e
(
empty
,
sid4
);
m1
.
SetMetadataReference
(
id1
);
OSL_ENSURE
(
m1
.
GetMetadataReference
()
==
id1
,
"set failed"
);
try
{
m2
.
SetMetadataReference
(
id1
);
OSL_ENSURE
(
false
,
"set duplicate succeeded"
);
}
catch
(
lang
::
IllegalArgumentException
)
{
}
m1
.
SetMetadataReference
(
id1
);
OSL_ENSURE
(
m1
.
GetMetadataReference
()
==
id1
,
"set failed (existing)"
);
m1
.
EnsureMetadataReference
();
OSL_ENSURE
(
m1
.
GetMetadataReference
()
==
id1
,
"ensure failed (existing)"
);
m2
.
EnsureMetadataReference
();
beans
::
StringPair
m2id
(
m2
.
GetMetadataReference
());
OSL_ENSURE
(
m2id
.
Second
.
getLength
(),
"ensure failed"
);
m2
.
EnsureMetadataReference
();
OSL_ENSURE
(
m2
.
GetMetadataReference
()
==
m2id
,
"ensure failed (idempotent)"
);
m1
.
m_bInUndo
=
true
;
OSL_ENSURE
(
!
m1
.
GetMetadataReference
().
Second
.
getLength
(),
"move to undo failed"
);
m1
.
m_bInUndo
=
false
;
OSL_ENSURE
(
m1
.
GetMetadataReference
()
==
id1
,
"move from undo failed"
);
m1
.
m_bInUndo
=
true
;
try
{
m2
.
SetMetadataReference
(
id1
);
// steal!
}
catch
(
lang
::
IllegalArgumentException
&
)
{
OSL_ENSURE
(
false
,
"set duplicate to undo failed"
);
}
m1
.
m_bInUndo
=
false
;
OSL_ENSURE
(
!
m1
.
GetMetadataReference
().
Second
.
getLength
(),
"move from undo: duplicate"
);
m3
.
RegisterAsCopyOf
(
m2
);
OSL_ENSURE
(
m2
.
GetMetadataReference
()
==
id1
,
"copy: source"
);
OSL_ENSURE
(
!
m3
.
GetMetadataReference
().
Second
.
getLength
(),
"copy: duplicate"
);
m4
.
RegisterAsCopyOf
(
m3
);
OSL_ENSURE
(
m2
.
GetMetadataReference
()
==
id1
,
"copy: source"
);
OSL_ENSURE
(
!
m3
.
GetMetadataReference
().
Second
.
getLength
(),
"copy: duplicate"
);
OSL_ENSURE
(
!
m4
.
GetMetadataReference
().
Second
.
getLength
(),
"copy: duplicate"
);
m2
.
m_bInUndo
=
true
;
OSL_ENSURE
(
m3
.
GetMetadataReference
()
==
id1
,
"duplicate to undo"
);
OSL_ENSURE
(
!
m2
.
GetMetadataReference
().
Second
.
getLength
(),
"duplicate to undo"
);
m2
.
m_bInUndo
=
false
;
OSL_ENSURE
(
m2
.
GetMetadataReference
()
==
id1
,
"duplicate from undo"
);
OSL_ENSURE
(
!
m3
.
GetMetadataReference
().
Second
.
getLength
(),
"duplicate from undo"
);
m4
.
EnsureMetadataReference
();
// new!
beans
::
StringPair
m4id
(
m4
.
GetMetadataReference
());
OSL_ENSURE
(
m4id
.
Second
.
getLength
()
&&
!
(
m4id
==
id1
),
"ensure on duplicate"
);
MockMetadatable
mc1
(
true
);
// in clipboard
MockMetadatable
mc2
(
true
);
MockMetadatable
mc3
(
true
);
MockMetadatable
mc4
(
true
);
MockMetadatable
m2p
;
MockMetadatable
m3p
;
mc1
.
SetMetadataReference
(
id2
);
OSL_ENSURE
(
mc1
.
GetMetadataReference
()
==
id2
,
"set failed"
);
try
{
mc2
.
SetMetadataReference
(
id2
);
OSL_ENSURE
(
false
,
"set duplicate succeeded"
);
}
catch
(
lang
::
IllegalArgumentException
)
{
}
mc1
.
SetMetadataReference
(
id2
);
OSL_ENSURE
(
mc1
.
GetMetadataReference
()
==
id2
,
"set failed (existing)"
);
mc1
.
EnsureMetadataReference
();
OSL_ENSURE
(
mc1
.
GetMetadataReference
()
==
id2
,
"ensure failed (existing)"
);
mc2
.
EnsureMetadataReference
();
beans
::
StringPair
mc2id
(
mc2
.
GetMetadataReference
());
OSL_ENSURE
(
mc2id
.
Second
.
getLength
(),
"ensure failed"
);
mc2
.
EnsureMetadataReference
();
OSL_ENSURE
(
mc2
.
GetMetadataReference
()
==
mc2id
,
"ensure failed (idempotent)"
);
mc2
.
RemoveMetadataReference
();
OSL_ENSURE
(
!
mc2
.
GetMetadataReference
().
Second
.
getLength
(),
"remove failed"
);
// set up mc2 as copy of m2 and mc3 as copy of m3
mc3
.
RegisterAsCopyOf
(
m3
);
OSL_ENSURE
(
!
mc3
.
GetMetadataReference
().
Second
.
getLength
()
,
"copy to clipboard (latent)"
);
mc2
.
RegisterAsCopyOf
(
m2
);
OSL_ENSURE
(
mc2
.
GetMetadataReference
()
==
id1
,
"copy to clipboard (non-latent)"
);
// paste mc2 to m2p and mc3 to m3p
m2p
.
RegisterAsCopyOf
(
mc2
);
OSL_ENSURE
(
!
m2p
.
GetMetadataReference
().
Second
.
getLength
()
,
"paste from clipboard (non-latent)"
);
m3p
.
RegisterAsCopyOf
(
mc3
);
OSL_ENSURE
(
!
m3p
.
GetMetadataReference
().
Second
.
getLength
()
,
"paste from clipboard (latent)"
);
// delete m2, m2p, m3
m2
.
RemoveMetadataReference
();
OSL_ENSURE
(
!
m2
.
GetMetadataReference
().
Second
.
getLength
(),
"remove failed"
);
OSL_ENSURE
(
m2p
.
GetMetadataReference
()
==
id1
,
"paste-remove (non-latent)"
);
m2p
.
RemoveMetadataReference
();
OSL_ENSURE
(
!
m2p
.
GetMetadataReference
().
Second
.
getLength
(),
"remove failed"
);
OSL_ENSURE
(
m3
.
GetMetadataReference
()
==
id1
,
"paste-remove2 (non-latent)"
);
m3
.
RemoveMetadataReference
();
OSL_ENSURE
(
!
m3
.
GetMetadataReference
().
Second
.
getLength
(),
"remove failed"
);
OSL_ENSURE
(
m3p
.
GetMetadataReference
()
==
id1
,
"paste-remove (latent)"
);
// delete mc2
mc2
.
SetMetadataReference
(
beans
::
StringPair
());
OSL_ENSURE
(
!
mc3
.
GetMetadataReference
().
Second
.
getLength
()
,
"in clipboard becomes non-latent"
);
// paste mc2
m2p
.
RegisterAsCopyOf
(
mc2
);
OSL_ENSURE
(
!
m2p
.
GetMetadataReference
().
Second
.
getLength
(),
"remove-paste"
);
OSL_ENSURE
(
m3p
.
GetMetadataReference
()
==
id1
,
"remove-paste (stolen)"
);
// auto-detect stream
m5
.
SetMetadataReference
(
id3e
);
OSL_ENSURE
(
m5
.
GetMetadataReference
()
==
id3
,
"auto-detect (content)"
);
m5
.
m_bInContent
=
false
;
m5
.
SetMetadataReference
(
id4e
);
OSL_ENSURE
(
m5
.
GetMetadataReference
()
==
id4
,
"auto-detect (styles)"
);
OSL_TRACE
(
"sfx2::Metadatable test(): finished
\n
"
);
}
struct
Test
{
Test
()
{
test
();
}
};
static
Test
s_test
;
#include <stdio.h>
static
void
dump
(
sfx2
::
XmlIdList_t
*
pList
)
...
...
xmloff/source/forms/valueproperties.cxx
Dosyayı görüntüle @
73f4b3a3
...
...
@@ -116,7 +116,7 @@ namespace xmloff
void
OValuePropertiesMetaData
::
getValueLimitPropertyNames
(
sal_Int16
_nFormComponentType
,
sal_Char
const
*
&
_rpMinValuePropertyName
,
sal_Char
const
*
&
_rpMaxValuePropertyName
)
{
_rpMinValuePropertyName
=
_rpM
in
ValuePropertyName
=
NULL
;
_rpMinValuePropertyName
=
_rpM
ax
ValuePropertyName
=
NULL
;
switch
(
_nFormComponentType
)
{
case
FormComponentType
:
:
DATEFIELD
:
...
...
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