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
f1dae10c
Kaydet (Commit)
f1dae10c
authored
May 27, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwXDrawPage::getCount(): ignore textboxes
Change-Id: I579cc0242f6901175162b169813e4465d52952a0
üst
ae59502b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
textboxhelper.hxx
sw/inc/textboxhelper.hxx
+9
-0
textboxhelper.cxx
sw/source/core/doc/textboxhelper.cxx
+30
-0
unodraw.cxx
sw/source/core/unocore/unodraw.cxx
+8
-1
No files found.
sw/inc/textboxhelper.hxx
Dosyayı görüntüle @
f1dae10c
...
@@ -10,10 +10,14 @@
...
@@ -10,10 +10,14 @@
#ifndef INCLUDED_SW_INC_TEXTBOXHELPER_HXX
#ifndef INCLUDED_SW_INC_TEXTBOXHELPER_HXX
#define INCLUDED_SW_INC_TEXTBOXHELPER_HXX
#define INCLUDED_SW_INC_TEXTBOXHELPER_HXX
#include <list>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/uno/Type.h>
#include <com/sun/star/uno/Type.h>
class
SdrPage
;
class
SwFrmFmt
;
class
SwFrmFmt
;
class
SwDoc
;
/**
/**
* A TextBox is a TextFrame, that is tied to a drawinglayer shape.
* A TextBox is a TextFrame, that is tied to a drawinglayer shape.
...
@@ -34,6 +38,11 @@ public:
...
@@ -34,6 +38,11 @@ public:
static
void
syncProperty
(
SwFrmFmt
*
pShape
,
sal_uInt16
nWID
,
sal_uInt8
nMemberID
,
const
OUString
&
rPropertyName
,
const
css
::
uno
::
Any
&
rValue
);
static
void
syncProperty
(
SwFrmFmt
*
pShape
,
sal_uInt16
nWID
,
sal_uInt8
nMemberID
,
const
OUString
&
rPropertyName
,
const
css
::
uno
::
Any
&
rValue
);
/// If we have an associated TextFrame, then return that.
/// If we have an associated TextFrame, then return that.
static
SwFrmFmt
*
findTextBox
(
SwFrmFmt
*
pShape
);
static
SwFrmFmt
*
findTextBox
(
SwFrmFmt
*
pShape
);
/// Look up TextFrames in a document, which are in fact TextBoxes.
static
std
::
list
<
SwFrmFmt
*>
findTextBoxes
(
SwDoc
*
pDoc
);
/// Count number of shapes in the document, excluding TextBoxes.
static
sal_Int32
getCount
(
SdrPage
*
pPage
,
std
::
list
<
SwFrmFmt
*>&
rTextBoxes
);
};
};
#endif // INCLUDED_SW_INC_TEXTBOXHELPER_HXX
#endif // INCLUDED_SW_INC_TEXTBOXHELPER_HXX
...
...
sw/source/core/doc/textboxhelper.cxx
Dosyayı görüntüle @
f1dae10c
...
@@ -18,9 +18,11 @@
...
@@ -18,9 +18,11 @@
#include <unotextbodyhf.hxx>
#include <unotextbodyhf.hxx>
#include <unotextrange.hxx>
#include <unotextrange.hxx>
#include <unomid.h>
#include <unomid.h>
#include <dflyobj.hxx>
#include <svx/svdoashp.hxx>
#include <svx/svdoashp.hxx>
#include <svx/unopage.hxx>
#include <svx/unopage.hxx>
#include <svx/svdpage.hxx>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/text/SizeType.hpp>
#include <com/sun/star/text/SizeType.hpp>
...
@@ -81,6 +83,34 @@ void SwTextBoxHelper::destroy(SwFrmFmt* pShape)
...
@@ -81,6 +83,34 @@ void SwTextBoxHelper::destroy(SwFrmFmt* pShape)
}
}
}
}
std
::
list
<
SwFrmFmt
*>
SwTextBoxHelper
::
findTextBoxes
(
SwDoc
*
pDoc
)
{
std
::
list
<
SwFrmFmt
*>
aRet
;
SwFrmFmts
&
rSpzFrmFmts
=
*
pDoc
->
GetSpzFrmFmts
();
for
(
SwFrmFmts
::
iterator
it
=
rSpzFrmFmts
.
begin
();
it
!=
rSpzFrmFmts
.
end
();
++
it
)
{
SwFrmFmt
*
pTextBox
=
findTextBox
(
*
it
);
if
(
pTextBox
)
aRet
.
push_back
(
pTextBox
);
}
return
aRet
;
}
sal_Int32
SwTextBoxHelper
::
getCount
(
SdrPage
*
pPage
,
std
::
list
<
SwFrmFmt
*>&
rTextBoxes
)
{
sal_Int32
nRet
=
0
;
for
(
size_t
i
=
0
;
i
<
pPage
->
GetObjCount
();
++
i
)
{
SwVirtFlyDrawObj
*
pObject
=
PTR_CAST
(
SwVirtFlyDrawObj
,
pPage
->
GetObj
(
i
));
if
(
pObject
&&
std
::
find
(
rTextBoxes
.
begin
(),
rTextBoxes
.
end
(),
pObject
->
GetFmt
())
!=
rTextBoxes
.
end
())
continue
;
++
nRet
;
}
return
nRet
;
}
SwFrmFmt
*
SwTextBoxHelper
::
findTextBox
(
SwFrmFmt
*
pShape
)
SwFrmFmt
*
SwTextBoxHelper
::
findTextBox
(
SwFrmFmt
*
pShape
)
{
{
SwFrmFmt
*
pRet
=
0
;
SwFrmFmt
*
pRet
=
0
;
...
...
sw/source/core/unocore/unodraw.cxx
Dosyayı görüntüle @
f1dae10c
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <swunohelper.hxx>
#include <swunohelper.hxx>
#include <textboxhelper.hxx>
#include <textboxhelper.hxx>
#include <doc.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentUndoRedo.hxx>
#include <fmtcntnt.hxx>
#include <fmtcntnt.hxx>
#include <fmtflcnt.hxx>
#include <fmtflcnt.hxx>
...
@@ -516,7 +517,13 @@ sal_Int32 SwXDrawPage::getCount(void) throw( uno::RuntimeException, std::excepti
...
@@ -516,7 +517,13 @@ sal_Int32 SwXDrawPage::getCount(void) throw( uno::RuntimeException, std::excepti
else
else
{
{
((
SwXDrawPage
*
)
this
)
->
GetSvxPage
();
((
SwXDrawPage
*
)
this
)
->
GetSvxPage
();
return
pDrawPage
->
getCount
();
std
::
list
<
SwFrmFmt
*>
aTextBoxes
=
SwTextBoxHelper
::
findTextBoxes
(
pDoc
);
if
(
aTextBoxes
.
empty
())
return
pDrawPage
->
getCount
();
else
return
SwTextBoxHelper
::
getCount
(
pDrawPage
->
GetSdrPage
(),
aTextBoxes
);
}
}
}
}
...
...
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