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
3aa7db45
Kaydet (Commit)
3aa7db45
authored
Agu 24, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SvxAnchorIds to scoped enum
Change-Id: I4375fa07eb6ac81b21b904e965e4c2f9600ca99a
üst
ce51b649
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
47 additions
and
40 deletions
+47
-40
dlgfact.cxx
cui/source/factory/dlgfact.cxx
+4
-4
dlgfact.hxx
cui/source/factory/dlgfact.hxx
+2
-2
labdlg.hxx
cui/source/inc/labdlg.hxx
+3
-2
swpossizetabpage.hxx
cui/source/inc/swpossizetabpage.hxx
+2
-1
transfrm.hxx
cui/source/inc/transfrm.hxx
+3
-10
labdlg.cxx
cui/source/tabpages/labdlg.cxx
+4
-4
swpossizetabpage.cxx
cui/source/tabpages/swpossizetabpage.cxx
+3
-3
transfrm.cxx
cui/source/tabpages/transfrm.cxx
+4
-4
anchorid.hxx
include/svx/anchorid.hxx
+17
-6
svxdlg.hxx
include/svx/svxdlg.hxx
+3
-2
drwbassh.cxx
sw/source/uibase/shells/drwbassh.cxx
+2
-2
No files found.
cui/source/factory/dlgfact.cxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -921,7 +921,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTextTabDialog( vcl::Wind
// TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
AbstractSvxCaptionDialog
*
AbstractDialogFactory_Impl
::
CreateCaptionDialog
(
vcl
::
Window
*
pParent
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
)
SvxAnchorIds
nAnchorTypes
)
{
VclPtrInstance
<
SvxCaptionTabDialog
>
pDlg
(
pParent
,
pView
,
nAnchorTypes
);
return
new
AbstractSvxCaptionDialog_Impl
(
pDlg
);
...
...
@@ -1095,7 +1095,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
AbstractSvxTransformTabDialog
*
AbstractDialogFactory_Impl
::
CreateSvxTransformTabDialog
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
*
pAttr
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
)
SvxAnchorIds
nAnchorTypes
)
{
VclPtrInstance
<
SvxTransformTabDialog
>
pDlg
(
pParent
,
pAttr
,
pView
,
nAnchorTypes
);
return
new
AbstractSvxTransformTabDialog_Impl
(
pDlg
);
...
...
@@ -1113,14 +1113,14 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( v
{
case
RID_SCH_TransformTabDLG_SVXPAGE_ANGLE
:
{
pDlg
.
reset
(
VclPtr
<
SvxTransformTabDialog
>::
Create
(
pParent
,
pAttr
,
pSdrView
,
bSizeTabPage
?
S
VX_OBJ_NOPROTECT
:
SVX_OBJ_NOPROTECT
|
SVX_OBJ_NORESIZE
)
);
pDlg
.
reset
(
VclPtr
<
SvxTransformTabDialog
>::
Create
(
pParent
,
pAttr
,
pSdrView
,
bSizeTabPage
?
S
vxAnchorIds
::
NoProtect
:
SvxAnchorIds
::
NoProtect
|
SvxAnchorIds
::
NoResize
)
);
pDlg
->
RemoveTabPage
(
"RID_SVXPAGE_ANGLE"
);
pDlg
->
RemoveTabPage
(
"RID_SVXPAGE_SLANT"
);
}
break
;
case
RID_SCH_TransformTabDLG_SVXPAGE_SLANT
:
{
pDlg
.
reset
(
VclPtr
<
SvxTransformTabDialog
>::
Create
(
pParent
,
pAttr
,
pSdrView
,
bSizeTabPage
?
S
VX_OBJ_NOPROTECT
:
SVX_OBJ_NOPROTECT
|
SVX_OBJ_NORESIZE
)
);
pDlg
.
reset
(
VclPtr
<
SvxTransformTabDialog
>::
Create
(
pParent
,
pAttr
,
pSdrView
,
bSizeTabPage
?
S
vxAnchorIds
::
NoProtect
:
SvxAnchorIds
::
NoProtect
|
SvxAnchorIds
::
NoResize
)
);
pDlg
->
RemoveTabPage
(
"RID_SVXPAGE_SLANT"
);
}
break
;
...
...
cui/source/factory/dlgfact.hxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -476,7 +476,7 @@ public:
const
SfxItemSet
&
rSet
)
override
;
virtual
AbstractSvxCaptionDialog
*
CreateCaptionDialog
(
vcl
::
Window
*
pParent
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
=
0
)
override
;
SvxAnchorIds
nAnchorTypes
=
SvxAnchorIds
::
NONE
)
override
;
virtual
AbstractSvxDistributeDialog
*
CreateSvxDistributeDialog
(
const
SfxItemSet
&
rAttr
)
override
;
virtual
SfxAbstractInsertObjectDialog
*
CreateInsertObjectDialog
(
vcl
::
Window
*
pParent
,
const
OUString
&
rCommmand
,
const
css
::
uno
::
Reference
<
css
::
embed
::
XStorage
>&
xStor
,
...
...
@@ -509,7 +509,7 @@ public:
virtual
AbstractSvxTransformTabDialog
*
CreateSvxTransformTabDialog
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
*
pAttr
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
=
0
)
override
;
SvxAnchorIds
nAnchorTypes
=
SvxAnchorIds
::
NONE
)
override
;
virtual
SfxAbstractTabDialog
*
CreateSchTransformTabDialog
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
*
pAttr
,
const
SdrView
*
pSdrView
,
...
...
cui/source/inc/labdlg.hxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -26,6 +26,7 @@
#include <sfx2/tabdlg.hxx>
#include <svx/sxctitm.hxx>
#include <svx/sxcecitm.hxx>
#include <svx/anchorid.hxx>
class
SdrView
;
...
...
@@ -101,7 +102,7 @@ class SvxCaptionTabDialog : public SfxTabDialog
{
private
:
const
SdrView
*
pView
;
sal_uInt16
nAnchorCtrls
;
SvxAnchorIds
nAnchorCtrls
;
sal_uInt16
m_nSwPosSizePageId
;
sal_uInt16
m_nPositionSizePageId
;
sal_uInt16
m_nCaptionPageId
;
...
...
@@ -112,7 +113,7 @@ private:
public
:
SvxCaptionTabDialog
(
vcl
::
Window
*
pParent
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
=
0
);
SvxAnchorIds
nAnchorTypes
=
SvxAnchorIds
::
NONE
);
/// link for the Writer to validate positions
void
SetValidateFramePosLink
(
const
Link
<
SvxSwFrameValidation
&
,
void
>&
rLink
);
...
...
cui/source/inc/swpossizetabpage.hxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -31,6 +31,7 @@
struct
FrmMap
;
class
SdrView
;
struct
SvxSwFrameValidation
;
enum
class
SvxAnchorIds
;
class
SvxSwPosSizeTabPage
:
public
SfxTabPage
{
...
...
@@ -136,7 +137,7 @@ public:
virtual
DeactivateRC
DeactivatePage
(
SfxItemSet
*
pSet
)
override
;
void
EnableAnchorTypes
(
sal_uInt16
nAnchorEnable
);
void
EnableAnchorTypes
(
SvxAnchorIds
nAnchorEnable
);
void
SetValidateFramePosLink
(
const
Link
<
SvxSwFrameValidation
&
,
void
>&
rLink
)
{
m_aValidateLink
=
rLink
;}
...
...
cui/source/inc/transfrm.hxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -21,6 +21,7 @@
#include <svx/dlgctrl.hxx>
#include <svx/dialcontrol.hxx>
#include <svx/anchorid.hxx>
#include <vcl/fixed.hxx>
...
...
@@ -35,14 +36,6 @@ class SdrView;
|*
\************************************************************************/
/** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
to disable the size controls */
const
sal_uInt16
SVX_OBJ_NORESIZE
=
0x0100
;
/** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
to disable the protect controls */
const
sal_uInt16
SVX_OBJ_NOPROTECT
=
0x0200
;
struct
SvxSwFrameValidation
;
class
SvxTransformTabDialog
:
public
SfxTabDialog
{
...
...
@@ -53,7 +46,7 @@ class SvxTransformTabDialog : public SfxTabDialog
private
:
const
SdrView
*
pView
;
sal_uInt16
nAnchorCtrls
;
SvxAnchorIds
nAnchorCtrls
;
Link
<
SvxSwFrameValidation
&
,
void
>
aValidateLink
;
virtual
void
PageCreated
(
sal_uInt16
nId
,
SfxTabPage
&
rPage
)
override
;
...
...
@@ -62,7 +55,7 @@ public:
SvxTransformTabDialog
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
*
pAttr
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
=
0
);
SvxAnchorIds
nAnchorTypes
=
SvxAnchorIds
::
NONE
);
//link for the Writer to validate positions
void
SetValidateFramePosLink
(
const
Link
<
SvxSwFrameValidation
&
,
void
>&
rLink
);
...
...
cui/source/tabpages/labdlg.cxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -507,7 +507,7 @@ void SvxCaptionTabPage::FillValueSet()
SvxCaptionTabDialog
::
SvxCaptionTabDialog
(
vcl
::
Window
*
pParent
,
const
SdrView
*
pSdrView
,
sal_uInt16
nAnchorTypes
)
SvxAnchorIds
nAnchorTypes
)
:
SfxTabDialog
(
pParent
,
"CalloutDialog"
,
"cui/ui/calloutdialog.ui"
)
,
pView
(
pSdrView
)
,
nAnchorCtrls
(
nAnchorTypes
)
...
...
@@ -518,7 +518,7 @@ SvxCaptionTabDialog::SvxCaptionTabDialog(vcl::Window* pParent, const SdrView* pS
assert
(
pView
);
//Keine gueltige View Uebergeben!
//different positioning page in Writer
if
(
nAnchorCtrls
&
0x00ff
)
if
(
nAnchorCtrls
&
(
SvxAnchorIds
::
Paragraph
|
SvxAnchorIds
::
Character
|
SvxAnchorIds
::
Page
|
SvxAnchorIds
::
Fly
)
)
{
m_nSwPosSizePageId
=
AddTabPage
(
"RID_SVXPAGE_SWPOSSIZE"
,
SvxSwPosSizeTabPage
::
Create
,
SvxSwPosSizeTabPage
::
GetRanges
);
...
...
@@ -540,10 +540,10 @@ void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
static_cast
<
SvxPositionSizeTabPage
&>
(
rPage
).
SetView
(
pView
);
static_cast
<
SvxPositionSizeTabPage
&>
(
rPage
).
Construct
();
if
(
nAnchorCtrls
&
S
VX_OBJ_NORESIZE
)
if
(
nAnchorCtrls
&
S
vxAnchorIds
::
NoResize
)
static_cast
<
SvxPositionSizeTabPage
&>
(
rPage
).
DisableResize
();
if
(
nAnchorCtrls
&
S
VX_OBJ_NOPROTECT
)
if
(
nAnchorCtrls
&
S
vxAnchorIds
::
NoProtect
)
static_cast
<
SvxPositionSizeTabPage
&>
(
rPage
).
DisableProtect
();
}
else
if
(
nId
==
m_nSwPosSizePageId
)
...
...
cui/source/tabpages/swpossizetabpage.cxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -1096,11 +1096,11 @@ DeactivateRC SvxSwPosSizeTabPage::DeactivatePage( SfxItemSet* _pSet )
return
DeactivateRC
::
LeavePage
;
}
void
SvxSwPosSizeTabPage
::
EnableAnchorTypes
(
sal_uInt16
nAnchorEnable
)
void
SvxSwPosSizeTabPage
::
EnableAnchorTypes
(
SvxAnchorIds
nAnchorEnable
)
{
if
((
nAnchorEnable
&
S
VX_OBJ_AT_FLY
))
if
((
nAnchorEnable
&
S
vxAnchorIds
::
Fly
))
m_pToFrameRB
->
Show
();
if
(
!
(
nAnchorEnable
&
S
VX_OBJ_PAGE
))
if
(
!
(
nAnchorEnable
&
S
vxAnchorIds
::
Page
))
m_pToPageRB
->
Enable
(
false
);
}
...
...
cui/source/tabpages/transfrm.cxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -88,7 +88,7 @@ const sal_uInt16 SvxSlantTabPage::pSlantRanges[] =
\************************************************************************/
SvxTransformTabDialog
::
SvxTransformTabDialog
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
*
pAttr
,
const
SdrView
*
pSdrView
,
sal_uInt16
nAnchorTypes
)
const
SdrView
*
pSdrView
,
SvxAnchorIds
nAnchorTypes
)
:
SfxTabDialog
(
pParent
,
"PositionAndSizeDialog"
,
"cui/ui/positionsizedialog.ui"
...
...
@@ -101,7 +101,7 @@ SvxTransformTabDialog::SvxTransformTabDialog( vcl::Window* pParent, const SfxIte
DBG_ASSERT
(
pView
,
"no valid view (!)"
);
//different positioning page in Writer
if
(
nAnchorCtrls
&
0x00ff
)
if
(
nAnchorCtrls
&
(
SvxAnchorIds
::
Paragraph
|
SvxAnchorIds
::
Character
|
SvxAnchorIds
::
Page
|
SvxAnchorIds
::
Fly
)
)
{
nSWPosSize
=
AddTabPage
(
"RID_SVXPAGE_SWPOSSIZE"
,
SvxSwPosSizeTabPage
::
Create
,
SvxSwPosSizeTabPage
::
GetRanges
);
RemoveTabPage
(
"RID_SVXPAGE_POSITION_SIZE"
);
...
...
@@ -125,12 +125,12 @@ void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
rSvxPos
.
SetView
(
pView
);
rSvxPos
.
Construct
();
if
(
nAnchorCtrls
&
S
VX_OBJ_NORESIZE
)
if
(
nAnchorCtrls
&
S
vxAnchorIds
::
NoResize
)
{
rSvxPos
.
DisableResize
();
}
if
(
nAnchorCtrls
&
S
VX_OBJ_NOPROTECT
)
if
(
nAnchorCtrls
&
S
vxAnchorIds
::
NoProtect
)
{
rSvxPos
.
DisableProtect
();
rSvxPos
.
UpdateControlStates
();
...
...
include/svx/anchorid.hxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -19,15 +19,26 @@
#ifndef INCLUDED_SVX_ANCHORID_HXX
#define INCLUDED_SVX_ANCHORID_HXX
#include <o3tl/typed_flags_set.hxx>
enum
SvxAnchorIds
enum
class
SvxAnchorIds
{
SVX_OBJ_AT_CNTNT
=
0x01
,
// Frame bound to paragraph
SVX_OBJ_IN_CNTNT
=
0x02
,
// Frame bound to character
SVX_OBJ_PAGE
=
0x04
,
// Frame bound to page
SVX_OBJ_AT_FLY
=
0x08
// Frame bound to other frame
// SVX_OBJ_AUTO_CNTNT = 0x10 // Automatically positioned frame bound to paragraph
NONE
=
0x0000
,
Paragraph
=
0x0001
,
// Frame bound to paragraph
Character
=
0x0002
,
// Frame bound to character
Page
=
0x0004
,
// Frame bound to page
Fly
=
0x0008
,
// Frame bound to other frame
/** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
to disable the size controls */
NoResize
=
0x0100
,
/** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
to disable the protect controls */
NoProtect
=
0x0200
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
SvxAnchorIds
>
:
is_typed_flags
<
SvxAnchorIds
,
0x030f
>
{};
}
#endif
...
...
include/svx/svxdlg.hxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -20,6 +20,7 @@
#define INCLUDED_SVX_SVXDLG_HXX
#include <sfx2/sfxdlg.hxx>
#include <svx/anchorid.hxx>
#include <svx/zoom_def.hxx>
#include <editeng/edtdlg.hxx>
...
...
@@ -281,7 +282,7 @@ public:
virtual
AbstractSvxCaptionDialog
*
CreateCaptionDialog
(
vcl
::
Window
*
pParent
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
=
0
)
=
0
;
SvxAnchorIds
nAnchorTypes
=
SvxAnchorIds
::
NONE
)
=
0
;
virtual
AbstractSvxDistributeDialog
*
CreateSvxDistributeDialog
(
const
SfxItemSet
&
rAttr
)
=
0
;
...
...
@@ -329,7 +330,7 @@ public:
virtual
AbstractSvxTransformTabDialog
*
CreateSvxTransformTabDialog
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
*
pAttr
,
const
SdrView
*
pView
,
sal_uInt16
nAnchorTypes
=
0
)
=
0
;
SvxAnchorIds
nAnchorTypes
=
SvxAnchorIds
::
NONE
)
=
0
;
virtual
SfxAbstractTabDialog
*
CreateSchTransformTabDialog
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
*
pAttr
,
const
SdrView
*
pSdrView
,
...
...
sw/source/uibase/shells/drwbassh.cxx
Dosyayı görüntüle @
3aa7db45
...
...
@@ -187,11 +187,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// Allowed anchorages:
short
nAnchor
=
pSh
->
GetAnchorId
();
sal_uInt16
nAllowedAnchors
=
SVX_OBJ_AT_CNTNT
|
SVX_OBJ_IN_CNTNT
|
SVX_OBJ_PAGE
;
SvxAnchorIds
nAllowedAnchors
=
SvxAnchorIds
::
Paragraph
|
SvxAnchorIds
::
Character
|
SvxAnchorIds
::
Page
;
sal_uInt16
nHtmlMode
=
::
GetHtmlMode
(
pSh
->
GetView
().
GetDocShell
());
if
(
pSh
->
IsFlyInFly
()
)
nAllowedAnchors
|=
S
VX_OBJ_AT_FLY
;
nAllowedAnchors
|=
S
vxAnchorIds
::
Fly
;
if
(
pObj
->
GetObjIdentifier
()
==
OBJ_CAPTION
)
bCaption
=
true
;
...
...
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