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
f8409911
Kaydet (Commit)
f8409911
authored
Ock 22, 2013
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
do not second-guess which classes use a stylesheet
Change-Id: I76b23bcdca2e7394fd5ab67e8341f4cdb46f8a64
üst
24578b80
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
79 additions
and
15 deletions
+79
-15
stlsheet.cxx
sd/source/core/stlsheet.cxx
+3
-12
Package_inc.mk
svl/Package_inc.mk
+1
-0
style.hxx
svl/inc/svl/style.hxx
+5
-1
stylesheetuser.hxx
svl/inc/svl/stylesheetuser.hxx
+38
-0
style.cxx
svl/source/items/style.cxx
+5
-0
attributeproperties.hxx
svx/inc/svx/sdr/properties/attributeproperties.hxx
+4
-1
svdpage.hxx
svx/inc/svx/svdpage.hxx
+4
-1
attributeproperties.cxx
svx/source/sdr/properties/attributeproperties.cxx
+12
-0
svdpage.cxx
svx/source/svdraw/svdpage.cxx
+7
-0
No files found.
sd/source/core/stlsheet.cxx
Dosyayı görüntüle @
f8409911
...
...
@@ -349,18 +349,9 @@ bool SdStyleSheet::IsUsed() const
if
(
pListener
==
this
)
continue
;
// NULL-Pointer ist im Listener-Array erlaubt
if
(
pListener
)
{
if
(
pListener
->
ISA
(
sdr
::
properties
::
AttributeProperties
))
{
bResult
=
true
;
}
else
if
(
pListener
->
ISA
(
SfxStyleSheet
))
{
bResult
=
((
SfxStyleSheet
*
)
pListener
)
->
IsUsed
();
}
}
const
svl
::
StyleSheetUser
*
const
pUser
(
dynamic_cast
<
svl
::
StyleSheetUser
*>
(
pListener
));
if
(
pUser
)
bResult
=
pUser
->
isUsedByModel
();
if
(
bResult
)
break
;
}
...
...
svl/Package_inc.mk
Dosyayı görüntüle @
f8409911
...
...
@@ -97,6 +97,7 @@ $(eval $(call gb_Package_add_file,svl_inc,inc/svl/strmadpt.hxx,svl/strmadpt.hxx)
$(eval $(call gb_Package_add_file,svl_inc,inc/svl/style.hrc,svl/style.hrc))
$(eval $(call gb_Package_add_file,svl_inc,inc/svl/style.hxx,svl/style.hxx))
$(eval $(call gb_Package_add_file,svl_inc,inc/svl/stylepool.hxx,svl/stylepool.hxx))
$(eval $(call gb_Package_add_file,svl_inc,inc/svl/stylesheetuser.hxx,svl/stylesheetuser.hxx))
$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svdde.hxx,svl/svdde.hxx))
$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svl.hrc,svl/svl.hrc))
$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svldllapi.h,svl/svldllapi.h))
...
...
svl/inc/svl/style.hxx
Dosyayı görüntüle @
f8409911
...
...
@@ -34,6 +34,7 @@
#include <svl/lstner.hxx>
#include <svl/brdcst.hxx>
#include <svl/poolitem.hxx>
#include <svl/stylesheetuser.hxx>
#include <svl/style.hrc>
...
...
@@ -267,7 +268,7 @@ public:
//=========================================================================
class
SVL_DLLPUBLIC
SfxStyleSheet
:
public
SfxStyleSheetBase
,
public
SfxListener
,
public
SfxBroadcaster
public
SfxListener
,
public
SfxBroadcaster
,
public
svl
::
StyleSheetUser
{
public
:
TYPEINFO
();
...
...
@@ -276,6 +277,9 @@ public:
SfxStyleSheet
(
const
SfxStyleSheet
&
);
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
);
virtual
bool
isUsedByModel
()
const
;
virtual
bool
SetParent
(
const
UniString
&
);
protected
:
...
...
svl/inc/svl/stylesheetuser.hxx
0 → 100644
Dosyayı görüntüle @
f8409911
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef SVL_STYLESHEETUSER_HXX_INCLUDED
#define SVL_STYLESHEETUSER_HXX_INCLUDED
namespace
svl
{
/** Test whether object that uses a stylesheet is used itself.
This interface should be implemented by all classes that use
a SfxStyleSheet (and listen on it). It can be queried by the stylesheet
to determine if it is really used.
*/
class
StyleSheetUser
{
public
:
/** Test whether this object is used.
@return true, if the object is used, false otherwise
*/
virtual
bool
isUsedByModel
()
const
=
0
;
protected
:
~
StyleSheetUser
()
{}
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svl/source/items/style.cxx
Dosyayı görüntüle @
f8409911
...
...
@@ -913,6 +913,11 @@ void SfxStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint )
Forward
(
rBC
,
rHint
);
}
bool
SfxStyleSheet
::
isUsedByModel
()
const
{
return
IsUsed
();
}
//////////////////////// SfxStyleSheetPool ///////////////////////////////
SfxStyleSheetPool
::
SfxStyleSheetPool
(
SfxItemPool
const
&
rSet
)
...
...
svx/inc/svx/sdr/properties/attributeproperties.hxx
Dosyayı görüntüle @
f8409911
...
...
@@ -21,6 +21,7 @@
#define _SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX
#include <svl/lstner.hxx>
#include <svl/stylesheetuser.hxx>
#include <svx/sdr/properties/defaultproperties.hxx>
#include "svx/svxdllapi.h"
...
...
@@ -30,7 +31,7 @@ namespace sdr
{
namespace
properties
{
class
SVX_DLLPUBLIC
AttributeProperties
:
public
DefaultProperties
,
public
SfxListener
class
SVX_DLLPUBLIC
AttributeProperties
:
public
DefaultProperties
,
public
SfxListener
,
public
svl
::
StyleSheetUser
{
// add style sheet, do all the necessary handling
void
ImpAddStyleSheet
(
SfxStyleSheet
*
pNewStyleSheet
,
sal_Bool
bDontRemoveHardAttr
);
...
...
@@ -82,6 +83,8 @@ namespace sdr
// This is the Notify(...) from 2nd base class SfxListener
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
);
virtual
bool
isUsedByModel
()
const
;
};
}
// end of namespace properties
}
// end of namespace sdr
...
...
svx/inc/svx/svdpage.hxx
Dosyayı görüntüle @
f8409911
...
...
@@ -20,6 +20,7 @@
#ifndef _SVDPAGE_HXX
#define _SVDPAGE_HXX
#include <svl/stylesheetuser.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/print.hxx>
#include <vcl/gdimtf.hxx>
...
...
@@ -368,7 +369,7 @@ public:
////////////////////////////////////////////////////////////////////////////////////////////////////
// class SdrPageProperties
class
SVX_DLLPUBLIC
SdrPageProperties
:
public
SfxListener
class
SVX_DLLPUBLIC
SdrPageProperties
:
public
SfxListener
,
public
svl
::
StyleSheetUser
{
private
:
// data
...
...
@@ -391,6 +392,8 @@ public:
// Notify(...) from baseclass SfxListener
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
);
virtual
bool
isUsedByModel
()
const
;
// data read/write
const
SfxItemSet
&
GetItemSet
()
const
;
void
PutItemSet
(
const
SfxItemSet
&
rSet
);
...
...
svx/source/sdr/properties/attributeproperties.cxx
Dosyayı görüntüle @
f8409911
...
...
@@ -608,6 +608,18 @@ namespace sdr
GetSdrObject
().
Notify
(
rBC
,
rHint
);
}
}
bool
AttributeProperties
::
isUsedByModel
()
const
{
const
SdrObject
&
rObj
(
GetSdrObject
());
if
(
rObj
.
IsInserted
())
{
const
SdrPage
*
const
pPage
(
rObj
.
GetPage
());
if
(
pPage
&&
pPage
->
IsInserted
())
return
true
;
}
return
false
;
}
}
// end of namespace properties
}
// end of namespace sdr
...
...
svx/source/svdraw/svdpage.cxx
Dosyayı görüntüle @
f8409911
...
...
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <cassert>
#include <svx/svdpage.hxx>
...
...
@@ -1196,6 +1197,12 @@ void SdrPageProperties::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
}
}
bool
SdrPageProperties
::
isUsedByModel
()
const
{
assert
(
mpSdrPage
);
return
mpSdrPage
->
IsInserted
();
}
const
SfxItemSet
&
SdrPageProperties
::
GetItemSet
()
const
{
return
*
mpProperties
;
...
...
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